Decouple PR comment workflow from semver check and install protoc for cargo-semver-checks#21951
Closed
kosiew wants to merge 2 commits intoapache:mainfrom
Closed
Decouple PR comment workflow from semver check and install protoc for cargo-semver-checks#21951kosiew wants to merge 2 commits intoapache:mainfrom
kosiew wants to merge 2 commits intoapache:mainfrom
Conversation
…er and improve artifact handling - Install protobuf-compiler before cargo-semver-checks in the check-semver job. - Store semver results, PR number, and logs in an artifact instead of commenting directly on the PR. - Change artifact handoff to default to success only for the "no changed crates" case. - Add breaking_changes_comment.yml to manage PR comments based on workflow_run triggers. - Ensure comment workflow is gated to successful upstream runs, preventing comments on cancelled or failed detector runs.
- Update `.github/workflows/breaking_changes_comment.yml` to derive `PR_NUMBER` from `github.event.workflow_run.pull_requests[0].number` and remove reliance on `pr_number.txt`. Added validation for `CHECK_RESULT` to ensure it is one of `success`, `failure`, or `error`. - Modify `.github/workflows/breaking_changes_detector.yml` to stop writing `pr_number.txt` into the artifact.
Member
|
Duplicate of #21913 |
Member
|
Closing as this was fixed, sorry for the trouble |
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 existing PR comment step was part of the
pull_requestworkflow, which caused failures for forked PRs due to restrictedGITHUB_TOKENpermissions (read-only). This resulted in403 Resource not accessible by integrationerrors when attempting to post comments. I encountered this while working on #21917.Additionally, updates to Cargo metadata can trigger
cargo-semver-checksto build with all features enabled, pulling in dependencies (e.g., Substrait) that requireprotoc. Without installingprotoc, the semver check environment may fail to build.This change improves both reliability and security by ensuring the workflow environment matches build requirements and by running comment updates in a context with appropriate permissions.
What changes are included in this PR?
workflow_run-based workflow to handle PR comment updates after the semver check completes.pull_requestworkflow.workflow_runpayload instead of storing it in artifacts.protocin the semver check job when needed to support builds requiring protobuf.Are these changes tested?
No additional tests are included. These changes affect CI workflows and are validated through workflow execution.
Are there any user-facing changes?
No user-facing changes. These updates only affect CI behavior and internal workflow execution.
LLM-generated code disclosure
This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed and tested.