Skip to content

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Sep 5, 2025

When we build a manifest, we need to prefix the annotation key with index:.

This does it automatically :)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 self-assigned this Sep 5, 2025
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 5, 2025
@caarlos0 caarlos0 requested a review from Copilot September 5, 2025 02:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the way manifest annotations are handled in Docker v2 builds by automatically prefixing annotation keys with index: when building multi-platform images.

  • Automatically prefixes annotation keys with index: for multi-platform builds
  • Updates tests to verify the annotation prefixing behavior
  • Adds comprehensive integration tests for manifest annotation inspection

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
internal/pipe/docker/v2/docker.go Implements the automatic index: prefix logic for multi-platform builds
internal/pipe/docker/v2/docker_test.go Updates unit tests to verify annotation key prefixing
internal/pipe/docker/v2/docker_integration_test.go Adds integration tests and helper functions for manifest inspection
.goreleaser.yaml Adds sample annotation configuration for testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

},
},
},
testctx.WithVersion("1.0.0"),
testctx.WithCurrentTag("v1.0.0"),
testctx.WithCommit("a1b2c3d4"),
testctx.WithSemver(1, 0, 0, ""),
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The removal of testctx.WithCommit("a1b2c3d4") appears to be unintentional. This change could affect test reproducibility and should either be reverted or explained in the commit message.

Suggested change
testctx.WithSemver(1, 0, 0, ""),
testctx.WithSemver(1, 0, 0, ""),
testctx.WithCommit("a1b2c3d4"),

Copilot uses AI. Check for mistakes.

Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.72%. Comparing base (1f75831) to head (354c9b0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6053   +/-   ##
=======================================
  Coverage   82.71%   82.72%           
=======================================
  Files         168      168           
  Lines       17173    17177    +4     
=======================================
+ Hits        14205    14209    +4     
  Misses       2345     2345           
  Partials      623      623           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@caarlos0 caarlos0 merged commit 6f7199e into main Sep 5, 2025
17 checks passed
@caarlos0 caarlos0 deleted the docker-index-annotation branch September 5, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant