You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "sgilmore10 (via GitHub)" <gi...@apache.org> on 2024/04/02 18:53:41 UTC

[PR] GH-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   ### Rationale for this change
   
   This is a follow up to https://github.com/apache/arrow/pull/38660 and [this mailing list discussion](https://lists.apache.org/thread/0xyow40h7b1bptsppb0rxd4g9r1xpmh6).
   
   We would like to upload the MLTBX packages for the MATLAB bindings to the GitHub Releases area for the Apache Arrow GitHub project.
   
   Using GitHub Releases will enable tight integration with the [MathWorks File Exchange](https://www.mathworks.com/matlabcentral/fileexchange), which should make it easy for users to discover and install the MATLAB interface using MATLAB.
   
   To make this possible, we need to update the release scripts under [/dev/release](https://github.com/apache/arrow/tree/main/dev/release) to upload the MLTBX packages built by crossbow to the GitHub Releases area.
   
   ### What changes are included in this PR?
   
   1. Modified `dev/release/05-binary-upload.sh` to sign and upload release candidate MLTBX files to apache/arrow's GitHub Releases Area using the [`gh release create`](https://cli.github.com/manual/gh_release_create) command. 
   2. Marked the created GitHub Release as a `prerelease` to differentiate between release candidates and official releases. 
   3. Compared the format of the created GitHub Releases to the format of [apache/arrow-flight-sql-postgresql's](https://github.com/apache/arrow-flight-sql-postgresql/releases) GitHub Releases to validate our changes made sense.
   
   ### Are these changes tested?
   
   I was not able to run `dev/release/05-binary-upload.sh` directly, but I did test the `gh create release`, `gpg`, and `shasum` commands worked as expected by creating a "dummy" release for this repository: `https://github.com/sgilmore10/TestRepo/releases/tag/1.0.0rc1`
   
   ### Are there any user-facing changes?
   
   No.
   
   ### Future Directions
   
   1. Modify `dev/release/post-02-upload.sh` to create a non-prerelease GitHub Release for the MATLAB bindings.
   2. Create an Apache Arrow entry on the MathWorks File Exchange to facilitate a one-click install workflow for the MATLAB bindings.  
   6. Refactor the changes made to `05-binary-upload.sh` into a separate function that can be reused by `post-02-upload.sh` to reduce code duplication.
   
   ### Open Questions
   
   1. Should we include the list of issues resolved in the release notes for prereleases?
   2. @kou, @assignUser, or @raulcd, do you have suggestions on how we can validate the changes to `dev/release/05-binary-upload.sh`?


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   Ah, sorry for not sharing how to implement this in https://lists.apache.org/thread/hm7cbrkggomhx7nxdzr5xkrmkrztmmwo ...
   
   How about using `git tag -a apache-arrow-X.Y.Z-rcN`, `git push apache apache-arrow-X.Y.Z-rcN` and GitHub Actions for the RC tag?
   
   We can detect whether this push is for tag or commit by `if: github.ref_type == 'tag'`.
   See also: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
   
   If this push is for tag, we can download the built `.mltbx` file and upload it to GitHub Releases by GitHub Actions. We can't sign by GitHub Actions. So we need to sign on local later. We can do it by a release script.
   
   This is a workflow what arrow-adbc already uses.
   See also:
   1. `git tag`: https://github.com/apache/arrow-adbc/blob/a35fae0f11c29b6207c1361986d7900441562d64/dev/release/01-prepare.sh#L76
   2. Upload artifacts to GitHub Releases by GitHub Actions: https://github.com/apache/arrow-adbc/blob/a35fae0f11c29b6207c1361986d7900441562d64/.github/workflows/packaging.yml#L945-L999
   3. Download artifacts from GitHub Releases, sign them and upload to GitHub Releases: https://github.com/apache/arrow-adbc/blob/main/dev/release/02-sign.sh
   4. Change the associated tag of GitHub Releases from `apache-arrow-adbc-X.Y.Z-rcN` to `apache-arrow-adbc-X.Y.Z` after a vote is passed: https://github.com/apache/arrow-adbc/blob/main/dev/release/post-02-binary.sh
      * I want to use different approach in apache/arrow for this. I don't want to change existing GitHub Releases for this. I want to create a new GitHub Releases for `apache-arrow-X.Y.Z` instead of reusing a GitHub Releases for `apache-arrow-X.Y.Z-rcN`.
      * arrow-flight-sql-postgresql uses the different approach: https://github.com/apache/arrow-flight-sql-postgresql/blob/main/.github/workflows/release.yaml
        * `git tag -a apache-arrow-X.Y.Z` and `git push apache apache-arrow-X.Y.Z` trigger this GitHub Actions workflow.


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,18 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Create a git tag to associate with a GitHub Release that will
+# have the release candidate MLTBX file as an asset. 
+# 
+# Push this tag (e.g. apache-arrow-15.0.2-rc0) to the remote
+# apache/arrow repository to trigger the GitHub Actions Workflow 
+# that creates the GitHub Release and uploads the MLTBX file.
+#
+# See .github/workflows/package.yml for details.
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag="apache-arrow-${version_with_rc}"
+  tag_message="Release candidate: ${version_with_rc}"
+  git tag -a ${release_tag} -m ${tag_message}
+  git push apache ${release_tag}

Review Comment:
   > Did you mean for us to actually add the `rc_tag` in addition to the `release_tag`?
   
   No. I mean for us to replace the `release_tag` with `rc_tag`.
   
   > We asking because we assume we still want to create a `release_tag`.
   
   I want to change the current workflow:
   
   1. Create a `apache-arrow-X.Y.Z` tag for X.Y.Z RC0
   2. (Found a problem for X.Y.Z RC0)
   3. Remove the `apache-arrow-X.Y.Z` tag for X.Y.Z RC0
   4. Create a `apache-arrow-X.Y.Z` tag for X.Y.Z RC1
   5. ...
   
   to the following:
   
   1. Create a `apache-arrow-X.Y.Z-rc0` tag for X.Y.Z RC0
   2. (Found a problem for X.Y.Z RC0)
   3. Create a `apache-arrow-X.Y.Z-rc1` tag for X.Y.Z RC1
   4. Vote
   5. Passed
   6. Create a `apache-arrow-X.Y.Z` tag from `apache-arrow-X.Y.Z-rc1` like apache/arrow-adbc and apache/arrow-flight-sql-postgresql do
   
   Hmm. It's better that we handle the workflow change related task in a separated issue...



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   > We can't sign by GitHub Actions
   
   Not yet but the option exists! We can sign via gha workflow (in apache/arrow), INFRA has to review and approve the workflow doing the signing and will add the key to be used as a repo secret. See https://www.apache.org/legal/release-policy.html#release-signing
   
   This change was added sometime last year but I never had the time to follow up but with the current discussions about making releases easier and this new addition it might be the right time to tackle it! (for both the monorepo and subprojects)


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,35 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Upload the MATLAB MLTBX Release Candidate to the GitHub Releases
+# area of the Apache Arrow GitHub project.
+mltbx_file="${ARROW_ARTIFACTS_DIR}/matlab-dist/matlab-arrow-${version_with_rc}.mltbx"
+mltbx_signature_gpg_ascii_armor=${mltbx_file}.asc
+mltbx_checksum_sha512=${mltbx_file}.sha512
+
+# Sign the MLTBX file and create a detached (--deatch-sign) ASCII armor (--armor) GPG signature file.
+gpg --detach-sign --local-user "${GPG_KEY_ID}" --armor ${mltbx_file}
+
+# Compute the SHA512 checksum of the MLTBX file.
+shasum --algorithm 512 ${mltbx_file} > ${mltbx_checksum_sha512}
+
+# Upload artifacts to the Apache Arrow
+# GitHub Releases area and mark as a "Prerelease".
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag=apache-arrow-${version_with_rc}
+  target_branch=release-${version_with_rc}
+  release_notes="Release Candidate: ${version} RC${rc}"
+  title="Apache Arrow ${version} RC${rc}"
+  repository="https://github.com/apache/arrow"
+  gh release create \

Review Comment:
   Hi @raulcd,
   
   This change is out of date - sorry about that. Based on @kou's feedback, we going to use a GitHub Actions Workflow - triggered by pushing the tag `apache-arrow-X.Y.Z-rc{N}` - to create release instead of using `gh`. I just haven't updated `05-binary-upload.sh` yet, but will do so soon!



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   We can use `dev/release/04-binary-download.sh ${MAJOR}.${MINOR}.${PATCH} ${RC} --task-filter matlab` to download the `.mltbx` 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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,18 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Create a git tag to associate with a GitHub Release that will
+# have the release candidate MLTBX file as an asset. 
+# 
+# Push this tag (e.g. apache-arrow-15.0.2-rc0) to the remote
+# apache/arrow repository to trigger the GitHub Actions Workflow 
+# that creates the GitHub Release and uploads the MLTBX file.
+#
+# See .github/workflows/package.yml for details.
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag="apache-arrow-${version_with_rc}"
+  tag_message="Release candidate: ${version_with_rc}"
+  git tag -a ${release_tag} -m ${tag_message}
+  git push apache ${release_tag}

Review Comment:
   Hi @kou,
   
   Thanks for sharing this diff! We just have one clarification question: 
   
   Based on the diff you shared, it looks like you want us to replace the `release_tag` with the `rc_tag`. Did you mean for us to actually add the `rc_tag` in addition to the `release_tag`?  We asking because we assume we still want to create a `release_tag`. 
   



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   :warning: GitHub issue #40924 **has been automatically assigned in GitHub** to PR creator.


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   Thanks for clarifying @assignUser! We're excited to be working with you guys with this!


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   As we were looking into this, @kevingurney and I realized we need to be able to connect the crossbow job ID that created the MLTBX file with the GitHub Actions workflow. We aren't aware of any existing mechanism that can provide inputs to a GitHub Actions Workflow that is trigged *automatically*.  As an aside, it is possible to supply inputs to a GitHub Actions Workflow that is triggered *manually* (see this article [this article](https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/)).
   
   One workaround to enable the automatic approach would be to embed the crossbow job ID in the git tag's message and then  extract the ID in the workflow. Using this ID and the `archery crossbow download-artifacts` command, we could download the appropriate MLTBX file. 
   
   We recognize that embedding the ID in the git tag message is not ideal, so please let us know if you have any other suggestions. 
   
   


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,35 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Upload the MATLAB MLTBX Release Candidate to the GitHub Releases
+# area of the Apache Arrow GitHub project.
+mltbx_file="${ARROW_ARTIFACTS_DIR}/matlab-dist/matlab-arrow-${version_with_rc}.mltbx"
+mltbx_signature_gpg_ascii_armor=${mltbx_file}.asc
+mltbx_checksum_sha512=${mltbx_file}.sha512
+
+# Sign the MLTBX file and create a detached (--deatch-sign) ASCII armor (--armor) GPG signature file.
+gpg --detach-sign --local-user "${GPG_KEY_ID}" --armor ${mltbx_file}
+
+# Compute the SHA512 checksum of the MLTBX file.
+shasum --algorithm 512 ${mltbx_file} > ${mltbx_checksum_sha512}
+
+# Upload artifacts to the Apache Arrow
+# GitHub Releases area and mark as a "Prerelease".
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag=apache-arrow-${version_with_rc}
+  target_branch=release-${version_with_rc}
+  release_notes="Release Candidate: ${version} RC${rc}"
+  title="Apache Arrow ${version} RC${rc}"
+  repository="https://github.com/apache/arrow"
+  gh release create \

Review Comment:
   Actually, I just realized you are right. We will need to add a note about requiring the GItHub CLI to be installed locally. While we are no longer using `gh` to create the release in `04-binary-upload.sh`, we will need to use `gh` once the GitHub release is created to upload the signed MLTBX files.  
   
   I'll make sure to add a note about this requirement to [documentation](https://github.com/apache/arrow/blob/main/docs/source/developers/release.rst).
   
   Sorry about the confusion!



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,35 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Upload the MATLAB MLTBX Release Candidate to the GitHub Releases
+# area of the Apache Arrow GitHub project.
+mltbx_file="${ARROW_ARTIFACTS_DIR}/matlab-dist/matlab-arrow-${version_with_rc}.mltbx"
+mltbx_signature_gpg_ascii_armor=${mltbx_file}.asc
+mltbx_checksum_sha512=${mltbx_file}.sha512
+
+# Sign the MLTBX file and create a detached (--deatch-sign) ASCII armor (--armor) GPG signature file.
+gpg --detach-sign --local-user "${GPG_KEY_ID}" --armor ${mltbx_file}
+
+# Compute the SHA512 checksum of the MLTBX file.
+shasum --algorithm 512 ${mltbx_file} > ${mltbx_checksum_sha512}
+
+# Upload artifacts to the Apache Arrow
+# GitHub Releases area and mark as a "Prerelease".
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag=apache-arrow-${version_with_rc}
+  target_branch=release-${version_with_rc}
+  release_notes="Release Candidate: ${version} RC${rc}"
+  title="Apache Arrow ${version} RC${rc}"
+  repository="https://github.com/apache/arrow"
+  gh release create \

Review Comment:
   this means we requires the gh CLI installed locally, right?
   Can we add a note on the requirements for the release tasks that we require gh CLI installed?
   https://github.com/apache/arrow/blob/main/docs/source/developers/release.rst



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

Posted by "assignUser (via GitHub)" <gi...@apache.org>.
assignUser closed pull request #40956: GH-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area
URL: https://github.com/apache/arrow/pull/40956


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,35 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Upload the MATLAB MLTBX Release Candidate to the GitHub Releases
+# area of the Apache Arrow GitHub project.
+mltbx_file="${ARROW_ARTIFACTS_DIR}/matlab-dist/matlab-arrow-${version_with_rc}.mltbx"
+mltbx_signature_gpg_ascii_armor=${mltbx_file}.asc
+mltbx_checksum_sha512=${mltbx_file}.sha512
+
+# Sign the MLTBX file and create a detached (--deatch-sign) ASCII armor (--armor) GPG signature file.
+gpg --detach-sign --local-user "${GPG_KEY_ID}" --armor ${mltbx_file}
+
+# Compute the SHA512 checksum of the MLTBX file.
+shasum --algorithm 512 ${mltbx_file} > ${mltbx_checksum_sha512}
+
+# Upload artifacts to the Apache Arrow
+# GitHub Releases area and mark as a "Prerelease".
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag=apache-arrow-${version_with_rc}
+  target_branch=release-${version_with_rc}
+  release_notes="Release Candidate: ${version} RC${rc}"
+  title="Apache Arrow ${version} RC${rc}"
+  repository="https://github.com/apache/arrow"
+  gh release create \

Review Comment:
   Actually, I just realized you are right. We will need to add a note about requiring the GItHub CLI to be installed locally. While we are no longer using `gh` to create the release in `04-binary-upload.sh`, we will need to use `gh` once the GitHub release is created to upload the signed MLTBX files.  
   
   I'll make sure to add a note about this requirement to the release [documentation](https://github.com/apache/arrow/blob/main/docs/source/developers/release.rst).
   
   Sorry about the confusion!



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,18 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Create a git tag to associate with a GitHub Release that will
+# have the release candidate MLTBX file as an asset. 
+# 
+# Push this tag (e.g. apache-arrow-15.0.2-rc0) to the remote
+# apache/arrow repository to trigger the GitHub Actions Workflow 
+# that creates the GitHub Release and uploads the MLTBX file.
+#
+# See .github/workflows/package.yml for details.
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag="apache-arrow-${version_with_rc}"
+  tag_message="Release candidate: ${version_with_rc}"
+  git tag -a ${release_tag} -m ${tag_message}
+  git push apache ${release_tag}

Review Comment:
   It makes sense!



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   Superseeded by #41131 


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   #37350 is a related issue for automated release signing.


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   > We can use `dev/release/04-binary-download.sh ${MAJOR}.${MINOR}.${PATCH} ${RC} --task-filter matlab` to download the `.mltbx` file. :-)
   
   Thanks for the suggestion! 


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   Hi @kou and @assignUser,
   
   Thanks for sending us a lot of helpful resources on how to best cut a GitHub Release. @kevingurney and I will review them and re-work our implementation to use GitHub Actions.
   
   To start, we may use the manual signing approach @kou laid out just to get something working, but we would like to transition to an automated signing approach as @assignUser suggested. We'd be happy to investigate how we can get approval from the ASF to automate signing our release artifacts.
   
   Thanks again!
   Sarah


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,18 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Create a git tag to associate with a GitHub Release that will
+# have the release candidate MLTBX file as an asset. 
+# 
+# Push this tag (e.g. apache-arrow-15.0.2-rc0) to the remote
+# apache/arrow repository to trigger the GitHub Actions Workflow 
+# that creates the GitHub Release and uploads the MLTBX file.
+#
+# See .github/workflows/package.yml for details.
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag="apache-arrow-${version_with_rc}"
+  tag_message="Release candidate: ${version_with_rc}"
+  git tag -a ${release_tag} -m ${tag_message}
+  git push apache ${release_tag}

Review Comment:
   Thanks for the clarification! I've created a issue #41102 to track this work. Once this PR is merged, I'll take ownership of that issue and make the required changes.



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,18 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Create a git tag to associate with a GitHub Release that will
+# have the release candidate MLTBX file as an asset. 
+# 
+# Push this tag (e.g. apache-arrow-15.0.2-rc0) to the remote
+# apache/arrow repository to trigger the GitHub Actions Workflow 
+# that creates the GitHub Release and uploads the MLTBX file.
+#
+# See .github/workflows/package.yml for details.
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag="apache-arrow-${version_with_rc}"
+  tag_message="Release candidate: ${version_with_rc}"
+  git tag -a ${release_tag} -m ${tag_message}
+  git push apache ${release_tag}

Review Comment:
   Could you do this in `dev/release/01-prepare.sh` something like the following?
   
   ```diff
   diff --git a/dev/release/01-prepare.sh b/dev/release/01-prepare.sh
   index 01fa2f3d80..f5ec0a8e26 100755
   --- a/dev/release/01-prepare.sh
   +++ b/dev/release/01-prepare.sh
   @@ -33,7 +33,7 @@ next_version=$2
    next_version_snapshot="${next_version}-SNAPSHOT"
    rc_number=$3
    
   -release_tag="apache-arrow-${version}"
   +rc_tag="apache-arrow-${version}-rc${rc_number}"
    release_branch="release-${version}"
    release_candidate_branch="release-${version}-rc${rc_number}"
    
   @@ -45,9 +45,9 @@ release_candidate_branch="release-${version}-rc${rc_number}"
    : ${PREPARE_TAG:=${PREPARE_DEFAULT}}
    
    if [ ${PREPARE_TAG} -gt 0 ]; then
   -  if [ $(git tag -l "${release_tag}") ]; then
   -    echo "Delete existing git tag $release_tag"
   -    git tag -d "${release_tag}"
   +  if [ $(git tag -l "${rc_tag}") ]; then
   +    echo "Delete existing git tag $c_tag"
   +    git tag -d "${rc_tag}"
      fi
    fi
    
   @@ -91,7 +91,7 @@ if [ ${PREPARE_LINUX_PACKAGES} -gt 0 ]; then
    fi
    
    if [ ${PREPARE_VERSION_PRE_TAG} -gt 0 ]; then
   -  echo "Prepare release ${version} on tag ${release_tag} then reset to version ${next_version_snapshot}"
   +  echo "Prepare release ${version} on tag ${rc_tag} then reset to version ${next_version_snapshot}"
    
      update_versions "${version}" "${next_version}" "release"
      git commit -m "MINOR: [Release] Update versions for ${version}"
   @@ -100,5 +100,5 @@ fi
    ############################## Tag the Release ##############################
    
    if [ ${PREPARE_TAG} -gt 0 ]; then
   -  git tag -a "${release_tag}" -m "[Release] Apache Arrow Release ${version}"
   +  git tag -a "${rc_tag}" -m "[Release] Apache Arrow Release ${version}"
    fi
   ```



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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

   I just wanted to say I really appreciate your work on this and your style of communication! 
   
   Just to clarify the comment about the automated release signing was more a tangent and we would likely implement it for all things in the monorepo at once. So you can continue with the manual way for now with no problems!


-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,18 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Create a git tag to associate with a GitHub Release that will
+# have the release candidate MLTBX file as an asset. 
+# 
+# Push this tag (e.g. apache-arrow-15.0.2-rc0) to the remote
+# apache/arrow repository to trigger the GitHub Actions Workflow 
+# that creates the GitHub Release and uploads the MLTBX file.
+#
+# See .github/workflows/package.yml for details.
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag="apache-arrow-${version_with_rc}"
+  tag_message="Release candidate: ${version_with_rc}"
+  git tag -a ${release_tag} -m ${tag_message}
+  git push apache ${release_tag}

Review Comment:
   Hi @kou,
   
   On second thought, we think it actually makes more sense to tackle #41102 first since the new GitHub Actions Workflow (`package.yml`) requires the release candidate tag (`apache-arrow.X.Y.Z-rcN`) to be pushed. We'll put this PR on pause for a bit until that #41102 is closed.
   
   Best,
   Sarah 
   



-- 
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-40924: [MATLAB][Packaging] Add script for uploading Release Candidate (RC) MLTBX packages for the MATLAB bindings to the Apache Arrow GitHub Releases area [arrow]

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


##########
dev/release/05-binary-upload.sh:
##########
@@ -135,3 +136,18 @@ docker_run \
     VERBOSE=${VERBOSE:-no} \
     VERSION=${version} \
     YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}")
+
+# Create a git tag to associate with a GitHub Release that will
+# have the release candidate MLTBX file as an asset. 
+# 
+# Push this tag (e.g. apache-arrow-15.0.2-rc0) to the remote
+# apache/arrow repository to trigger the GitHub Actions Workflow 
+# that creates the GitHub Release and uploads the MLTBX file.
+#
+# See .github/workflows/package.yml for details.
+if [ ${UPLOAD_MATLAB} -gt 0 ]; then
+  release_tag="apache-arrow-${version_with_rc}"
+  tag_message="Release candidate: ${version_with_rc}"
+  git tag -a ${release_tag} -m ${tag_message}
+  git push apache ${release_tag}

Review Comment:
   Could you do this in `dev/release/01-prepare.sh` something like the following?
   
   ```diff
   diff --git a/dev/release/01-prepare.sh b/dev/release/01-prepare.sh
   index 01fa2f3d80..f5ec0a8e26 100755
   --- a/dev/release/01-prepare.sh
   +++ b/dev/release/01-prepare.sh
   @@ -33,7 +33,7 @@ next_version=$2
    next_version_snapshot="${next_version}-SNAPSHOT"
    rc_number=$3
    
   -release_tag="apache-arrow-${version}"
   +rc_tag="apache-arrow-${version}-rc${rc_number}"
    release_branch="release-${version}"
    release_candidate_branch="release-${version}-rc${rc_number}"
    
   @@ -45,9 +45,9 @@ release_candidate_branch="release-${version}-rc${rc_number}"
    : ${PREPARE_TAG:=${PREPARE_DEFAULT}}
    
    if [ ${PREPARE_TAG} -gt 0 ]; then
   -  if [ $(git tag -l "${release_tag}") ]; then
   -    echo "Delete existing git tag $release_tag"
   -    git tag -d "${release_tag}"
   +  if [ $(git tag -l "${rc_tag}") ]; then
   +    echo "Delete existing git tag $rc_tag"
   +    git tag -d "${rc_tag}"
      fi
    fi
    
   @@ -91,7 +91,7 @@ if [ ${PREPARE_LINUX_PACKAGES} -gt 0 ]; then
    fi
    
    if [ ${PREPARE_VERSION_PRE_TAG} -gt 0 ]; then
   -  echo "Prepare release ${version} on tag ${release_tag} then reset to version ${next_version_snapshot}"
   +  echo "Prepare release ${version} on tag ${rc_tag} then reset to version ${next_version_snapshot}"
    
      update_versions "${version}" "${next_version}" "release"
      git commit -m "MINOR: [Release] Update versions for ${version}"
   @@ -100,5 +100,5 @@ fi
    ############################## Tag the Release ##############################
    
    if [ ${PREPARE_TAG} -gt 0 ]; then
   -  git tag -a "${release_tag}" -m "[Release] Apache Arrow Release ${version}"
   +  git tag -a "${rc_tag}" -m "[Release] Apache Arrow Release ${version}"
    fi
   ```



-- 
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