You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "amoeba (via GitHub)" <gi...@apache.org> on 2026/02/11 22:27:31 UTC

[PR] GH-49248: [Release] Include checksum in vote email [arrow]

amoeba opened a new pull request, #49249:
URL: https://github.com/apache/arrow/pull/49249

   ### Rationale for this change
   
   Resolves #49248 
   
   ### What changes are included in this PR?
   
   Adds a step to the `SOURCE_VOTE` step in `02-source.sh` to grab the checksum we just pushed to svn from dist.apache.org and include that checksum as a footnote in the vote thread email. I did it this way because the person running this script may run this script like,
   
   ```sh
   SOURCE_DEFAULT=0 SOURCE_VOTE=1 dev/release/02-source.sh 23.0.1 0
   ```
   
   So the only way to get the checksum at this point is with another SVN command or by downloading the file from dist.apache.org.
   
   ### Are these changes tested?
   
   Yes, using currently active RC and with the above command.
   
   ### Are there any user-facing changes?
   
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49249:
URL: https://github.com/apache/arrow/pull/49249#issuecomment-3936697434

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 76f781512330d99a2e308c16f5fba7ededc3e292.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/64334672175) has more details. It also includes information about 16 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2796944467


##########
dev/release/02-source.sh:
##########
@@ -130,6 +130,15 @@ if [ ${SOURCE_VOTE} -gt 0 ]; then
   curl_options+=(--data "head=apache:${rc_branch}")
   curl_options+=(https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls)
   verify_pr_url=$(curl "${curl_options[@]}" | jq -r ".[0].html_url")
+  # Read the checksum so we can include it in the vote thread email
+  # We check if $tarball exists to detect when this script is being run by
+  # 02-source-test.rb and we fill in the hash from the test tarball in that
+  # case.
+  if [ -f "${tarball}" ]; then
+    tarball_hash=$(shasum -a 512 "${tarball}" | awk '{print $1}')
+  else
+    tarball_hash=$(curl -s "https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-${version}-rc${rc}/${tarball}.sha512" | awk '{print $1}')
+  fi

Review Comment:
   How about assuming `${tarball}.sha512` must exist?
   
   ```suggestion
     # Read the checksum so we can include it in the vote thread email.
     tarball_hash=$(cat "artifacts/${tarball}.sha512" | awk '{print $1}')
   ```
   
   We need the following change for this:
   
   ```diff
   diff --git a/dev/release/02-source-test.rb b/dev/release/02-source-test.rb
   index fe2c7b7759..fcf35bd23e 100644
   --- a/dev/release/02-source-test.rb
   +++ b/dev/release/02-source-test.rb
   @@ -44,6 +44,9 @@ class SourceTest < Test::Unit::TestCase
          env["SOURCE_#{target}"] = "1"
        end
        sh(env, @tarball_script, @release_version, "0")
   +    File.open("#{@archive_name}.sha512", "w") do |sha512|
   +      sha512.puts(sh(env, "shasum", "-a", "512", @archive_name))
   +    end
        output = sh(env, @script, @release_version, "0")
        sh("tar", "xf", @archive_name)
        output
   ```



##########
dev/release/02-source-test.rb:
##########
@@ -106,6 +106,8 @@ def test_vote
       verify_pr_url = (JSON.parse(response.read)[0] || {})["html_url"]
     end
     output = source("VOTE")
+    # Extract the tarball hash from the output
+    tarball_hash = output[/\[11\]: ([a-f0-9]+)/, 1]

