Skip to content

PREQ-10549 Authenticate to ECR Public before building the release action image - #448

Merged
julien-carsique-sonarsource merged 1 commit into
masterfrom
chore/jcarsique/PREQ-10549-ecrPublicLoginBeforeRelease
Nov 20, 2026
Merged

julien-carsique-sonarsource merged 1 commit into
masterfrom
chore/jcarsique/PREQ-10549-ecrPublicLoginBeforeRelease

Conversation

@julien-carsique-sonarsource

@julien-carsique-sonarsource julien-carsique-sonarsource commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PREQ-10549 Authenticate to ECR Public before the release action image is built.

The reusable workflow runs ./gh-action_release/main as a local Docker action. The runner builds main/Dockerfile inside that step, and both FROM public.ecr.aws/docker/library/python pulls are anonymous, so they share the per-IP data quota of the GitHub-hosted runners and fail with 429 Data limit exceeded when it is exhausted. This adds an aws-actions/amazon-ecr-login step (registry-type: public, pinned to the v2.2.0 commit) before the Release step, so the pulls are authenticated against the AWS account.

Depends on an IAM change: ReleasbilityChecksCICDRoleV2 currently grants only SNS/SQS actions. It needs ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken, defined in SonarSource/sonarsource-iam (https://github.com/SonarSource/sonarsource-iam/pull/2500). Do not merge before that change is applied: the login step would fail every release.

Scope: this covers the main image built through main.yaml. The aws-s3 action used by javadoc-publication.yaml is a remote Docker action, built during job setup before any step, so a login step cannot reach it; it stays exposed until the image is prebuilt (BUILD-13191).

Validation: dry-run on a dummy project once the IAM change is applied; the run link will be added here.

…ion image

The release job builds main/Dockerfile from a local action, which pulls its
python base image from public.ecr.aws anonymously. Anonymous pulls share the
per-IP data quota of the GitHub-hosted runners and fail with 429 when it is
exhausted. Log in to ECR Public before the Release step so the pull is
authenticated against the AWS account instead.

Requires ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken on
ReleasbilityChecksCICDRoleV2.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

PREQ-10549

@datadog-sonarsource

datadog-sonarsource Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6872541 | Docs | View more details | Give us feedback!

@gitar-bot

gitar-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

The ECR Public login requires IAM permissions absent from the described role, so releases could fail until that dependency is applied.

Adds an aws-actions/amazon-ecr-login step with registry-type: public before the Release step so the public.ecr.aws/docker/library/python base image pulls in main/Dockerfile are authenticated and no longer hit anonymous per-IP rate limits. No issues found.

Verification Rules 3/3 met Repos 11 inspected · PRs 1 inspected

Functional validation No results

Rules 3 passed 1 not applicable

✅ Approved GitHub Actions runners
✅ Internal artifact registries
✅ Repository license compliance

Broader impact Repos 11 inspected PRs 1 inspected
Cross-repo 11 repositories inspected 0 open impacts

SonarSource/sonar-packaging-maven-plugin Inspected
SonarSource/sonar-dummy-python-oss Inspected
SonarSource/sonar-scanner-python Inspected
SonarSource/license-headers Inspected
SonarSource/sonar-classloader Inspected

6 more repositories

Cross-PR 1 PR inspected 0 open impacts

PR 438: Update GitHub actions (major) Inspected

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

@julien-carsique-sonarsource
julien-carsique-sonarsource marked this pull request as ready for review November 18, 2026 16:42
@julien-carsique-sonarsource
julien-carsique-sonarsource requested a review from a team as a code owner November 18, 2026 16:42
@julien-carsique-sonarsource
julien-carsique-sonarsource merged commit e24b51e into master Nov 20, 2026
39 of 41 checks passed
@julien-carsique-sonarsource
julien-carsique-sonarsource deleted the chore/jcarsique/PREQ-10549-ecrPublicLoginBeforeRelease branch November 20, 2026 10:36
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