发布管理指南#
本页面提供有关执行发布的步骤的详细信息。它既可以用作学习 Apache Arrow 发布过程的指南,也可以用作发布经理执行发布时的综合检查清单。担任发布经理的人员必须至少具有提交者身份才能执行以下任务。如果发布经理是提交者但不是 PMC 的成员,则某些任务需要委派给 PMC 成员,这些任务在下面进行了标记。
原则#
Apache Arrow 发布遵循 Apache 软件基金会发布策略中定义的准则。
为发布做准备#
在创建源发布之前,发布经理必须确保任何已解决的 GitHub 问题都已设置适当的里程碑,以便正确生成变更日志。
请注意,没有相应 GitHub 问题的 pull request 将无法被 cherry-pick 脚本检测到,并且必须由发布经理手动 cherry-pick 到维护分支上。 示例包括 MINOR 和 Dependabot pull request。 因此,建议为合并到默认分支后的任何 pull request 创建 issue,以避免需要手动 cherry-pick,默认分支是指在创建发布维护分支之后合并的。
在创建发布候选版本之前#
确保删除本地标签,设置 gpg-agent 并正确分配 GitHub 问题。
# Delete the local tag for RC1 or later
git tag -d apache-arrow-<version>
# Setup gpg agent for signing artifacts
source dev/release/setup-gpg-agent.sh
# Curate the release
# The end of the generated report shows any GitHub issues with the wrong
# version number assigned.
archery release curate <version>
确保在 GitHub 上为后续版本创建主要版本里程碑。 这将自动被我们的合并脚本用作维护分支创建时关闭的问题的新版本。
补丁发布#
一旦发现主要的中断问题,我们通常会创建补丁发布。 被确定为主要中断问题的问题可能是安全修复、特定构建的损坏包等等。
任何开发人员都可以通过向 Arrow 开发邮件列表 发送电子邮件,说明为什么需要发布新版本,来要求生成补丁发布。 如果达成共识并且有发布经理愿意付出努力来创建发布,则可以创建补丁发布。
提交者可以使用 backport-candidate
标签标记应包含在下一个补丁版本中的问题。 作者或提交者有责任将标签添加到问题,以帮助发布经理识别应该反向移植的问题。
如果某个特定问题被确定为创建补丁版本的原因,则发布经理应验证至少此问题是否已正确标记并包含在补丁版本中。
请务必仔细检查以下清单
创建里程碑
创建维护分支
包含请求作为需要新的补丁版本的问题
向带有
backport-candidate
标签的问题添加新的里程碑将问题 cherry-pick 到维护分支中
创建发布候选版本#
以下是创建发布候选版本所需的各个步骤。
对于主要版本上的初始发布候选版本,我们将从 main 创建一个维护分支。
后续发布候选版本将通过 cherry-pick 特定提交来更新维护分支。
对于次要版本或补丁版本的初始发布候选版本,我们将从之前的相应版本创建维护分支。 例如,对于 15.0.1 补丁,我们将从 maint-15.0.0 创建 maint-15.0.1 分支,对于 maint-15.0.2,我们将从 maint-15.0.1 创建。 创建维护分支后,我们将通过 cherry-pick 特定提交来更新已创建的维护分支。
我们在发布候选版本之间实施了功能冻结策略。 这意味着通常我们应该仅在发布候选版本之间添加错误修复。 在极少数情况下,如果社区达成共识,则可以在发布候选版本之间添加关键功能。
创建或更新相应的维护分支#
# Execute the following from an up to date main branch.
# This will create a branch locally called maint-X.Y.Z.
# 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 apache maint-X.Y.Z
# First run in dry-mode to see which commits will be cherry-picked.
# If there are commits that we don't want to get applied, ensure the
# milestone on GitHub is set to the following release.
archery release cherry-pick X.Y.Z --continue
# Update the maintenance branch with the previous commits
archery release cherry-pick X.Y.Z --continue --execute
# Push the updated maintenance branch to the remote repository
git push -u apache maint-X.Y.Z
可选:在创建发布候选版本之前进行测试#
一些发布经理更喜欢在创建第一个发布候选版本之前执行测试,以避免在给定的版本中需要创建多个发布候选版本。
在创建发布候选版本之前进行测试
从最新的 maint-X.Y.Z 分支创建到 main 的 pull request
将 pull request 标题命名为 “WIP: Dummy PR to check maint-X.Y.Z status”
评论 pull request 以触发相关的 Crossbow 作业
@github-actions crossbow submit --group verify-rc-source
@github-actions crossbow submit --group packaging
从更新后的维护分支创建发布候选分支#
# Start from the updated maintenance branch.
git checkout maint-X.Y.Z
# The following script will create a branch for the Release Candidate,
# place the necessary commits updating the version number and then create a git tag
# on OSX use gnu-sed with homebrew: brew install gnu-sed (and export to $PATH)
#
# <rc-number> starts at 0 and increments every time the Release Candidate is created
# so for the first RC this would be: dev/release/01-prepare.sh 4.0.0 5.0.0 0
dev/release/01-prepare.sh <version> <next-version> <rc-number>
# Push the release candidate tag
git push -u apache apache-arrow-<version>-rc<rc-number>
# Push the release candidate branch in order to trigger verification jobs later
git push -u apache release-<version>-rc<rc-number>
构建源和二进制文件并提交它们#
# Build the source release tarball and create Pull Request with verification tasks
#
# NOTE: This must be run by a PMC member
# NOTE: You need to have GitHub CLI installed to run this script.
dev/release/02-source.sh <version> <rc-number>
# Submit binary tasks using crossbow, the command will output the crossbow build id
dev/release/03-binary-submit.sh <version> <rc-number>
# Wait for the crossbow jobs to finish
archery crossbow status <crossbow-build-id>
# Download the produced binaries
# This will download packages to a directory called packages/release-<version>-rc<rc-number>
dev/release/04-binary-download.sh <version> <rc-number>
# Sign and upload the binaries
#
# NOTE: This must be run by a PMC member
#
# On macOS the only way I could get this to work was running "echo "UPDATESTARTUPTTY" | gpg-connect-agent" before running this comment
# otherwise I got errors referencing "ioctl" errors.
dev/release/05-binary-upload.sh <version> <rc-number>
# Sign and upload MATLAB artifacts to the GitHub Releases area.
#
# NOTE: This must be run by a PMC member
# NOTE: You need to have GitHub CLI installed to run this script.
dev/release/06-matlab-upload.sh <version> <rc-number>
# Start verifications for binaries and wheels
dev/release/07-binary-verify.sh <version> <rc-number>
验证发布#
# Once the automatic verification has passed start the vote thread
# on dev@arrow.apache.org. To regenerate the email template use
SOURCE_DEFAULT=0 SOURCE_VOTE=1 dev/release/02-source.sh <version> <rc-number>
有关详细信息,请参阅 发布验证过程。
投票和批准#
在 dev@arrow.apache.org 上启动投票线程,并提供验证发布完整性的说明。 批准需要 PMC 成员的 3 个 +1 净票数。 发布不能被否决。
发布后任务#
在发布投票之后,我们必须执行许多任务来更新源代码构件、二进制构建和 Arrow 网站。
请务必仔细检查以下清单
更新 GitHub 上已发布里程碑的日期并将其设置为“已关闭”
将发布分支上的更改合并到维护分支,以便进行补丁发布
将新版本添加到 Apache Reporter 系统
推送发布标签
上传源代码
上传二进制文件
更新网站
更新 GitHub 版本说明
更新 Homebrew 包
更新 MSYS2 包
上传 RubyGems
上传 JavaScript 包
上传 C# 包
更新 conda 配方
上传 wheels/sdist 到 pypi
更新 R 包
更新 vcpkg port
更新 Conan 配方
更新版本号
更新文档
更新 Apache Arrow Cookbook 中的版本
发布新版本
发布版本相关的博客文章
在 Twitter 上发布版本
删除旧的构件