Repository navigation
core/content/proxy: Convert reader errors to native errdefs - #13585
Merged
dmcgowan merged 1 commit intoJun 19, 2026
Merged
Conversation
Most content proxy operations normalize remote RPC errors before returning them, including stream receive errors from Walk and write errors from the remote writer. remoteReaderAt.ReadAt was an outlier and returned raw status errors from Read and Recv. Callers that use content.ReadBlob through the proxy can then fail errdefs checks, such as treating concurrent content deletion as NotFound. Convert non-EOF read stream errors with errgrpc.ToNative so ReaderAt matches the rest of the content proxy while preserving io.EOF. Signed-off-by: Paweł Gronowski <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR brings core/content/proxy’s remoteReaderAt.ReadAt in line with the rest of the content proxy by converting remote RPC errors into native errdefs-compatible errors, while preserving io.EOF behavior expected by io.ReaderAt callers. This ensures downstream callers (e.g., content.ReadBlob via the proxy) can reliably use errdefs checks such as errdefs.IsNotFound.
Changes:
- Convert
client.Read(...)call errors to native errors viaerrgrpc.ToNative. - Convert non-EOF
Recv()stream errors to native errors viaerrgrpc.ToNativewhile preservingio.EOF.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Slightly related discussion recently; #12821 (comment), which also makes me wonder how (e.g.) |
vvoland
marked this pull request as ready for review
June 12, 2026 12:03
cpuguy83
approved these changes
Jun 15, 2026
djdongjin
approved these changes
Jun 15, 2026
dmcgowan
approved these changes
Jun 18, 2026
This was referenced Sep 15, 2026
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.
Most content proxy operations normalize remote RPC errors before returning them, including stream receive errors from Walk and write errors from the remote writer. remoteReaderAt.ReadAt was an outlier and returned raw status errors from Read and Recv.
Callers that use content.ReadBlob through the proxy can then fail errdefs checks, such as treating concurrent content deletion as NotFound.
Convert non-EOF read stream errors with errgrpc.ToNative so ReaderAt matches the rest of the content proxy while preserving io.EOF.