Review Comment:
   How about computing it from the tar ball?
   
   ```suggestion
       tarball_hash = Digest::SHA512.file(@archive_name).to_s
   ```
   
   We need additional `require` for it:
   
   ```diff
   diff --git a/dev/release/02-source-test.rb b/dev/release/02-source-test.rb
   index fe2c7b7759..3cab5b0b0e 100644
   --- a/dev/release/02-source-test.rb
   +++ b/dev/release/02-source-test.rb
   @@ -15,6 +15,8 @@
    # specific language governing permissions and limitations
    # under the License.
    
   +require "digest"
   +
    class SourceTest < Test::Unit::TestCase
      include GitRunnable
      include VersionDetectable
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2814468514


##########
dev/release/02-source-test.rb:
##########
@@ -44,8 +46,13 @@ def source(*targets)
       env["SOURCE_#{target}"] = "1"
     end
     sh(env, @tarball_script, @release_version, "0")
+    Dir.mkdir("artifacts") unless Dir.exist?("artifacts")

Review Comment:
   We can use `FileUtils.mkdir_p` for this. :-)
   
   ```suggestion
       FileUtils.mkdir_p("artifacts")
   ```



##########
dev/release/02-source-test.rb:
##########
@@ -44,8 +46,13 @@ def source(*targets)
       env["SOURCE_#{target}"] = "1"
     end
     sh(env, @tarball_script, @release_version, "0")
+    Dir.mkdir("artifacts") unless Dir.exist?("artifacts")
+    sh("mv", @archive_name, "artifacts/")
+    File.open("artifacts/#{@archive_name}.sha512", "w") do |sha512|
+      sha512.puts(sh(env, "shasum", "-a", "512", "artifacts/#{@archive_name}"))
+    end

Review Comment:
   Ah, sorry. We can simplify this:
   
   ```suggestion
       File.write("artifacts/#{@archive_name}.sha512",
                  sh(env, "shasum", "-a", "512", "artifacts/#{@archive_name}"))
   ```



##########
dev/release/02-source-test.rb:
##########
@@ -15,6 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+require 'digest'

Review Comment:
   Ah, sorry. could you move this to `dev/release/test-helper.rb`? Our tests collect all `require`s to the file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49249:
URL: https://github.com/apache/arrow/pull/49249#issuecomment-3888147570

   @raulcd this is ready for a review. I opted to put the checksum as a footnote since it's >80 chars and I didn't think it would look good if it was in the main text. Happy to do something else.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2800777064


##########
dev/release/02-source.sh:
##########
@@ -130,6 +130,15 @@ if [ ${SOURCE_VOTE} -gt 0 ]; then
   curl_options+=(--data "head=apache:${rc_branch}")
   curl_options+=(https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls)
   verify_pr_url=$(curl "${curl_options[@]}" | jq -r ".[0].html_url")
+  # Read the checksum so we can include it in the vote thread email
+  # We check if $tarball exists to detect when this script is being run by
+  # 02-source-test.rb and we fill in the hash from the test tarball in that
+  # case.
+  if [ -f "${tarball}" ]; then
+    tarball_hash=$(shasum -a 512 "${tarball}" | awk '{print $1}')
+  else
+    tarball_hash=$(curl -s "https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-${version}-rc${rc}/${tarball}.sha512" | awk '{print $1}')
+  fi

Review Comment:
   I took the above suggestion but added a check to make sure the .sha512 file exists. Without that, a release manager could end up with an empty footnote. I don't think just assuming is enough and that we should require it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49249:
URL: https://github.com/apache/arrow/pull/49249#issuecomment-3922620750

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 76f781512330d99a2e308c16f5fba7ededc3e292.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/64051482988) has more details. It also includes information about 16 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #49249:
URL: https://github.com/apache/arrow/pull/49249


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2814480333


##########
dev/release/02-source.sh:
##########
@@ -130,6 +130,9 @@ if [ ${SOURCE_VOTE} -gt 0 ]; then
   curl_options+=(--data "head=apache:${rc_branch}")
   curl_options+=(https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls)
   verify_pr_url=$(curl "${curl_options[@]}" | jq -r ".[0].html_url")
+  # Read the checksum so we can include it in the vote thread email.
+  [[ -f "artifacts/${tarball}.sha512" ]] || { echo "Error: artifacts/${tarball}.sha512 must exist"; exit 1; }
+  tarball_hash=$(cat "artifacts/${tarball}.sha512" | awk '{print $1}')

Review Comment:
   It may be better that we define a variable:
   
   ```suggestion
     sha512_path="artifacts/${tarball}.sha512}
     [[ -f "${sha512_path}" ]] || { echo "Error: ${sha512_path} must exist"; exit 1; }
     tarball_hash=$(cat "${sha512_path}" | awk '{print $1}')
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2814618737


##########
dev/release/02-source-test.rb:
##########
@@ -44,8 +46,13 @@ def source(*targets)
       env["SOURCE_#{target}"] = "1"
     end
     sh(env, @tarball_script, @release_version, "0")
+    Dir.mkdir("artifacts") unless Dir.exist?("artifacts")

Review Comment:
   nice, thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2814625154


##########
dev/release/02-source-test.rb:
##########
@@ -15,6 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+require 'digest'

Review Comment:
   Done in 96fd0b1bf7a9577556c27985ac6d4d2cecb131dc



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49248: [Release] Include checksum in vote email [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49249:
URL: https://github.com/apache/arrow/pull/49249#issuecomment-3911542464

   Thanks @kou. Suggestions accepted and one extra fix made.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org