From 51b9c05c47dc95b8332cd8fabe40dfdcb9eb07c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 2 Jul 2026 15:41:32 +0200 Subject: [PATCH 1/2] GH-50336: [Release][Archery] Fix archery GitHub integration for release scripts --- dev/archery/archery/crossbow/cli.py | 14 ++++++++++---- dev/release/03-binary-submit.sh | 3 +++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dev/archery/archery/crossbow/cli.py b/dev/archery/archery/crossbow/cli.py index 35e0d4d2c022..56c319fe7ef0 100644 --- a/dev/archery/archery/crossbow/cli.py +++ b/dev/archery/archery/crossbow/cli.py @@ -208,7 +208,7 @@ def verify_release_candidate(obj, base_branch, create_pr, for flag, group in zip(verify_flags, verify_groups): if flag: job_groups += f" --group {group}" - response.create_comment( + response.create_issue_comment( f"{command} {job_groups} --param " + f"release={version} --param rc={rc}") @@ -300,6 +300,10 @@ def asset_callback(task_name, task, asset): @crossbow.command() +@click.option('--base-branch', default='main', + help='Set base branch for the PR.') +@click.option('--head-branch', default=None, + help='Set head branch for the PR.') @click.option('--arrow-remote', '-r', default=None, help='Set GitHub remote explicitly, which is going to be cloned ' 'on the CI services. Note, that no validation happens ' @@ -313,7 +317,8 @@ def asset_callback(task_name, task, asset): @click.option('--pr-title', required=True, help='Track the job submitted on PR with given title') @click.pass_obj -def report_pr(obj, arrow_remote, crossbow, fetch, job_name, pr_title): +def report_pr(obj, base_branch, head_branch, arrow_remote, crossbow, + fetch, job_name, pr_title): arrow = obj['arrow'] queue = obj['queue'] if fetch: @@ -322,11 +327,12 @@ def report_pr(obj, arrow_remote, crossbow, fetch, job_name, pr_title): report = CommentReport(job, crossbow_repo=crossbow) target_arrow = Repo(path=arrow.path, remote_url=arrow_remote) - pull_request = target_arrow.github_pr(title=pr_title, + pull_request = target_arrow.github_pr(base=base_branch, head=head_branch, + title=pr_title, github_token=queue.github_token, create=False) # render the response comment's content on the PR - pull_request.create_comment(report.show()) + pull_request.create_issue_comment(report.show()) click.echo(f'Job is tracked on PR {pull_request.html_url}') diff --git a/dev/release/03-binary-submit.sh b/dev/release/03-binary-submit.sh index e3a0fc4ee7a1..7824953945a4 100755 --- a/dev/release/03-binary-submit.sh +++ b/dev/release/03-binary-submit.sh @@ -34,6 +34,7 @@ version_with_rc="${version}-rc${rc}" crossbow_job_prefix="release-${version_with_rc}" release_tag="apache-arrow-${version}-rc${rc}" rc_branch="release-${version_with_rc}" +maint-branch="maint-${version}" : ${ARROW_REPOSITORY:="apache/arrow"} : ${ARROW_BRANCH:=${release_tag}} @@ -57,5 +58,7 @@ job_name=$(archery crossbow latest-prefix --no-fetch ${crossbow_job_prefix}) archery crossbow report-pr \ --no-fetch \ --arrow-remote "https://github.com/${ARROW_REPOSITORY}" \ + --base-branch ${maint_branch} \ + --head-branch ${rc_branch} \ --job-name ${job_name} \ --pr-title "WIP: [Release] Verify ${rc_branch}" From 5cb93789335a046970c222753ad1c0220aed0630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 2 Jul 2026 15:56:08 +0200 Subject: [PATCH 2/2] Fix variable name --- dev/release/03-binary-submit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/release/03-binary-submit.sh b/dev/release/03-binary-submit.sh index 7824953945a4..acd0af5be49b 100755 --- a/dev/release/03-binary-submit.sh +++ b/dev/release/03-binary-submit.sh @@ -34,7 +34,7 @@ version_with_rc="${version}-rc${rc}" crossbow_job_prefix="release-${version_with_rc}" release_tag="apache-arrow-${version}-rc${rc}" rc_branch="release-${version_with_rc}" -maint-branch="maint-${version}" +maint_branch="maint-${version}" : ${ARROW_REPOSITORY:="apache/arrow"} : ${ARROW_BRANCH:=${release_tag}}