neilconway opened a new pull request, #26604:
URL: https://github.com/apache/datafusion/pull/26604

   ## Which issue does this PR close?
   
   - N/A
   
   ## Rationale for this change
   
   The semver check previously compared the PR against the current state of 
`apache/main`, and did so by doing a full `git` checkout, including the entire 
repository history. This approach has two downsides:
   
   1. It is expensive: cloning the entire repo history takes ~9 sec locally, 
versus ~0.7 for a shallow checkout.
   2. There's a race condition which results in comparing the PR against the 
wrong base when assessing whether the PR breaks semantic versioning.
   
   On (2): when a PR is opened or updated, GitHub creates a test merge commit 
that merges the PR into main as of that moment (T0). Now suppose that there is 
a delay between the CI jobs being queued and the semver job actually running, 
so that when the semver job runs, `HEAD` is now at T1. The previous version of 
this check would compare the PR with T1, not T0. For example, if a commit 
between T0 and T1 added a new API, the semver check would claim that the PR 
_removes_ that API.
   
   Fix this by comparing the merge commit with its first parent instead, which 
is T0 in the notation above.
   
   ## What changes are included in this PR?
   
   See above.
   
   ## What is the testing strategy for this PR?
   
   CI / dev tooling change only. Manually tested locally on a few different PRs.
   
   ## Are there any user-facing changes?
   
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to