Skip to content

Fix Public ECR release tag publishing#95

Merged
gontzess merged 1 commit into
mainfrom
gontzess/fix-public-ecr-release-tags
Jun 5, 2026
Merged

Fix Public ECR release tag publishing#95
gontzess merged 1 commit into
mainfrom
gontzess/fix-public-ecr-release-tags

Conversation

@gontzess
Copy link
Copy Markdown
Contributor

@gontzess gontzess commented Jun 5, 2026

Why

The Public ECR tag helper currently calls aws ecr-public batch-get-image, but ECR Public does not expose that AWS CLI operation. Go connector releases with Docker enabled can push and sign the temporary candidate image, then fail before the version tag, manifest publication, and registry recording.

What this changes

Fetch the candidate manifest through Docker registry tooling with docker buildx imagetools inspect --raw <image>@<digest>, then keep the existing ECR PutImage promotion and post-write digest assertion. The helper now passes the expected candidate digest into PutImage, refuses to send non-release-candidate-<run>-<attempt> tags to BatchDeleteImage, and the tests model AWS and Docker separately so the fake AWS runner no longer accepts an invalid ECR Public command.

Cleanup remains best-effort: if BatchDeleteImage is denied, release publication still succeeds after the real version tag and latest are written and verified.

Validation

  • go test ./cmd/publish-public-ecr-release-tags
  • make test
  • Read-only check against the failed HubSpot candidate image confirmed the raw manifest hash matches the pushed candidate digest.

@gontzess gontzess requested a review from a team June 5, 2026 19:43
@gontzess gontzess force-pushed the gontzess/fix-public-ecr-release-tags branch from 30f88c1 to f2f44d2 Compare June 5, 2026 19:48
@gontzess gontzess force-pushed the gontzess/fix-public-ecr-release-tags branch from f2f44d2 to 3a74beb Compare June 5, 2026 20:14
@gontzess gontzess merged commit 3de8715 into main Jun 5, 2026
2 checks passed
@gontzess gontzess deleted the gontzess/fix-public-ecr-release-tags branch June 5, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants