ci: build only affected production images#54
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow now identifies changed production images, builds only affected images, carries unchanged manifests to the new commit, validates all image digests, and uploads a complete immutable image-set artifact. ChangesProduction image release
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant Plan
participant Images
participant CarryForward
participant Release
participant Registry
CI->>Plan: provide completed run and head SHA
Plan->>Plan: compare head SHA with prior successful main SHA
Plan-->>Images: provide changed image matrix
Images->>Registry: build and publish changed images
Plan-->>CarryForward: provide unchanged image list and base SHA
CarryForward->>Registry: retag unchanged manifests to head SHA
Images-->>Release: provide changed image results
CarryForward-->>Release: provide carry-forward results
Release->>Registry: verify image digests
Release-->>CI: upload complete release-images.json
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build-images.yml:
- Around line 49-61: Update the base_sha selection in the Build production
images workflow to validate that the selected successful main-branch commit is
an ancestor of HEAD_SHA using the checked-out repository history. Ignore
non-ancestor candidates and select an eligible ancestor; if none exists or
ancestry validation fails, leave base_sha unset so downstream logic performs a
full rebuild instead of carry-forward.
- Around line 357-364: Update the changed-image decision logic in the workflow
to verify that the base and head image references resolve to the same digest
before recording a carried-forward entry with source_sha="$BASE_SHA". Compare
the digests for sha-$BASE_SHA and sha-$HEAD_SHA, and fail the workflow when they
differ; retain the existing built=true path for images in CHANGED.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0ea7742c-eefb-4b15-8735-8992bd0ae970
⛔ Files ignored due to path filters (2)
docs/increments/active/2026-07-25-production-cicd-zm/design.mdis excluded by!docs/**docs/increments/active/2026-07-25-production-cicd-zm/plan.mdis excluded by!docs/**
📒 Files selected for processing (1)
.github/workflows/build-images.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Deployment contracts
- GitHub Check: Backend · Java 25
🧰 Additional context used
📓 Path-based instructions (1)
.github/**/*.{yml,yaml}
⚙️ CodeRabbit configuration file
.github/**/*.{yml,yaml}: Require least-privilege permissions, explicit release tags for actions,
bounded job timeouts, concurrency cancellation, frozen lockfiles, and no
secrets in pull-request workflows. GitHub Actions are intentionally not
pinned to commit SHAs; Dependabot owns their scheduled version updates.
Files:
.github/workflows/build-images.yml
🧠 Learnings (1)
📚 Learning: 2026-07-24T22:52:57.466Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 40
File: .github/workflows/ci.yml:126-126
Timestamp: 2026-07-24T22:52:57.466Z
Learning: In this repository’s GitHub Actions workflows, the `uses:` field may intentionally reference GitHub Actions by explicit release tags (not immutable commit SHAs) per the project’s OrgMemory policy. Do not flag tag-based `uses:` references as “unpinned” if they are release-tag-based (e.g., `owner/repovX.Y.Z`) and follow the repo’s Dependabot-owned scheduled updates approach.
Applied to files:
.github/workflows/build-images.yml
🪛 zizmor (1.26.1)
.github/workflows/build-images.yml
[warning] 13-13: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment
(undocumented-permissions)
[error] 35-35: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 66-66: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 251-251: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 287-287: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 290-290: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 329-329: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 332-332: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 385-385: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🔇 Additional comments (10)
.github/workflows/build-images.yml (10)
13-13: LGTM!
24-39: LGTM!
136-184: LGTM!
186-195: LGTM!Also applies to: 213-260
279-312: LGTM!
314-326: LGTM!Also applies to: 384-390
50-55: 📐 Maintainability & Code Quality
--workflowmatches the workflow name.
63-69: 📐 Maintainability & Code QualityNo change needed.
dorny/paths-filter@v4.0.2is a valid release, andref+baseare supported inputs for this workflow-run diff.
71-134: 🗄️ Data Integrity & IntegrationContract-only rebuilds only affect
web.
contracts/contains OpenAPI/schema artifacts, and there’s no evidence the backend JVM app image filters consume generated contract sources; restricting these triggers towebavoids unnecessarily rebuildingapi,worker, ormcp.
355-356: 🩺 Stability & AvailabilityNo change needed for this assertion.
jq -e --arg digest "$digest"still runs thejqprogram even when stdin is empty, and the false result exits non-zero as intended for an invalid digest.> Likely an incorrect or invalid review comment.
Outcome
Safety
Verification
Summary by CodeRabbit
New Features
Reliability Improvements