發布管理指南¶
此頁面提供有關執行發布所遵循步驟的詳細資訊。它既可以用作學習 ADBC 發布流程的指南,也可以用作發布管理員執行發布時的完整檢查清單。
另請參閱
原則¶
Apache Arrow 發布遵循 Apache 軟體基金會發布政策 中定義的準則。
發布準備¶
發布的某些步驟需要成為提交者或 PMC 成員。
Apache Web of Trust 中的 GPG 金鑰,用於簽署工件。這將需要由其他 Apache 提交者/PMC 成員交叉簽署。您必須在
dev/release/.env
中設定您的 GPG 金鑰 ID(範本請參閱dev/release/.env.example
)。設定 Maven 以 將工件發布到 Apache 儲存庫。您將需要在
~/.m2/settings-security.xml
和settings.xml
中 設定主密碼,如 Apache 指南 中所指定。可以使用以下命令進行測試# You might need to export GPG_TTY=$(tty) to properly prompt for a passphrase mvn clean install -Papache-release
Artifactory API 金鑰(使用您的 ASF 憑證登入,然後從右上角的個人資料中產生)。您必須在
dev/release/.env
中設定 Artifactory API 金鑰(範本請參閱dev/release/.env.example
)。安裝
en_US.UTF-8
地區設定。您可以透過locale -a
確認可用的地區設定。使用 conda-forge 安裝 Conda,並建立和啟動環境。
mamba create -n adbc -c conda-forge --file ci/conda_env_dev.txt
這將安裝發布過程中使用的兩個工具:
commitizen
(從提交訊息產生變更日誌)和gh
(提交工作/下載工件)。安裝 Docker。
複製主要的 Arrow 儲存庫 (https://github.com/apache/arrow) 並將
arrow-adbc/dev/release/.env
符號連結到arrow/dev/release/.env
。某些發布腳本依賴於主要 Arrow 儲存庫中的腳本。
在建立候選版本之前¶
重新產生 LICENSE.txt(請參閱 CONTRIBUTING.md),如果需要任何變更,請建立提取請求。
# Setup gpg agent for signing artifacts
source dev/release/setup-gpg-agent.sh
# Activate conda environment
mamba activate adbc
檢查每夜驗證工作¶
確保 驗證工作 正在通過。這模擬了發布驗證工作流程的一部分,以便提前偵測問題。
建立候選版本¶
以下是建立候選版本所需的不同步驟。
對於初始候選版本,我們將從 master 建立維護分支。後續的候選版本將透過 cherry-picking 特定提交來更新維護分支。
我們在候選版本之間實施了功能凍結政策。這表示,一般來說,我們應該只在候選版本之間新增錯誤修正。在極少數情況下,如果社群達成共識,則可以在候選版本之間新增關鍵功能。
建立或更新相應的維護分支¶
# Execute the following from an up to date master 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
git branch maint-X.Y.Z
# Push the maintenance branch to the remote repository
git push -u apache maint-X.Y.Z
git switch maint-X.Y.Z
# Remove the commits that created the changelog and bumped the
# versions, since 01-prepare.sh will redo those steps
git reset --hard HEAD~2
# Cherry-pick any commits by hand.
git cherry-pick ...
# Push the updated maintenance branch to the remote repository
git push -u apache maint-X.Y.Z
從更新的維護分支建立候選版本標籤¶
# Start from the updated maintenance branch.
git switch maint-X.Y.Z
# The following script will create a branch for the Release Candidate,
# place the necessary commits updating the version number and changelog, 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 burned
# so for the first RC this would be: dev/release/01-prepare.sh 1.0.0 0
dev/release/01-prepare.sh <arrow-dir> <rc-number>
git push -u apache apache-arrow-adbc-<release>-rc<rc-number> maint-<release>
建置來源和二進制檔案並提交它們¶
# Download the produced source and binaries, sign them, and add the
# signatures to the GitHub release
#
# 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/02-sign.sh <rc-number>
# Upload the source release tarball and signs to
# https://dist.apache.org/repos/dist/dev/arrow .
dev/release/03-source.sh <rc-number>
# Upload the Java artifacts
#
# Note that you need to press the "Close" button manually by Web interface
# after you complete the script:
# https://repository.apache.org/#stagingRepositories
dev/release/04-java-upload.sh <arrow-dir> <rc-number>
# Sign and upload the deb/rpm packages and APT/Yum repositories
#
# This reuses release scripts in apache/arrow. So you need to
# specify cloned apache/arrow directory.
dev/release/05-linux-upload.sh <arrow-dir> <rc-number>
# Start verifications for binaries and wheels
dev/release/06-binary-verify.sh <rc-number>
驗證發布¶
使用 06-binary-verify.sh
中的範本電子郵件,在 dev@arrow.apache.org 上啟動投票討論串。
投票與批准¶
在 dev@arrow.apache.org 上啟動投票討論串,並提供驗證發布完整性的說明。批准需要 PMC 成員的淨票數為 3 個 +1 票。發布不能被否決。
如何驗證候選版本¶
安裝相依性。至少您需要
cURL
Docker (用於驗證二進制檔案)
Git
GnuPG
shasum (macOS 內建) 或 sha256sum/sha512sum (在 Linux 上)
您還需要安裝所有相依性,以建置和驗證所有語言。大致來說,這表示
C 和 C++ 編譯器 (或相當於您平台上的
build-essential
)Python 3
- 具有標頭的 Ruby
需要 meson
bundler、rake、red-arrow 和 test-unit Ruby gem
- 具有標頭的 GLib 和 gobject-introspection
pkg-config 或 cmake 必須能夠找到 libarrow-glib.so
GI_TYPELIB_PATH 應設定為 girepository-1.0 目錄的路徑
- Java JRE 和 JDK (Java 11+)
javadoc 命令也必須可存取
Go
CMake、ninja-build、libpq (具有標頭)、SQLite (具有標頭)
或者,您可以讓驗證腳本透過 Conda 自動下載和安裝相依性。請參閱以下環境變數。
複製專案
$ git clone https://github.com/apache/arrow-adbc.git
執行驗證腳本
$ cd arrow-adbc # Pass the release and the RC number $ ./dev/release/verify-release-candidate.sh 0.1.0 6
這些環境變數可能很有用
ARROW_TMPDIR=/path/to/directory
指定使用的暫存目錄。如果腳本必須多次執行,使用固定的目錄可以幫助避免重複相同的設定和建置步驟。USE_CONDA=1
下載並設定 Conda 以取得相依性。在這種情況下,系統需要較少的相依性。(仍然需要 Git、GnuPG、cURL 和其他一些相依性。)
完成且腳本通過後,請回覆郵寄清單投票討論串,並附上 +1 或 -1。
發布後任務¶
在發布投票之後,我們必須執行許多任務來更新來源工件、二進制建置和 Arrow 網站。
請務必完成以下檢查清單
關閉 GitHub 里程碑/專案
點擊專案的「…」
選取「關閉」
點擊「關閉」
將新發布新增至 Apache Reporter System
將 Arrow 的相關發布資料新增至 Apache reporter。
將來源發布工件上傳到 Subversion
PMC 成員必須將來源發布工件提交到 Subversion
# dev/release/post-01-upload.sh 0
dev/release/post-01-upload.sh <rc-number>
git push apache apache-arrow-adbc-<release>
建立最終 GitHub 發布
提交者必須建立最終 GitHub 發布
# dev/release/post-02-binary.sh 0
dev/release/post-02-binary.sh <rc-number>
更新網站
這會在推送標籤時自動完成。請檢查 nightly-website.yml 工作流程是否成功。
將 wheels/sdist 上傳到 PyPI
我們使用 twine 工具將 wheels 上傳到 PyPI
dev/release/post-03-python.sh
發布 Maven 套件
登入 Apache 儲存庫:https://repository.apache.org/#stagingRepositories
選取您為 RC 建立的 Arrow 暫存儲存庫:
orgapachearrow-XXXX
點擊
release
按鈕
更新 Go 模組的標籤
# dev/release/post-04-go.sh
dev/release/post-04-go.sh
部署 APT/Yum 儲存庫
# This reuses release scripts in apache/arrow. So you need to
# specify cloned apache/arrow directory.
#
# dev/release/post-05-linux.sh ../arrow 0
dev/release/post-05-linux.sh <arrow-dir> <rc-number>
更新 R 套件
這是手動過程。請參閱 Arrow R 套件 的流程。
將 Ruby 套件上傳到 RubyGems
您必須是 https://rubygems.org/gems/red-adbc 的擁有者之一。如果您還不是 red-adbc 的擁有者,現有的擁有者必須執行以下命令列,將您新增至 red-adbc 擁有者
gem owner -a ${RUBYGEMS_ORG_ACCOUNT_FOR_RELEASE_MANAGER} red-adbc
red-adbc 的擁有者可以上傳
# dev/release/post-06-ruby.sh
dev/release/post-06-ruby.sh
將 C#/.NET 套件上傳到 NuGet
您必須是套件的擁有者之一。如果您還不是擁有者,現有的擁有者可以在 https://nuget.org 新增您。
您將需要[建立 API 金鑰](https://learn.microsoft.com/en-us/nuget/nuget-org/publish-a-package#create-an-api-key)。
擁有者可以上傳
export NUGET_API_KEY=<your API key here>
# dev/release/post-07-csharp.sh
dev/release/post-07-csharp.sh
將 Rust 條板箱上傳到 crates.io
您必須是套件的擁有者之一。如果您還不是擁有者,現有的擁有者可以在 https://crates.io 新增您。
您將需要[建立 API 令牌](https://crates.io/settings/tokens)。
擁有者可以上傳
cargo login
# dev/release/post-08-rust.sh
dev/release/post-08-rust.sh
更新 conda-forge 套件
提交 PR,將版本號碼提升到 feedstock:https://github.com/conda-forge/arrow-adbc-split-feedstock
conda-forge 或 feedstock 維護者可以審查和合併。
公告新發布
撰寫發布公告並發送至 announce@apache.org 和 dev@arrow.apache.org。
發送至 announce@apache.org 的公告必須從您的 apache.org 電子郵件地址發送才能被接受。
範本
dev/release/post-09-announce.sh
移除舊工件
移除 https://dist.apache.org/repos/dist/dev/arrow/ 上的 RC 工件和 https://dist.apache.org/repos/dist/release/arrow 上的舊發布工件,以遵循 ASF 政策
dev/release/post-10-remove-old-artifacts.sh
提升版本號碼
首先,更新 dev/release/versions.env
中的版本號碼。然後,執行此腳本將這些版本號碼套用到嵌入在檔案和檔案名稱中的版本。該腳本還會將變更日誌更新為新發布的變更日誌。
# dev/release/post-11-bump-versions.sh ../arrow
dev/release/post-11-bump-versions.sh <arrow-dir>
發布發布部落格文章
執行腳本以產生部落格文章大綱,然後填寫大綱並在 apache/arrow-site 上建立 PR。
# dev/release/post-12-website.sh ../arrow-site
dev/release/post-12-website.sh <arrow-site-dir>