lhotari opened a new pull request #9963:
URL: https://github.com/apache/pulsar/pull/9963


   ### Motivation
   
   [Mailing list 
discussion](https://lists.apache.org/thread.html/r8a72efa166bbb2dad660d958e138139c0cd25041eddfd52705f0de11%40%3Cdev.pulsar.apache.org%3E)
   
   In GitHub Actions, the default way to handle PR builds is to checkout GitHub 
provided merge_commit_sha . 
   
   GitHub's merge_commit_sha is explained in [this 
documentation](https://docs.github.com/en/rest/reference/pulls#get-a-pull-request)
   > Before merging a pull request, the merge_commit_sha attribute holds the 
SHA of the test merge commit.
   
   Behind the scenes, GitHub automatically creates a "test merge commit" that 
merges the PR branch and the target branch (master). A pull request build won't 
be started at all if this test merge commit cannot be created without conflicts.
   
   In Pulsar GitHub Actions workflows, the PR builds happen for the HEAD commit 
on the pull request branch, without a merge to the master branch. The downside 
of the approach used in the existing Pulsar CI is that the PR build won't pick 
up changes made in the master branch. It is required to explicitly rebase or 
merge the master branch to the pull request branch to get the changes. Another 
disadvantage is that there's a higher chance that the PR breaks the master 
branch after the PR is merged.
   The isolated behavior might be seen as a benefit. The PR branch build will 
be only impacted by the changes made in the PR branch. 
   
   This PR is about changing the Pulsar CI PR builds to use the GitHub Actions 
default for checking out the merge_commit_sha for PR builds.
   
   
   ### Modifications
   
   - instead of running the build for PR branch HEAD commit,
     run the commit for GitHub provided merge_commit_sha
   
   - switch pulsar-test-infra/diff-only to dorny/paths-filter
     since diff-only doesn't support the merge commits for PRs and
     paths-filter is a action with wide user base and it's actively
     developed


-- 
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.

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


Reply via email to