GH-50363: [Release] Fix PHASE_BUILD_MSI step in 07-flightsqlodbc-upload.sh#50364
Open
amoeba wants to merge 4 commits into
Open
GH-50363: [Release] Fix PHASE_BUILD_MSI step in 07-flightsqlodbc-upload.sh#50364amoeba wants to merge 4 commits into
amoeba wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
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-idsupport toutils-watch-gh-workflow.shso callers can watch a specific run. - Update
07-flightsqlodbc-upload.shto capture the run URL/ID fromgh workflow runand 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. |
I guess runs can be queued too so we can capture that now with this fix.
Member
|
How about filtering by 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.