feat: auto-merge chart release and support release-v* hotfixes - #809
bhaveshpatel640 wants to merge 12 commits into
Conversation
|
9000ce8 to
0fed4d4
Compare
|
Dependant PR: https://github.com/truefoundry/helm-charts/pull/6407 Today, after npm publishes, someone still has to manually merge the chart bot PR before the Helm chart hits OCI. This PR finishes that path automatically, and adds hotfix branches so you can patch an old line without taking everything on tip of Normal release (
No human merge of the chart PR once the bot ruleset bypass exists. Hotfix (
Chart SemVer is line-local. Each line advances on its own.
Release order
gh workflow run release-start.yml \
-f kind=hotfix -f repositories='[]' -f chart_only=true \
-f trueforge_chart_version=<chart-semver>
Off-cycle hotfix only git fetch origin
git checkout -b release-vX.Y.Z <shipped-sha> # or charts/trueforge@A.B.C
git push -u origin release-vX.Y.Z
# cherry-pick fix + changeset → Version Packages on release-v* → Release → pin helm-chartsThe chart stays on that line ( |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 91c1b90. Configure here.
| if [[ -n "$PRERELEASE" && "$tag" == "$STABLE" ]]; then | ||
| printf '%s\n' "$STABLE" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
Stable floor ignores later patch tags
Medium Severity
When Chart.yaml is still an RC, seeing the same-core stable tag makes highest-chart-tag-on-line.sh print that stable version and exit, so later X.Y.* tags are never considered. resolve-chart-version.sh then bumps only one step from that floor, so a stale cut (npm SHAs keep RC Chart.yaml because the chart bump lands on a later bot commit) can reuse an already-published tag and release-chart.yml refuses to move it.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 91c1b90. Configure here.


Summary
Automate the post-npm chart path (wait for CI → squash-merge chart bot PR → OCI) and enable
release-v*hotfix branches so patches do not have to ship from tip ofmain.Chart SemVer is line-local: each RC cycle / stable
X.Yline advances on its own. Hotfixes stay on that line instead of jumping to whatevermainis publishing.Closes AGE-2276
Diff
Before: Version Packages → npm → chart bot PR → human merge → chart OCI
After: Version Packages → npm + image → chart bot PR → auto-merge after CI → chart OCI
Hotfix: cut
release-v*from a shipped SHA /charts/trueforge@*→ cherry-pick + changeset → same Release lane on that branch (chart PR base = the release branch). Then pin control plane with helm-chartstrueforge_chart_version=<chart SemVer>(helm-charts#6407).Chart SemVer examples
main0.2.0-rc.140.2.0-rc.150.2.0-rc.3, tags already at0.2.0-rc.100.2.0-rc.11(same RC line)0.2.0-rc.*, tag0.2.0already published0.2.0→0.2.1(does not retag0.2.0)0.2.0-rc.14+ stable app0.2.00.2.0;mainon0.3.0-rc.*0.2.1(not0.3.0-rc.*)Admin prerequisite (Pending)
Limited ruleset bypass for
trueforge-dev-botonly (app id4591571). No admin PAT. Required for auto-merge; without it the bot PR opens but squash-merge is blocked.pull_request— merge via PR only; no direct pushcheckon a no-bypass rulesetrelease-branch-protection(release-v*)Changes
release.ymlalso runs onrelease-v*; passesmerge_chart_pr: trueinto the chart workflowbuild-and-prepare-chart-release.yml:mainor the currentrelease-v*release-chart/trueforgevsrelease-chart/trueforge-<release-v*>merge_chart_pr; defaulttruefrom Release /falseon manual dispatch)max(Chart.yaml, highest tag on the same SemVer line)viascripts/highest-chart-tag-on-line.sh(RC line includes same-core stable)queue: max); wait forcharts/trueforge@*tag before the next runrelease-chart.yml: publish on chart-bot PR merges intomainorrelease-v*RELEASING.md: automated OCI lane, hotfix branch flow, line-local SemVer, limited bot bypasspnpm test:chart-version: covers resolve + line-local tag pickerHow was this tested?
sleep 20beforegh pr checks --watch)pnpm test:chart-version(resolve-chart-version + highest-chart-tag-on-line)pnpmsuite not required for this workflow/docs-only PRChecklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,python/trueforge_sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Changes release automation (bot squash-merge, branch rules, tag baseline) and expands npm/PyPI/chart triggers to
release-v*; misconfiguration of bot ruleset bypass or SemVer logic could block or mis-tag releases.Overview
Automates the post-npm chart path: after opening the chart bot PR, the workflow can wait for CI, squash-merge, and block until
charts/trueforge@*exists (newmerge_chart_prinput; Release passestrue, manual dispatch defaults tofalse).Release and chart publish now run on
release-v*hotfix branches, not onlymain. Chart bot PRs targetmainor the hotfix branch, with separate heads (release-chart/trueforgevsrelease-chart/trueforge-<release-v*>) so parallel lanes do not clobber each other.release-chart.ymlaccepts merges of those bot branches intomainorrelease-v*.Chart SemVer bumping floors on
max(Chart.yaml, highest published tag on the same line)via newscripts/highest-chart-tag-on-line.sh(RC lines include same-core stable; stableX.Y.*hotfixes ignore newer majors/RCs). Chart open/merge is globally serialized (queue: max); workflow concurrency is scoped per ref.Docs and
pnpm test:chart-versionupdated for the hotfix flow and line-local versioning.Reviewed by Cursor Bugbot for commit 91c1b90. Bugbot is set up for automated code reviews on this repo. Configure here.