Skip to content

GH-50363: [Release] Fix PHASE_BUILD_MSI step in 07-flightsqlodbc-upload.sh#50364

Open
amoeba wants to merge 4 commits into
apache:mainfrom
amoeba:GH-50363--release--fix-flightsql-odbc-script-wait-step
Open

GH-50363: [Release] Fix PHASE_BUILD_MSI step in 07-flightsqlodbc-upload.sh#50364
amoeba wants to merge 4 commits into
apache:mainfrom
amoeba:GH-50363--release--fix-flightsql-odbc-script-wait-step

Conversation

@amoeba

@amoeba amoeba commented Jul 3, 2026

Copy link
Copy Markdown
Member

Rationale for this change

The PHASE_BUILD_MSI step in 07-flightsqlodbc-upload.sh didn't wait for the right job when I ran it during the 25.0.0 release. It found another job and exited saying the job was completed. See my output in #50363.

What changes are included in this PR?

Changes how the PHASE_BUILD_MSI step works so the exact run ID that was triggered gets captured and then gets passed to the wait step. The wait step then waits for a specific job ID to complete. This PR also includes an enhancement to the existing utils-watch-gh-workflow.sh script to let it take an optional run ID.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the awaiting review Awaiting review label Jul 3, 2026
@amoeba amoeba marked this pull request as ready for review July 3, 2026 20:38
Copilot AI review requested due to automatic review settings July 3, 2026 20:38
@amoeba amoeba requested review from kou and raulcd as code owners July 3, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a release automation race in dev/release/07-flightsqlodbc-upload.sh where the MSI-build phase could “watch” the wrong GitHub Actions run by ensuring the exact workflow run ID is captured and (optionally) passed through to the watcher script.

Changes:

  • Add optional run-id support to utils-watch-gh-workflow.sh so callers can watch a specific run.
  • Update 07-flightsqlodbc-upload.sh to capture the run URL/ID from gh workflow run and pass it to the watcher.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
dev/release/utils-watch-gh-workflow.sh Accepts an optional run ID to watch; adjusts how a run is discovered before invoking gh run watch.
dev/release/07-flightsqlodbc-upload.sh Captures the triggered workflow run URL/ID and passes it to the watcher during PHASE_BUILD_MSI.

Comment thread dev/release/utils-watch-gh-workflow.sh
Comment thread dev/release/utils-watch-gh-workflow.sh
Comment thread dev/release/07-flightsqlodbc-upload.sh
I guess runs can be queued too so we can capture that now with this fix.
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jul 3, 2026
Copilot AI review requested due to automatic review settings July 3, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@kou

kou commented Jul 3, 2026

Copy link
Copy Markdown
Member

How about filtering by --event=workflow_dispatch instead of parsing gh workflow run output?

diff --git a/dev/release/07-flightsqlodbc-upload.sh b/dev/release/07-flightsqlodbc-upload.sh
index c823bc84ae..49f901a64f 100755
--- a/dev/release/07-flightsqlodbc-upload.sh
+++ b/dev/release/07-flightsqlodbc-upload.sh
@@ -143,7 +143,8 @@ if [ "${PHASE_BUILD_MSI}" -gt 0 ]; then
     --field odbc_release_step=true
 
   echo "[5/8] Waiting for workflow to complete. This can take a very long time..."
-  REPOSITORY="${GITHUB_REPOSITORY}" \
+  EVENT="workflow_dispatch" \
+    REPOSITORY="${GITHUB_REPOSITORY}" \
     "${SOURCE_DIR}/utils-watch-gh-workflow.sh" "${tag}" package_odbc.yml
 fi
 
diff --git a/dev/release/utils-watch-gh-workflow.sh b/dev/release/utils-watch-gh-workflow.sh
index 163f30251f..83c66d91e9 100755
--- a/dev/release/utils-watch-gh-workflow.sh
+++ b/dev/release/utils-watch-gh-workflow.sh
@@ -29,6 +29,7 @@ fi
 TAG=$1
 WORKFLOW=$2
 : "${REPOSITORY:=${GITHUB_REPOSITORY:-apache/arrow}}"
+: "${EVENT:=push}"
 
 echo "Looking for GitHub Actions workflow on ${REPOSITORY}:${TAG}"
 RUN_ID=""
@@ -36,6 +37,7 @@ while true; do
   echo "Waiting for run to start..."
   RUN_ID=$(gh run list \
               --branch "${TAG}" \
+              --event "${EVENT}" \
               --jq '.[].databaseId' \
               --json databaseId \
               --limit 1 \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting committer review Awaiting committer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants