Skip to content

fix: normalize Azure listing ETags - #2171

Merged
matheuscscp merged 2 commits into
fluxcd:mainfrom
Karthik-Chowdary:fix-azure-etag
Sep 30, 2026
Merged

matheuscscp merged 2 commits into
fluxcd:mainfrom
Karthik-Chowdary:fix-azure-etag

Conversation

@Karthik-Chowdary

@Karthik-Chowdary Karthik-Chowdary commented Sep 30, 2026 •

Copy link
Copy Markdown

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=1
  • mise exec -- go test ./internal/bucket/azure -run TestBlobClient_ -count=10

AI assistance: Hermes Agent (switchyard/openai/gpt-5.6-sol). All changes were reviewed and tested by the submitter.

Signed-off-by: Karthik Chowdary <21139050+Karthik-Chowdary@users.noreply.github.com>
Assisted-by: Hermes Agent/switchyard-openai-gpt-5.6-sol
@matheuscscp matheuscscp added bug Something isn't working backport:release/v1.9.x To be backported to release/v1.9.x labels Sep 30, 2026
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 matheuscscp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @Karthik-Chowdary

@matheuscscp
matheuscscp merged commit 3b1dc95 into fluxcd:main Sep 30, 2026
6 checks passed
@fluxcdbot

Copy link
Copy Markdown
Member

Successfully created backport PR for release/v1.9.x:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:release/v1.9.x To be backported to release/v1.9.x bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure Blob ETag mismatch causing significant churn

3 participants