Skip to content

GH-50811: [Release] Use maint-Major.Minor.x for patch releases as the maintenance branch on required release scripts - #50813

Open
raulcd wants to merge 5 commits into
apache:mainfrom
raulcd:GH-50811
Open

GH-50811: [Release] Use maint-Major.Minor.x for patch releases as the maintenance branch on required release scripts#50813
raulcd wants to merge 5 commits into
apache:mainfrom
raulcd:GH-50811

Conversation

@raulcd

@raulcd raulcd commented Aug 5, 2026

Copy link
Copy Markdown
Member

Rationale for this change

When working with patch releases currently the maintenance branch used is not correct and the scripts for 02-source and 03-binary fail to create the PR or find it.

What changes are included in this PR?

Use the correct maintenance branch format taking into account the differences between major releases and patch releases.
Updated release documentation to make it clearer that only the maint-X.Y.x branch is used for patch releases.

Are these changes tested?

I've validated the modified shell script and the cut commands. I haven't used them directly as the RC PR and jobs are already created.
I've validated no other scripts use the maintenance branch.

Are there any user-facing changes?

No

Copilot AI lite review requested due to automatic review settings August 5, 2026 09:16
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #50811 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Ready to approve

The change directly addresses the reported release-branch selection bug with a small, low-risk update to the release scripts and aligned documentation.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Fixes Arrow release tooling/docs so patch releases use the correct maintenance branch naming (maint-Major.Minor.x) instead of a version-specific branch (maint-X.Y.Z), preventing RC verification PR creation failures for patch releases (GH-50811).

Changes:

  • Update 02-source.sh to compute the maintenance branch as maint-X.Y.x for patch releases and maint-X.Y.0 for minor releases.
  • Update 03-binary-submit.sh with the same maintenance-branch selection logic for Crossbow PR reporting.
  • Clarify release documentation to state patch releases use maint-X.Y.x and are based on the previous release tag.
File summaries
File Description
docs/source/developers/release.rst Documents patch-release maintenance branch naming (maint-X.Y.x) and creation basis.
dev/release/02-source.sh Uses maint-X.Y.x for patch releases when creating the RC verification PR.
dev/release/03-binary-submit.sh Uses maint-X.Y.x for patch releases when reporting packaging jobs to the RC PR.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread dev/release/02-source.sh
Comment on lines +44 to +51
patch_version=$(echo ${version} | cut -d. -f3)
if [ "${patch_version}" -eq 0 ]; then
maint_branch="maint-${version}"
else
# Patch releases use the maint-Major.Minor.x branch.
major_minor_version=$(echo ${version} | cut -d. -f1-2)
maint_branch="maint-${major_minor_version}.x"
fi

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary, wrong versions would have also failed previously.

Comment on lines +38 to +45
patch_version=$(echo ${version} | cut -d. -f3)
if [ "${patch_version}" -eq 0 ]; then
maint_branch="maint-${version}"
else
# Patch releases use the maint-Major.Minor.x branch.
major_minor_version=$(echo ${version} | cut -d. -f1-2)
maint_branch="maint-${major_minor_version}.x"
fi
Comment on lines 172 to +176
# X.Y.Z corresponds with the Major, Minor and Patch version number
# of the release respectively. As an example 9.0.0
archery release cherry-pick X.Y.Z --execute
# Push the maintenance branch to the remote repository
git push -u upstream maint-X.Y.Z
git push -u upstream <maintenance-branch>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's necessary either.

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Aug 5, 2026

@tadeja tadeja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uff, probably fine, yeah? (as I'm really not versed with all this, and even the beaten up 🤖 agrees there's nothing crucial to add)
Just some cosmetic doc suggestions below, but not required for this PR.

Comment thread docs/source/developers/release.rst Outdated
Comment thread docs/source/developers/release.rst Outdated
Comment thread docs/source/developers/release.rst Outdated
Co-authored-by: tadeja <tadeja@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 5, 2026 13:04
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documentation updates include a duplicated checklist step and broken RST structure/indentation in the patch-release merge dropdown that should be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (2)

docs/source/developers/release.rst:202

  • The “test before creating a release candidate” checklist now has two consecutive bullets for creating a PR; the first still references maint-X.Y.Z, which conflicts with the new <maintenance-branch> placeholder and reads as a duplicated step.
* Create a pull request from the up-to-date maint-X.Y.Z branch onto main
* Create a pull request from the up-to-date ``<maintenance-branch>`` onto main
* Title the pull request "WIP: Dummy PR to check <maintenance-branch> status"

docs/source/developers/release.rst:358

  • The added “maint-X.Y.x” merge instructions are not indented under the dropdown, which will break the RST structure, and the earlier code-block lost its final git push command. Since this dropdown is for patch releases, the maint-X.Y.Z variant should be removed to avoid conflicting guidance.
Merge ``release-X.Y.Z-rcN`` to ``maint-X.Y.x``:

.. code-block:: Bash

     # git checkout maint-25.0.x
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread docs/source/developers/release.rst Outdated
Copilot AI review requested due to automatic review settings August 5, 2026 13:23
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated release documentation has a formatting/indentation issue that will render incorrectly and introduces inconsistent patch-release merge instructions.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (1)

docs/source/developers/release.rst:357

  • This dropdown section’s indentation is broken (lines after the first code-block are no longer indented under the dropdown), which will render incorrectly in Sphinx. It also leaves the first example without an actual git push command and appears to contradict the earlier guidance that patch releases merge into maint-X.Y.x (not maint-X.Y.Z). Consider collapsing this dropdown to a single, correctly-indented maint-X.Y.x example.
      git push -u upstream maint-X.Y.x

.. dropdown:: Add the new release to the Apache Reporter System
   :animate: fade-in-slide-down
   :class-title: sd-fs-5
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@github-actions github-actions Bot removed the awaiting changes Awaiting changes label Aug 5, 2026
Copilot AI review requested due to automatic review settings August 5, 2026 13:27
@github-actions github-actions Bot added the awaiting change review Awaiting change review label Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated maintenance-branch logic doesn’t handle “minor release” naming (maint-<major>.x.x) as used by archery release cherry-pick, so minor releases could still fail by targeting a non-existent base branch.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines +38 to +45
patch_version=$(echo ${version} | cut -d. -f3)
if [ "${patch_version}" -eq 0 ]; then
maint_branch="maint-${version}"
else
# Patch releases use the maint-Major.Minor.x branch.
major_minor_version=$(echo ${version} | cut -d. -f1-2)
maint_branch="maint-${major_minor_version}.x"
fi
Comment thread dev/release/02-source.sh
Comment on lines +44 to +51
patch_version=$(echo ${version} | cut -d. -f3)
if [ "${patch_version}" -eq 0 ]; then
maint_branch="maint-${version}"
else
# Patch releases use the maint-Major.Minor.x branch.
major_minor_version=$(echo ${version} | cut -d. -f1-2)
maint_branch="maint-${major_minor_version}.x"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants