Repository navigation
Conversation
4b8ed1c to
c34e788
Compare
|
|
a681b72 to
8af40b8
Compare
96ffdb2 to
3a6799e
Compare
3a6799e to
65e2f5a
Compare
65e2f5a to
36ac2dd
Compare
256db9b to
f1c623f
Compare
f1c623f to
423b612
Compare
423b612 to
227840b
Compare
227840b to
1725e0f
Compare
1725e0f to
f37b26b
Compare
|
@Reranko05 What do you think about this? (Note this is a stacked PR, the actual change is only f37b26b). |
Reranko05
left a comment
There was a problem hiding this comment.
I haven't looked too deeply into the logic, but I left a couple of minor documentation suggestions. Nothing major!
(Although this doesn't apply to me just yet, hopefully it will someday 😅)
Reranko05
left a comment
There was a problem hiding this comment.
LGTM! I looked through the workflow changes, and nothing stands out to me :)
Document the "Squash and merge" button as the way to merge pull requests. The merge script is still available. Before the merge, the "PR Title" status of the Boring Cyborg app is a required status check on main: the pull request title must start with "GH-XXX" or "MINOR: ". The required check rejects direct pushes to main, so the release guide tells release managers to bump versions with a pull request. After the merge, a workflow for pushes to main assigns the issue to the pull request author if it isn't assigned, sets its milestone, closes it and comments which pull request resolved it.
34ba758 to
7c60120
Compare
The "PR Title" check no longer accepts "WIP: GH-XXX" titles. They passed the required check but the "Dev PR merged" workflow ignored them, so the issue stayed open after the merge. dev/release/post-10-bump-versions.sh no longer pushes to main or creates the dev tag by default because the push is rejected by the required check.
There was a problem hiding this comment.
We will stop having the signed-off-by trailer on the git commit messages. This will stop working right?
arrow/dev/release/post-04-website.sh
Lines 78 to 82 in dd7dfc6
| required_status_checks: | ||
| # Don't require branches to be up to date before merging. | ||
| strict: false | ||
| # The title check ("verifyTitles") of the Boring Cyborg app | ||
| # in .github/boring-cyborg.yml. The merge button is disabled | ||
| # while the pull request title doesn't start with "GH-XXX" | ||
| # or "MINOR: ". | ||
| contexts: | ||
| - PR Title |
There was a problem hiding this comment.
I think this is too restrictive and eventually there will be a time where this fails (cyborg-app is down) we have to push an expedited thing... I am sure we can't foresee it now but will happen and I'd rather not have this as a required status check. Removing this allows us to remove the changes on release bump scripts etcetera.
There was a problem hiding this comment.
I agree boring-cyborg glitching occasionally is likely and not having this button will be annoying.
However gating the merge button here guarantees bad titles don't get merged. How problematic are bad titles for us? Should we have somesort of post merge change?
There was a problem hiding this comment.
I expect committers to do a quick check same as linter CI etc. I don't think is worst than linting failing or breaking other CI jobs tbh
| need to push the commits to a branch, create a pull request from the | ||
| branch with a | ||
| ``MINOR: [Release] Update versions for NEXT_X.NEXT_Y.NEXT_Z-SNAPSHOT`` | ||
| title and merge it: |
| : ${BUMP_PUSH:=0} | ||
| : ${BUMP_TAG:=0} |
| titleRegexp: '^(WIP:?\s*)?GH-[0-9]+|^MINOR: ' | ||
| # "PR Title" is a required status check of main in .asf.yaml. A | ||
| # "WIP: GH-XXX: ..." title must not pass: it blocks the merge until | ||
| # "WIP: " is removed. |
There was a problem hiding this comment.
Comments are not really necessary, if we don't allow WIP :)
| pull_request=$( | ||
| gh api "repos/${GH_REPO}/commits/${COMMIT}/pulls" \ | ||
| --jq "map(select(.merge_commit_sha == \"${COMMIT}\"))[0] // empty") | ||
| if [ -z "${pull_request}" ]; then | ||
| echo "${COMMIT} isn't the merge commit of a pull request." | ||
| exit 0 | ||
| fi | ||
| title=$(jq -r .title <<< "${pull_request}") | ||
| if [[ ! "${title}" =~ ^GH-([0-9]+) ]]; then | ||
| echo "No GitHub issue in the title: ${title}" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
we can extract it from the commit message instead of playing with the PR, feels more natural and we avoid http requests to GH API here.
Rationale for this change
Committers need a personal access token and
dev/merge_arrow_pr.pyto merge a pull request. With this change they can use the "Squash and merge" button instead, like apache/arrow-rs does.The merge script also checks the pull request title and updates the issue. A required status check does the first before the merge and a new workflow does the second after the merge.
What changes are included in this PR?
Before the merge:
.asf.yaml: the "PR Title" status of the Boring Cyborg app (GH-55473: [Dev] Add boring-cyborg app configuration and remove dev_pr.yml workflow #55474) becomes a required status check ofmain. The merge button is disabled unless the pull request title starts withGH-XXXorMINOR:..github/boring-cyborg.yml: the title check no longer acceptsWIP: GH-XXXtitles, so a WIP title blocks the merge.After the merge:
.github/workflows/dev_pr_merged.yml(new): runs on pushes tomain. If the pushed commit is the merge commit of aGH-XXX: ...pull request, it:It does nothing for
MINOR: ...pull requests. It's a singleghstep without a checkout, custom scripts or third-party actions. It uses thepushevent because the ASF GitHub Actions policy disablespull_request_targetfor ASF repositories.Release:
dev/release/post-10-bump-versions.sh: the required check rejects direct pushes tomain, so the script no longer pushes tomainor creates the dev tag by default (BUMP_PUSHandBUMP_TAGdefault to 0). This is the only direct push tomainin the release scripts, the workflows, the Crossbow tasks and Archery.docs/source/developers/release.rst: the "Bump versions" step now says to create aMINOR: [Release] ...pull request from the commits of the script and to tag the merged commit by hand.Documentation:
dev/README.md,docs/source/developers/overview.rst,docs/source/developers/continuous_integration/overview.rst: describe the merge button and the new workflow. The merge script is documented as still available.Not changed: the merge script and the merge button settings (apache/arrow already allows only squash merges with the pull request title and description as the commit message).
Known limitations
maindepends on the Boring Cyborg app. If it stops reporting "PR Title", nothing can be merged, including a pull request that removes the requirement..asf.yamlaccepts the status from any source, but posting it by hand as a committer has not been tried.[Component]and a missing:pass. Nothing checks before the merge that the issue exists and is open: the workflow updates the issue that the title names, even if it's already closed.Authored-by:/Signed-off-by:trailers (GitHub addsCo-authored-by:). "Patch Committers" in the release announcement countsSigned-off-by:indev/release/post-04-website.sh, so it needs a follow-up. The merge script removes HTML comments and CI directives from the description; with the button the committer has to do it in the merge dialog.[skip ci]: GitHub doesn't run the new workflow for a merge commit with a CI directive in its message (4 of the last 2000 commits onmain). The committer must remove the directive in the merge dialog or close the issue manually.BUMP_PUSH=1still fails at the push.Are these changes tested?
Only locally:
The workflow and the required check can only run once this is on
main. The manual release steps in the guide have not been tried.Are there any user-facing changes?
No. For contributors, a
WIP: GH-XXXtitle now gets a failing "PR Title" status untilWIP:is removed.Was AI used for this PR?
PR code and description written by:
Reviewed before submission by: