breaking change detector in CI report breaking changes when HEAD is not aligned with base branch race condition
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Describe the bug
I noticed that pull request was marked as breaking change when the pr HEAD was behind the base branch
I think this is because of a race condition with actual breaking change that was merged and the `git fetch` that done might include more commits when the workflow started
For example this was marked as breaking change while it was not:
- https://github.com/apache/datafusion/pull/18910#issuecomment-4669787383
>
> Thank you for opening this pull request!
>
> Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).
>
>
> Details
>
> ```
> Cloning apache/main
> Building datafusion-common v54.0.0 (current)
> Built [ 34.581s] (current)
> Parsing datafusion-common v54.0.0 (current)
> Parsed [ 0.060s] (current)
> Building datafusion-common v54.0.0 (baseline)
> Built [ 34.585s] (baseline)
> Parsing datafusion-common v54.0.0 (baseline)
> Parsed [ 0.060s] (baseline)
> Checking datafusion-common v54.0.0 -> v54.0.0 (no change; assume patch)
> Checked [ 0.678s] 223 checks: 221 pass, 2 fail, 0 warn, 30 skip
>
> --- failure inherent_method_missing: pub method removed or renamed ---
>
> Description:
> A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
> ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
> impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/inherent_method_missing.ron
>
> Failed in:
> Dialect::metadata, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/2ef2431ff13538c16aa6ae96950bc1790d384cf9/datafusion/common/src/config.rs:472
> Dialect::available, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/2ef2431ff13538c16aa6ae96950bc1790d384cf9/datafusion/common/src/config.rs:477
>
> --- failure struct_missing: pub struct removed or renamed ---
>
> Description:
> A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
> ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
> impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_missing.ron
>
> Failed in:
> struct datafusion_common::config::DialectInfo, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/2ef2431ff13538c16aa6ae96950bc1790d384cf9/datafusion/common/src/config.rs:329
>
> Summary semver requires new major version: 2 major and 0 minor checks failed
> Finished [ 71.215s] datafusion-common
> ```
>
>
when my pr was behind this commit:
- https://github.com/apache/datafusion/commit/a851dfd9d70d76848bd1e1c26fccba73ad092f39
### To Reproduce
_No response_
### Expected behavior
it should run the breaking change detector for the "merged" ref
### Additional context
I fixed part of the issue before in:
- #22006
Contributor guide
Assessment
This issue has not been assessed yet.