chore(compose): publish canary and sha tags for built services - #110
Conversation
PR SummaryMedium Risk Overview The job resolves image names under Reviewed by Cursor Bugbot for commit e617a0c. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 36 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA new GitHub Actions workflow file is added to build and publish canary Docker images to GitHub Container Registry on every push to the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Coverage SummaryDetailsDiff against mainResults for commit: e617a0c Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/gateway-canary-image.yml (1)
22-22: Use a longer (or full) SHA for the “immutable” tag.Line 22 truncates to 7 chars, which can collide in larger histories. For immutability semantics, prefer full SHA (or at least 12+ chars).
🏷️ Proposed fix
- echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" + echo "short_sha=${GITHUB_SHA::12}" >> "$GITHUB_OUTPUT"Also applies to: 42-42
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/gateway-canary-image.yml at line 22, Replace the 7-character truncation of GITHUB_SHA used for the immutable tag with a longer unique identifier: change the logic that sets short_sha (currently via echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT") to use the full GITHUB_SHA or at least 12+ characters, and update the other occurrence that similarly truncates at line 42; ensure the outputs that reference short_sha (the immutable tag) now use the longer SHA so tag collisions are avoided.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/gateway-canary-image.yml:
- Around line 12-14: Add GitHub Actions concurrency to prevent older builds from
overwriting the :canary tag by adding a concurrency block (either top-level or
inside the build-and-push-gateway job) that sets a unique group (e.g., using
workflow name and branch or "gateway-canary-${{ github.ref }}") and
cancel-in-progress: true; update the build-and-push-gateway job to include this
concurrency key so only the latest run for the same group can complete and older
runs are canceled before they can push the :canary image.
---
Nitpick comments:
In @.github/workflows/gateway-canary-image.yml:
- Line 22: Replace the 7-character truncation of GITHUB_SHA used for the
immutable tag with a longer unique identifier: change the logic that sets
short_sha (currently via echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT")
to use the full GITHUB_SHA or at least 12+ characters, and update the other
occurrence that similarly truncates at line 42; ensure the outputs that
reference short_sha (the immutable tag) now use the longer SHA so tag collisions
are avoided.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 603e27a1-1a00-4f6c-b6da-d46da6076384
📒 Files selected for processing (1)
.github/workflows/gateway-canary-image.yml
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/canary-container-images.yml (1)
29-29: Use a full SHA (or longer prefix) for truly immutable SHA tags.Line 29 uses only 7 chars, which can collide over time; that weakens the “immutable tag” guarantee.
Suggested fix
- name: Resolve image name id: image run: | echo "name=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/${{ matrix.service }}" >> "$GITHUB_OUTPUT" - echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" + echo "full_sha=${GITHUB_SHA}" >> "$GITHUB_OUTPUT" @@ tags: | ${{ steps.image.outputs.name }}:canary - ${{ steps.image.outputs.name }}:sha-${{ steps.image.outputs.short_sha }} + ${{ steps.image.outputs.name }}:sha-${{ steps.image.outputs.full_sha }}Also applies to: 49-49
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/canary-container-images.yml at line 29, The workflow currently writes a 7-character short SHA into GITHUB_OUTPUT using the expression short_sha=${GITHUB_SHA::7}; update this to use a full SHA or a longer prefix (for example use ${GITHUB_SHA} or a 12+ char prefix like ${GITHUB_SHA::12}) so the image tags are truly immutable, and apply the same change to the other occurrence (the similar echo at the later occurrence) so both short_sha assignments use the longer/full SHA.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/canary-container-images.yml:
- Around line 13-17: Add a concurrency block to the GitHub Actions workflow to
prevent older runs from overwriting the :canary tag by ensuring only one run per
branch/workflow can push; specifically add a concurrency configuration under the
build-and-push job (the job named "build-and-push" in the workflow) with a
unique group string using expression values like github.ref or github.workflow
and set cancel-in-progress: true so in-progress older runs are cancelled when a
new run for the same branch starts.
---
Nitpick comments:
In @.github/workflows/canary-container-images.yml:
- Line 29: The workflow currently writes a 7-character short SHA into
GITHUB_OUTPUT using the expression short_sha=${GITHUB_SHA::7}; update this to
use a full SHA or a longer prefix (for example use ${GITHUB_SHA} or a 12+ char
prefix like ${GITHUB_SHA::12}) so the image tags are truly immutable, and apply
the same change to the other occurrence (the similar echo at the later
occurrence) so both short_sha assignments use the longer/full SHA.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c6c1a409-5681-4bfc-a593-3f529adb18f7
📒 Files selected for processing (1)
.github/workflows/canary-container-images.yml
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
e6627f8 to
e617a0c
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Summary
builddefinition:canaryand:sha-<shortsha>tagsValidation
docker compose config --format json+jq