chore: Unblock the v3-beta release: align the next CLI release with the stamped version and stop release PRs failing the CLI version check#1325
Conversation
Release PRs only contain release-please version stamps for cli/contract.json and cli/internal/tools/default-tools.json, but the check classified those stamps as Go CLI changes and failed because the release PR never bumps MINIMUM_REQUIRED_CLI_VERSION. The reminder is meant for human-authored CLI changes, so detect the release-please--branches--* head branch via GITHUB_HEAD_REF and skip. The architecture test harness now always sets GITHUB_HEAD_REF explicitly because CI inherits the real PR head branch into the test process, which would otherwise trigger the new skip path on release PRs themselves.
Since cli-v3.0.0-beta.24, seven PRs each manually bumped cli/contract.json cliVersion (now 3.0.0-beta.31) and MINIMUM_REQUIRED_CLI_VERSION, but release-please still computes the next CLI release as 3.0.0-beta.25 from its manifest. Releasing that would downgrade the embedded cliVersion below the package's minimum requirement and tell every user to update to a CLI version that does not exist. Pin the cli component to release-as 3.0.0-beta.31 so the release matches the already-stamped contract version. This is a one-shot override: remove it right after cli-v3.0.0-beta.31 is published, or the next release would try to reuse the same version.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughPR adds detection for release-please PR head branches to skip the minimum-version CLI warning/comment check. When a PR's head branch matches the ChangesRelease-Please PR Skip Detection
Release Configuration
🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
build-clicheck: release PRs are now exempt from the CLI minimum version reminder, which is meant for human-authored CLI changes.3.0.0-beta.31so it matches the version already stamped incli/contract.jsonand required by the Unity package.User Impact
cli-v3.0.0-beta.25while the Unity package rejects any CLI older than3.0.0-beta.31and tells users to update to a version that does not exist. Thebuild-clicheck on the release PR also failed, blocking the release.cli-v3.0.0-beta.31, matching what the package requires, and release PRs pass thebuild-clicheck.Background
Since
cli-v3.0.0-beta.24, seven merged PRs each manually bumpedcliVersionincli/contract.json(now3.0.0-beta.31) together withMINIMUM_REQUIRED_CLI_VERSION, but release-please still computes the next CLI version as3.0.0-beta.25from its manifest. The release PR therefore tried to downgrade the stamped versions, which both tripped the minimum-version check and would have produced a broken release.Changes
cli/internal/automation/minimum_version_warning.go: skip the check whenGITHUB_HEAD_REFstarts withrelease-please--, since release PRs only contain release-please version stamps.GITHUB_HEAD_REFexplicitly so CI-inherited values cannot leak into the script under test; added unit and end-to-end tests for the skip.release-please-config.json: one-shot"release-as": "3.0.0-beta.31"for theclicomponent. Remove it right aftercli-v3.0.0-beta.31is published, otherwise the next release reuses the same version.Verification
scripts/check-go-cli.sh(fmt, vet, lint, full test suite): all greenscripts/test-release-please-config.sh,scripts/test-cli-minimum-version-warning-workflow.sh,scripts/test-comment-cli-minimum-version-warning.sh: all green