Use latest stable release tag for blocking semver checks#22196
Open
kosiew wants to merge 8 commits into
Open
Conversation
- Modified `.github/workflows/breaking_changes_detector.yml`: - Replaced current semver job with an advisory PR-local check. - Introduced a new blocking latest-release check job. - Ensured both jobs retain a green status on semver breaks. - Updated latest stable tag to exclude -* tags. - Updated `.github/workflows/breaking_changes_detector_comment.yml`: - Added downloads for both artifacts. - Adjusted comment to show: - Blocking latest-release signal. - Advisory PR-local signal. - Updated label to track blocking latest-release failure only. - Added issues: documentation for label operations.
- Added `latest-release-tag` functionality to `ci/scripts/changed_crates.sh` - Implemented filtering for only stable semantic version tags and error handling for the absence of stable tags - Updated documentation for `changed_crates.sh` - Enhanced `ci/scripts/test_changed_crates.sh` with new shell tests for: - Stable tags preference over newer release candidates (RC) - Semantic version sorting - Ignoring malformed or namespaced tags - Failing on missing tags - Failing on presence of only RC tags - Updated `.github/workflows/breaking_changes_detector.yml`: - Blocking job now invokes `ci/scripts/changed_crates.sh` for `latest-release-tag` - Artifacts now include `latest_release_tag` - Consolidated duplicated install steps into a local action - Modified `.github/actions/setup-semver-check/action.yml` for shared setup of protobuf and cargo-semver checks - Improved `.github/workflows/breaking_changes_detector_comment.yml` to validate and print the `latest_release_tag`
- Updated `.github/actions/setup-semver-check/action.yml` to centralize: - Fetching PR base branch - Determining changed crates - Installing protobuf - Installing cargo-semver-checks - Added output for packages - Modified `.github/workflows/breaking_changes_detector.yml` to: - Reuse shared action for advisory and blocking jobs - Remove duplicated steps for fetching, changed crates, and installation
- Added `.github/actions/run-semver-check/action.yml` for shared semver run with log teeing and result output. - Added `.github/actions/stage-semver-artifact/action.yml` for shared artifact staging and ANSI stripping. - Updated `.github/workflows/breaking_changes_detector.yml` to use both actions in advisory/blocking jobs and removed duplicate run/stage shell blocks. - Updated `.github/workflows/breaking_changes_detector_comment.yml` by adding local bash helpers: `require_regex`, `require_result`, `write_output`, and `write_multiline_output`, while removing repeated validation/heredoc logic. - Updated `ci/scripts/test_changed_crates.sh` to add `tag_repo`, `assert_latest_release_tag_fails`, and removed duplicate negative-test setup.
82cf5c3 to
0d9ccd1
Compare
- Updated .github/workflows/dev.yml to include a new job that runs ci/scripts/test_changed_crates.sh.
1071ad1 to
0b61961
Compare
…patible semver-check-result uploads and retain new artifacts
This reverts commit 0b61961.
- Renamed sections for clarity: - Changed "Latest release compatibility" to "blocking" - Changed "Base branch compatibility" to "advisory" - Added an interpretation guide: - "base warns + release passes" indicates advisory unreleased API churn - "release warns + base passes" indicates blocking release-user risk
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
The breaking-change detector currently compares API compatibility against the PR base branch, which can produce false-positive semver failures for APIs added and removed on unreleased
main. This change updates the blocking semver baseline to use the latest stable release tag instead, while preserving PR-base comparisons as advisory reviewer signal.What changes are included in this PR?
Split semver checking into two workflows/signals:
Added reusable composite GitHub Actions for:
cargo-semver-checks,Added
latest-release-tagsupport toci/scripts/changed_crates.sh:Updated semver workflow comments and labeling behavior:
auto detected api changelabel,Expanded artifact handling and validation in the comment workflow to support both advisory and blocking results safely.
Preserved existing changed-crate detection behavior against the PR base branch.
Added a temporary legacy artifact path for compatibility with the default-branch comment workflow during rollout.
Are these changes tested?
Yes.
Added
ci/scripts/test_changed_crates.shcovering:Are there any user-facing changes?
Yes.
Pull request semver comments now distinguish between:
The
auto detected api changelabel is now applied only for failures against the latest stable release baseline.LLM-generated code disclosure
This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed and tested.