[ci] Make ecr authenticate non blocking#40305
Conversation
Signed-off-by: Kevin H. Luu <khluu000@gmail.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Signed-off-by: Kevin H. Luu <khluu000@gmail.com>
Signed-off-by: Kevin H. Luu <khluu000@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request modifies the ecr_login function in the Buildkite image build script to allow the script to continue even if the AWS ECR login commands fail. Feedback suggests replacing the || true suppression with a warning message to ensure that authentication failures are visible in the logs for debugging purposes, rather than being silently ignored.
| aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin "$REGISTRY" || true | ||
| aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 936637512419.dkr.ecr.us-east-1.amazonaws.com || true |
There was a problem hiding this comment.
Using || true to suppress errors from docker login is a risky practice because it masks legitimate failures (e.g., expired AWS credentials, network issues, or missing binaries) that will cause subsequent steps to fail with less descriptive error messages.
Since the goal is to make these logins non-blocking for environments where these registries are not configured, it is better to at least log a warning when the login fails. This provides visibility in the CI logs and aids in debugging if the build fails later due to authentication issues.
| aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin "$REGISTRY" || true | |
| aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 936637512419.dkr.ecr.us-east-1.amazonaws.com || true | |
| aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin "$REGISTRY" || echo "Warning: ECR Public login failed" | |
| aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 936637512419.dkr.ecr.us-east-1.amazonaws.com || echo "Warning: ECR login failed" |
Signed-off-by: Kevin H. Luu <khluu000@gmail.com>
Signed-off-by: Kevin H. Luu <khluu000@gmail.com>
Signed-off-by: Kevin H. Luu <khluu000@gmail.com> Signed-off-by: Avinash Singh <avinashsingh.rcoem@gmail.com>
Signed-off-by: Kevin H. Luu <khluu000@gmail.com> Signed-off-by: Adrian <info@zzit.ch>
Signed-off-by: Kevin H. Luu <khluu000@gmail.com>
There are pipelines that don't configure registry to be the same as CI