source/http: report errors before checksum mismatch - #7113
Open
Karthik-Chowdary wants to merge 2 commits into
Open
source/http: report errors before checksum mismatch#7113Karthik-Chowdary wants to merge 2 commits into
Karthik-Chowdary wants to merge 2 commits into
Conversation
Pinned HTTP sources download their payload during Snapshot. Check the response status there before saving the error response as a snapshot and reporting its digest as a checksum mismatch. Add a regression test proving a 403 response reports its status instead of a misleading digest mismatch. Signed-off-by: Karthik Chowdary <[email protected]>
AkihiroSuda
approved these changes
Sep 3, 2026
Member
|
Please remove this |
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.
Pinned HTTP sources download their payload during
Snapshot. When the server returns an error response, the current path saves that response body and compares its digest first, producing a misleading checksum mismatch instead of the HTTP status reported by unpinned sources.Check the response status before saving the snapshot. The regression test uses a local HTTP server returning 403 and verifies that
Snapshotreportsinvalid response status 403.Testing:
mise x [email protected] -- go test ./source/http -run ^'TestHTTPChecksumReturnsResponseStatus$' -count=1\n-git diff --check\n\nBoth pass. The full package suite was also run; the new test passes, while four existing snapshot-reading tests fail because this unprivileged environment cannot perform bind mounts (operation not permitted).\n\nFixes Dockerfile frontend:ADD --checksum=.. https://..hides HTTP error #6380