GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — fix(opencode): DB migrating on every run for non-latest channels by bew · Pull Request #21056 · anomalyco/opencode Conversation
|
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5defc3f to
400fd62
Compare
There was an error while loading. Please reload this page.
|
The failing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@bew what if the test is flaky? Can you rebase and force push so that CI runs again? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
400fd62 to
704fca0
Compare
I rebased on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This branch is working for me on nixos with. TY! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@thdxr can this PR get a review and hopefully get merged please? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I ported this patch to 1.14.19 - the version I have via nixpkgs. It fixes the issue for me. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
a36c166 to
62e338e
Compare
|
I rebased on latest |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
62e338e to
cd39d93
Compare
|
Hello, I rebased on latest |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@simonklee @thdxr @adamdotdevin @Hona @Brendonovich @nexxeln anyone? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
cd39d93 to
ef217e9
Compare
|
Heads up: this will silently break after rebase on Post-rebase, One-liner: - if (!(await Filesystem.exists(Database.Path))) { + if (!(await Filesystem.exists(Database.getPath()))) { Cost is more than a noisy log line: I hit this in a downstream fork that pulled in the same fix you have here, then rebased past |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The marker check in index.ts was hardcoded to Global.Path.data/opencode.db, but the actual DB path is channel-aware (db.ts:getPath). On non-default channels (local dev builds, named user channels), the real file is opencode-<channel>.db, so the marker never exists and the 'one time' migration runs on every launch. Use Database.getPath() as the marker so it matches the channel-specific filename that Database.Client() actually creates. Note: upstream PR anomalyco#27615 (fc34c74) renamed Database.Path (const) to Database.getPath() (function). The earlier version of this patch used Database.Path and silently re-broke when rebased past the rename. Flagged upstream at anomalyco#21056.
ef217e9 to
1f95617
Compare
|
Thanks @pwiens, I updated the PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have the same issue, agent recommended `ln -s opencode-stable.db '~/.local/share/opencode/opencode.db' on my system and referenced this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hello everyone! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
DB migrating on every run when OPENCODE_CHANNEL is e.g. 'stable' (like the Nix package in nixpkgs) JSON->SQLite one-time migration reruns on channel-specific DBs
There was an error while loading. Please reload this page.