fix(memorypullcache): surface pull failures with the image ref#91
Open
Adrien Delorme (azr) wants to merge 1 commit into
Open
fix(memorypullcache): surface pull failures with the image ref#91Adrien Delorme (azr) wants to merge 1 commit into
Adrien Delorme (azr) wants to merge 1 commit into
Conversation
`memorypullcache.Fetch` swallowed remote.Image, img.Size, and io.ReadAll errors into a generic wrapper (`in remote.Image: %w`) without ever logging them or naming the image. Operators saw "Cache miss ref=..." followed by silence, even when the pull was failing (network, auth, or 404). The eventual user-visible error came from a higher layer with no ref attached, so the root cause was hard to identify. Wrap each error with the ref and log it at WARN. Same shape as the existing ategcs error-surfacing in agent-substrate#40.
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.
Symptom
When
memorypullcache.Fetchfails (network, auth, 404, ...), the log showsCache miss ref=...followed by silence. The eventual user-visible error comes from a higher layer with no ref attached, so the actual offending image is invisible in operator logs.Cause
remote.Image,img.Size, andio.ReadAllerrors were wrapped asin remote.Image: %w(etc.) and returned without ever being logged or naming the ref.Fix
Wrap each error with the ref and log it at WARN. Same shape as the existing surfacing in #40.