This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-11610-33d338ddf661b6e85364a9b0bd4d367c3468257d in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
commit 1a52c3440523103b9457b991e0b6342c9d8a0950 Author: Adam Reeve <[email protected]> AuthorDate: Mon Oct 19 00:41:16 2026 +0000 chore: use the correct testing submodule commits in release verification (#11610) # Which issue does this PR close? - Closes #10078 # Rationale for this change The `bad_data::test_invalid_files` test has caused issues for people during release verification at least 3 times now, when new invalid files have been added to `parquet-testing` since the version of that repository that's referenced by the release version's source repository. # What changes are included in this PR? * Write a `.gitmodules-versions` file and include it in the source tarball generated by `dev/release/create-tarball.sh` * In `verify-release-candidate.sh`, read commits to check out from `.gitmodules-versions` # Are these changes tested? Yes, as much as I could locally without a full RC. # Are there any significant user-facing changes? No. --- dev/release/create-tarball.sh | 9 ++++++++- dev/release/rat_exclude_files.txt | 1 + dev/release/verify-release-candidate.sh | 24 ++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/dev/release/create-tarball.sh b/dev/release/create-tarball.sh index d944d2c244..4c3a4f89bd 100755 --- a/dev/release/create-tarball.sh +++ b/dev/release/create-tarball.sh @@ -79,13 +79,20 @@ url="https://dist.apache.org/repos/dist/dev/arrow/${release}-rc${rc}" echo "Attempting to create ${tarball} from tag ${tag}" +# Write out the submodule commits referenced so that release verification +# can later ensure it uses the same versions of test data. +tmpdir=$(mktemp -d) +trap 'rm -r "${tmpdir}"' EXIT +git -C "${SOURCE_TOP_DIR}" ls-tree -r ${tag} \ + | awk '$2 == "commit" { print $4, $3 }' > ${tmpdir}/.gitmodules-commits # create <tarball> containing the files in git at $tag # the files in the tarball are prefixed with {release} # (e.g. apache-arrow-rs-4.0.1) mkdir -p ${distdir} (cd "${SOURCE_TOP_DIR}" && \ - git archive ${tag} --prefix ${release}/ \ + git archive --prefix ${release}/ \ + --add-file ${tmpdir}/.gitmodules-commits ${tag} \ | gzip > ${tarball}) echo "Running rat license checker on ${tarball}" diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt index b5dc0f5599..05223bcb19 100644 --- a/dev/release/rat_exclude_files.txt +++ b/dev/release/rat_exclude_files.txt @@ -11,6 +11,7 @@ parquet_derive/test/dependency/* .gitattributes **.gitignore .gitmodules +.gitmodules-commits AGENTS.md CLAUDE.md Cargo.lock diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index d8b888effe..902218675e 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -95,6 +95,17 @@ setup_tempdir() { fi } +# Print the commit for the submodule at path $1 recorded in .gitmodules-commits +submodule_commit() { + local commit + commit=$(awk -v path="$1" '$1 == path { print $2 }' .gitmodules-commits) + if [ -z "${commit}" ]; then + echo "No commit for submodule $1 found in .gitmodules-commits" >&2 + return 1 + fi + echo "${commit}" +} + test_source_distribution() { # install rust toolchain in a similar fashion like test-miniconda export RUSTUP_HOME=$PWD/test-rustup @@ -117,6 +128,19 @@ test_source_distribution() { export ARROW_TEST_DATA=$PWD/arrow-testing-data/data export PARQUET_TEST_DATA=$PWD/parquet-testing-data/data + if [ -f .gitmodules-commits ]; then + # Use the testing repository commits referenced by the release + local arrow_testing_commit parquet_testing_commit + arrow_testing_commit=$(submodule_commit testing) + parquet_testing_commit=$(submodule_commit parquet-testing) + # Fetch the commits explicitly, as they may not be reachable from any + # branch (e.g. a submodule pinned to a pull request's head commit) + git -C arrow-testing-data fetch origin "${arrow_testing_commit}" + git -C arrow-testing-data checkout "${arrow_testing_commit}" + git -C parquet-testing-data fetch origin "${parquet_testing_commit}" + git -C parquet-testing-data checkout "${parquet_testing_commit}" + fi + cargo test --all # verify that the leaf crates can be published to crates.io
