Conversation
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
August 31, 2026 07:03
c520eec to
c69a690
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
August 31, 2026 18:45
c69a690 to
d8ea8da
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
August 31, 2026 19:08
d8ea8da to
65b7b66
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
September 1, 2026 00:01
65b7b66 to
e9e5cfa
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
2 times, most recently
from
September 1, 2026 22:44
34a6274 to
5f854a3
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
September 1, 2026 22:52
5f854a3 to
22f6fb8
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
September 1, 2026 22:59
22f6fb8 to
4ea82db
Compare
nasamuffin
requested changes
Sep 1, 2026
nasamuffin
left a comment
Collaborator
There was a problem hiding this comment.
would be great if you can add some test cases exercising these errors. doesn't do us much good if it turns out the errors themselves are broken in some way.
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
September 1, 2026 23:59
4ea82db to
16c7e4a
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
2 times, most recently
from
September 2, 2026 00:22
293bd19 to
9c9ecb7
Compare
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
September 2, 2026 00:47
9c9ecb7 to
039383f
Compare
Contributor
Author
Added unit tests as well as CLI integration tests testing that these errors work, and return the current message on each type of error (Write, Read, Encode, etc) |
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
September 2, 2026 16:21
039383f to
d3ab5e8
Compare
Store methods previously ignored database write failures, and read failures returned NotFound on database reads instead of reporting a database failure. Introduce 'StoreError' enum with different store error types and 'StoreResult<T>'. These error types are converted into tonic errors with messages, which are displayed on the cli. This follows the same convention as the upstream jj-lib BackendResult/OpStoreResult. Wires this result into the server backend and opstore files, using ? for an early return on an error. Add comprehensive unit tests as well as integration tests that test the StoreErrors return the correct error and error messages. Unit tests in sqlitestore cover all 4 error types: write failures on read-only SQLite instances, read failures on missing tables, data corruption decode errors, and encode errors.
sidracha
force-pushed
the
srachaba-3-store-errors
branch
from
September 2, 2026 16:27
d3ab5e8 to
8cb4259
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example new error message/handling on database read error:
sjj cc init --server http://localhost:8080Error: Failed to initialize workspace: Backend(BackendInitError(Status { code: Internal, message: "storage write error: attempt to write a readonly database", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Mon, 31 Aug 2026 06:35:36 GMT", "content-length": "0"} }, source: None }))A large amount of the diffs are simply changing the return type to StoreResult or adding '?' to await