fix: normalize Azure listing ETags - #2171
Merged
Merged
Conversation
Signed-off-by: Karthik Chowdary <21139050+Karthik-Chowdary@users.noreply.github.com> Assisted-by: Hermes Agent/switchyard-openai-gpt-5.6-sol
Add a regression test that serves the same blob through List Blobs (unquoted <Etag> in the XML body) and Get Blob (quoted ETag response header) and verifies both paths return the same ETag for the blob. The Bucket reconciler compares these values to decide whether the container changed, so a mismatch makes it re-download the whole container on every reconcile. The existing listing test pins the normalized value but never compares it with the download path. Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com> Assisted-by: OpenCode/deepseek-v4.1-flash
matheuscscp
approved these changes
Sep 30, 2026
matheuscscp
left a comment
Member
There was a problem hiding this comment.
LGTM
Thanks @Karthik-Chowdary
Member
|
Successfully created backport PR for |
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.
Normalize Azure Blob listing ETags to the quoted representation returned by blob downloads. This keeps the listing digest consistent with the stored artifact revision and avoids downloading unchanged containers on every reconcile.
The existing listing test now verifies the normalized ETag value.
Fixes fluxcd/flux2#6093
Tests:
mise exec -- go test ./internal/bucket/azure -count=1mise exec -- go test ./internal/bucket/azure -run TestBlobClient_ -count=10AI assistance: Hermes Agent (switchyard/openai/gpt-5.6-sol). All changes were reviewed and tested by the submitter.