Skip to content

fix: ECR mirroring only overrides existing images#300

Merged
lolgab merged 1 commit into
masterfrom
TAROT-3721
Jun 2, 2026
Merged

fix: ECR mirroring only overrides existing images#300
lolgab merged 1 commit into
masterfrom
TAROT-3721

Conversation

@lolgab
Copy link
Copy Markdown
Contributor

@lolgab lolgab commented Jun 2, 2026

This makes it impossible to delete an image currently in production but the trade-off is that we get an updated DB only if we are using the latest version of Trivy. The experience is not very different from today where we update the latest image and if we are not using it in codacy-tools the update is not actually used by our users, so basically we are not losing anything

@lolgab lolgab requested a review from a team as a code owner June 2, 2026 14:43
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the CircleCI configuration by replacing the force: true parameter with overwrite_only_existing: true in several ECR mirroring steps. It also updates the codacy orb to a development version. The reviewer correctly notes that using a development version of the orb is risky for production workflows and recommends using a stable release version instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .circleci/config.yml Outdated
This makes it impossible to delete an image currently in production but the trade-off is that we get an updated DB only if we are using the latest version of Trivy. The experience is not very different from today where we update the latest image and if we are not using it in codacy-tools the update is not actually used by our users, so basically we are not losing anything
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@codacy-production codacy-production Bot 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 attempts to improve the safety of ECR mirroring by using the 'overwrite_only_existing: true' parameter and updating the 'codacy/base' orb to version 13.0.4. While Codacy's static analysis indicates the code is 'up to standards', a critical functional issue was identified: the use of 'overwrite_only_existing' effectively disables the mirroring of all new releases, as version-specific tags will not yet exist in the destination repository at the time of the push. This creates a significant gap in the implementation of the mirroring process for integration, staging, and production environments.

About this PR

  • The chosen mirroring strategy (overwrite_only_existing: true) is applied across all environment jobs. This suggests a systemic misunderstanding of the parameter's behavior, which will likely block all automated ECR publications of new tags.

Test suggestions

  • Found recommended test scenario: Verify that 'mirror_to_ecr_integration' job uses 'overwrite_only_existing: true'
  • Found recommended test scenario: Verify that 'mirror_to_ecr_staging' job uses 'overwrite_only_existing: true'
  • Found recommended test scenario: Verify that 'mirror_to_ecr_production' job uses 'overwrite_only_existing: true'
  • Found recommended test scenario: Verify that 'codacy/base' orb is updated to 13.0.4
Low confidence findings
  • The CI configuration currently uses a hardcoded Trivy version (v0.70.0). To ensure the 'updated DB' functionality mentioned in the PR description remains effective, this version may require periodic manual updates to maintain compatibility with newer Trivy features.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread .circleci/config.yml
Comment thread .circleci/config.yml
@lolgab lolgab merged commit 34fa49a into master Jun 2, 2026
8 checks passed
@lolgab lolgab deleted the TAROT-3721 branch June 2, 2026 16:02
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