Skip to content

CI: Avoid manual lookup of the run ID in the release workflow - #918

Merged
leofang merged 8 commits into
mainfrom
copilot/fix-917
Sep 5, 2025
Merged

CI: Avoid manual lookup of the run ID in the release workflow#918
leofang merged 8 commits into
mainfrom
copilot/fix-917

Conversation

Copilot AI commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

This PR fixes an issue in the release workflow where the optional run-id input parameter was missing a default value, which could cause issues when the parameter is not provided.

The changes include:

  • Added default: "" to the optional run-id input parameter
  • Implemented automatic run ID lookup from git tag when run-id is not provided
  • Added comprehensive error handling and validation to the lookup script
  • Added documentation comment explaining the fetch-depth: 0 requirement for git tag access

The workflow now gracefully handles both scenarios:

  1. When run-id is provided manually (existing behavior preserved)
  2. When run-id is omitted, it automatically detects the correct run ID from the provided git tag

This eliminates the need for manual lookup of run IDs while maintaining full backward compatibility.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@copy-pr-bot

copy-pr-bot Bot commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copilot AI and others added 2 commits August 28, 2025 03:55
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
…dation

Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Copilot AI changed the title [WIP] CI: Avoid manual lookup of the run ID in the release workflow CI: Avoid manual lookup of the run ID in the release workflow Aug 28, 2025
Copilot AI requested a review from leofang August 28, 2025 03:59
Comment thread .github/workflows/release.yml
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Copilot AI requested a review from leofang August 28, 2025 04:09

@leofang leofang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One last sweep and we're done! I confirmed that the lookup-run-id script works locally.

Comment thread .github/workflows/release.yml
@leofang

leofang commented Sep 4, 2025

Copy link
Copy Markdown
Member

@copilot

…cript

Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Copilot AI requested a review from leofang September 4, 2025 02:05
@leofang

leofang commented Sep 4, 2025

Copy link
Copy Markdown
Member

pre-commit.ci autofix

@leofang leofang added P1 Medium priority - Should do CI/CD CI/CD infrastructure labels Sep 4, 2025
@leofang leofang added this to the cuda.core beta 7 milestone Sep 4, 2025
@leofang
leofang requested a review from cryos September 4, 2025 02:06
@leofang
leofang marked this pull request as ready for review September 4, 2025 02:07
@leofang

leofang commented Sep 4, 2025

Copy link
Copy Markdown
Member

This is ready for review. No need to run it through the CI, because the release workflow would not be exercised until the release time.

@leofang
leofang requested review from kkraus14 and rparolin September 4, 2025 02:08
@leofang leofang linked an issue Sep 4, 2025 that may be closed by this pull request
rwgk
rwgk previously approved these changes Sep 4, 2025

@rwgk rwgk 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.

This is awesome.

I usually weed out the 2>/dev/null code that ChatGPT seems to insert compulsively. It'd be ideal if you did that here, too. (Then admin merging would seem best.)

Comment thread ci/tools/lookup-run-id Outdated
Comment thread ci/tools/lookup-run-id Outdated
Comment thread ci/tools/lookup-run-id Outdated
Comment thread ci/tools/lookup-run-id
Comment thread ci/tools/lookup-run-id
Comment thread ci/tools/lookup-run-id
Comment thread ci/tools/lookup-run-id

@cryos cryos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would summarize the output to standard error as a way of offering debug and errors without polluting what is captured by the caller (the run ID). Seems reasonable and I see the logic. It works too and is something I wrote locally just the other day for another task and was about to look at here - you and copilot beat me again :-)

@leofang

leofang commented Sep 5, 2025

Copy link
Copy Markdown
Member

Thanks @cryos @rwgk for review 🙏 let's see if this works out of box next time we cut a release...

@leofang
leofang merged commit 1b78bb3 into main Sep 5, 2025
1 check passed
@leofang
leofang deleted the copilot/fix-917 branch September 5, 2025 02:47
@github-actions

github-actions Bot commented Sep 5, 2025

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

@leofang

leofang commented Sep 9, 2025

Copy link
Copy Markdown
Member

let's see if this works out of box next time we cut a release...

@rwgk confirmed with cuda-pathinder v1.2.2 release that the auto lookup works:
https://github.com/NVIDIA/cuda-python/actions/runs/17567646227

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

Labels

CI/CD CI/CD infrastructure P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Avoid manual lookup of the run ID in the release workflow

4 participants