ci: add breaking change detector#21499
Conversation
There was a problem hiding this comment.
Added to here so I can test it
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Resolved all comments and verified in my fork: |
…1869) ## Which issue does this PR close? N/A ## Rationale for this change this is done so we can query cargo metadata alone to find only user facing crates and to use cargo metadata to find user facing crates when searching for breaking changes in pr as suggested here: - apache#21499 (comment) ## What changes are included in this PR? set `publish = false` for: 1. `datafusion-benchmarks` 2. `datafusion-wasmtest` 3. `test-utils` ## Are these changes tested? I verified that these are not already published to crates.io and not in `dev/release/README.md` _Publish on Crates.io_ list ## Are there any user-facing changes? No
|
@mbutrovich can you please re-review |
Jefffrey
left a comment
There was a problem hiding this comment.
Does the check show as a red X when it detects a breaking change?
|
Yes |
Is it possible to not fail then? Since this is meant to provide a useful comment for reviewers, so having it fail because of a breaking API change being detected could be confusing to PR authors |
|
done |
Jefffrey
left a comment
There was a problem hiding this comment.
I think would be a good idea to try this out for a bit
|
This looks cool -- thank you This new check is now failing on https://github.com/apache/datafusion/actions/runs/25101909134/job/73651896105?pr=21828 It is not clear from the failure how to resolve the problem (aka how to get the CI to pass after acknowledging the API change) Is is possible to put some instructions for what to do on failure, for example similar to this: datafusion/.github/workflows/rust.yml Lines 66 to 69 in 9a1ed57 ? |
|
🤔 the failure on this PR seems like a false positive: This check is failing: |
|
The CI checks of #21854 started failing due to this new workflow but the error looks like missing permissions: |
|
There is a pr related to this #21913 |
…protobuf (apache#21913) ## Which issue does this PR close? - apache#21911 ## Rationale for this change The breaking-change detector added in apache#21499 fails on fork PRs with HTTP 403: > The GITHUB_TOKEN has read-only permissions in pull requests from forked repositories. > > From [GitHub Docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request) A read-only token can't post the sticky comment, so the workflow errors out at the `gh api … POST /comments` call. We can't switch to `pull_request_target` either - ASF infra policy forbids it for any workflow exposing `GITHUB_TOKEN` (https://infra.apache.org/github-actions-policy.html), and `cargo-semver-checks` compiles fork-controlled code (`build.rs`, proc macros) anyway, so granting it a write token would be unsafe. ## What changes are included in this PR? Split the comment posting into a companion `workflow_run` workflow: - `breaking_changes_detector.yml` keeps the `pull_request` trigger but only stages the result (`pr_number`, `result`, `logs`) and uploads it as an artifact. No write token, no comment posting from this workflow. - `breaking_changes_detector_comment.yml` triggers on `workflow_run`, runs in the base-repo context with `pull-requests: write`, downloads the artifact, validates the inputs, and upserts/deletes the sticky comment via `actions-cool/maintain-one-comment`. Never checks out PR code. The comment workflow uses a runtime-randomized heredoc delimiter when piping the fork-controlled logs into `$GITHUB_OUTPUT`, to stop log content from closing the heredoc early and overwriting the validated `result` output (or injecting other keys). Drops the now-unused `comment` subcommand from `ci/scripts/changed_crates.sh`. ---- also installed protobuf as noticed this failed when building subtrait in: - apache#15591 ## Are these changes tested? No, cant really test it ## Are there any user-facing changes? No --------- Co-authored-by: Dmitrii Blaginin <dmitrii@blaginin.me> Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
|
The fix is merged, sorry for the trouble |
Which issue does this PR close?
Partially closes:
Rationale for this change
detect breaking changes
What changes are included in this PR?
add new github workflow
Are these changes tested?
Looks like it is working
Are there any user-facing changes?
no