Skip to content

Commit 4e5f7ea

Browse files
authored
GH-48838: [Release] Use gh cli to download sources for Linux packages and publish draft release before verification (#48839)
### Rationale for this change With the change we did for immutable releases we required draft releases to be able to keep uploading artifacts during the release process. This means that the interim URL to download assets isn't the expected one on some of our scripts. ### What changes are included in this PR? Update the `download_rc_archive` task so we use the GitHub cli tool instead of manually building the download URL for the source tar.gz from the release. Update order of release scripts to publish the release before running verification tasks so the URL is the final one. ### Are these changes tested? I have manually tested both the `gh release download` script and that the final URL will be the expected one once we move from draft to published release. I've tested creating a new release on my own fork here: https://github.com/raulcd/arrow/releases/tag/test-release-rc2 ### Are there any user-facing changes? No * GitHub Issue: #48838 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
1 parent cff2c52 commit 4e5f7ea

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ repos:
353353
?^cpp/examples/minimal_build/run\.sh$|
354354
?^cpp/examples/tutorial_examples/run\.sh$|
355355
?^dev/release/05-binary-upload\.sh$|
356-
?^dev/release/07-binary-verify\.sh$|
356+
?^dev/release/08-binary-verify\.sh$|
357357
?^dev/release/binary-recover\.sh$|
358358
?^dev/release/post-03-binary\.sh$|
359359
?^dev/release/post-08-docs\.sh$|

dev/tasks/linux-packages/apache-arrow/Rakefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,15 @@ class ApacheArrowPackageTask < PackageTask
5959
end
6060

6161
def download_rc_archive
62-
base_url = "https://github.com/#{github_repository}"
63-
base_url += "/releases/download/apache-arrow-#{@version}"
6462
archive_name_no_rc = @archive_name.gsub(/-rc\d+(\.tar\.gz)\z/, "\\1")
65-
url = "#{base_url}/#{archive_name_no_rc}"
66-
download(url, @archive_name)
63+
sh("gh",
64+
"release",
65+
"download",
66+
"apache-arrow-#{@version}",
67+
"--clobber",
68+
"--repo", github_repository,
69+
"--pattern", archive_name_no_rc)
70+
mv(archive_name_no_rc, @archive_name)
6771
end
6872

6973
def download_released_archive

docs/source/developers/release.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ Build source and binaries and submit them
246246
archery crossbow status <crossbow-build-id>
247247
248248
# Download the produced binaries
249-
# This will download packages to a directory called packages/release-<version>-rc<rc-number>
249+
# This will download packages generated from the archery tasks
250+
# to a directory called packages/release-<version>-rc<rc-number>
250251
dev/release/04-binary-download.sh <version> <rc-number>
251252
252253
# Sign and upload the binaries
@@ -263,11 +264,14 @@ Build source and binaries and submit them
263264
# NOTE: You need to have GitHub CLI installed to run this script.
264265
dev/release/06-matlab-upload.sh <version> <rc-number>
265266
267+
# Move the Release Candidate GitHub Release from draft to published state
268+
# This will update the artifacts download URL which will be available for the
269+
# verification step.
270+
dev/release/07-publish-gh-release.sh <version> <rc-number>
271+
266272
# Start verifications for binaries and wheels
267-
dev/release/07-binary-verify.sh <version> <rc-number>
273+
dev/release/08-binary-verify.sh <version> <rc-number>
268274
269-
# Move the Release Candidate GitHub Release from draft to published state
270-
dev/release/08-publish-gh-release.sh <version> <rc-number>
271275
272276
Verify the Release
273277
------------------

0 commit comments

Comments
 (0)