ci: pin branch-built images into the chart on release-* branches (#1994) - #2097
Conversation
|
Warning Review limit reached
Next review available in: 14 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between fa5f7b864e3ef6ba385c7c0f239d4f965b834574 and 4043fda. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow now builds images for ChangesRelease branch publishing
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 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: 1
🤖 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:
- Line 988: Update the release-gating conditions at the referenced workflow
checks, including the expressions near the main/release jobs, to match full
branch refs only: permit refs/heads/main or refs/heads/release-.* and reject tag
refs. Replace github.ref_name-based release matching with github.ref checks
while preserving the existing main-branch allowance.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 793602f2-c7ba-4e4e-99db-56d83e2c09b0
📥 Commits
Reviewing files that changed from the base of the PR and between b908f1c and fa5f7b864e3ef6ba385c7c0f239d4f965b834574.
📒 Files selected for processing (1)
.github/workflows/build-images.yml
…structorfabric#1994) Manual branch image builds (constructorfabric#1994 Phase 1) push branch-suffixed tags but nothing pins them: bump-descriptors and publish-chart were hard-gated to main, and the descriptor auto-commit could not re-trigger the workflow on a release branch (on.push covered main only). - trigger build-images on push to release-** (paths-filtered, same as main) so the bump-descriptors commit re-triggers the run that rebakes toolbox and performs the deferred chart publish - give dorny/paths-filter base=ref_name so release-branch pushes diff against the previous push instead of against main - open the bump-descriptors and publish-chart ref gates to release-* - accept the branch-suffixed build-tag shape in the umbrella appVersion check on non-main refs; main keeps the strict suffix-less regex as the backstop against branch tags leaking into main-published charts The umbrella version bump stays patch-only. Release-branch chart versions remain inside the minor stream the branch was cut with (trunk minor-bumps right after cutting a release branch), so the two publish streams cannot collide on the OCI registry. The latest image tag stays main-only. Refs constructorfabric#1994 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Anton Zelenov <antonz@constructor.tech>
startsWith(github.ref_name, 'release-') also matches a TAG named
release-*: a workflow_dispatch on such a tag would pass the
bump-descriptors/publish-chart gates and then run branch-oriented
git push HEAD:${GITHUB_REF_NAME} against a tag ref. Match the full
refs/heads/release- prefix instead, and select the umbrella appVersion
regex from $GITHUB_REF for the same reason.
Reported by coderabbitai on constructorfabric#2097.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Anton Zelenov <antonz@constructor.tech>
fa5f7b8 to
4043fda
Compare
) Manual equivalent of the publish-chart job, which does not yet run on release branches (CI gap, being fixed separately in #2097): pin the branch-built image tags into the subchart appVersions + the toolbox ref, and patch-bump the umbrella version so the chart carrying the identity-resolution seed CronJob template (#2046 backport) can be published and consumed from gitops. - backend subcharts + toolbox: 2026.07.31.06.52-bf09d6a.release-2026.07.1 - frontend subchart: 2026.07.31.06.52-0bb785c.release-2026.07.1 - umbrella: 0.4.68 -> 0.4.70 (appVersion = max subchart appVersion) Signed-off-by: Anton Zelenov <antonz@constructor.tech> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…) (#2097) (#2115) Backport of the #2097 merge (523ea77) to release-2026.07.1. Required on the branch itself: push-event workflows run the workflow file from the pushed ref, so the release branch needs the release-** triggers and the widened publish gates locally for chart publishing to fire here. (cherry picked from commit 523ea77) Signed-off-by: Anton Zelenov <antonz@constructor.tech> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
What
Completes the release-branch half of #1994: a build on a
release-*branch now pins the freshly pushed branch-suffixed images into the chart and publishes it with a patch-only umbrella version bump. This is collision-safe because trunk's minor version is bumped right after a release branch is cut, so the branch'sx.y.Zpatch stream and main's stream never overlap on the OCI registry.Why nothing was pinned before
bump-descriptorsandpublish-chartwere hard-gatedgithub.ref == 'refs/heads/main'.bump-descriptorscommits without[skip ci]and relies on the resulting push re-triggering the workflow (toolbox rebake with patched descriptors + deferredpublish-chart) — buton.pushonly coveredmain, so on a release branch that follow-up run never fires.appVersionsanity regex deliberately rejects the branch-suffixed tag form.Changes
on.push/on.pull_request: addrelease-**— release-branch pushes get the same paths-filtered build → pin → publish machinery as main, and thebump-descriptorsauto-commit re-triggers the workflow exactly like it does on main.dorny/paths-filtergetsbase: ${{ github.ref_name }}— without it, dorny diffs a release-branch push against the repo default branch and marks every service changed on every push. Withbase=ref_namethe per-push diff semantics main has always had apply to release branches too. (Ignored onpull_request; onworkflow_dispatchit yields no-diff, same as today — dispatch builds fire via the full-rebuild condition.)bump-descriptors/publish-chartwidened tomain || startsWith(ref_name, 'release-').appVersionregex: non-main refs accept the branch-suffixed tag shape (YYYY.MM.DD.HH.MM-sha7.<branch>);mainkeeps the strict suffix-less regex as the backstop against branch tags leaking into main-published charts.Unchanged:
latestimage tag stays main-only; PR runs still build without pushing; umbrella bump is patch-only (existing behavior).Resulting flow on a release branch
gh workflow run build-images.yml --ref release-YYYY.MM.N(full rebuild) → all images pushed with.release-YYYY.MM.N-suffixed tags →bump-descriptorspins connector descriptors + service subchart appVersions and commits → that push re-triggers → toolbox rebakes,publish-chartbumps the umbrella patch version and publishesoci://ghcr.io/constructorfabric/charts/insight:<x.y.Z+1>.frontend_tag=<tag>pins the frontend subchart without rebuilding backends (the cross-repo auto-dispatch from insight-front remains main-only).Notes
version:bumps stay minor on release branches (per ADR-0015 the minor bump drives catalog re-discovery without a full refresh — same rationale as main; descriptor versions are compared per-environment, not across chart streams).release-*branch may build everything once (paths-filter can't diff an initial push) — that gives the branch its own tagged image baseline, which is desirable.release-*branches carry no branch protection, so the App-token auto-commits push cleanly.Refs #1994
🤖 Generated with Claude Code
Summary by CodeRabbit
latesttag and strict version validation.