Conversation
Rewrites branch mode in ci/tools/lookup-run-id to walk the branch's commit history from HEAD and return the first commit whose workflow has a successful run passing any required artifact check. The one Actions-API filter used in the hot path is ?head_sha=<SHA>, which is not among the server-side filters community/discussions/24626 flags as returning stale slices (branch=, status=, created=). The cross-check / union / wall-clock-freshness logic from NVIDIA#2976 and NVIDIA#2999 is no longer needed. Also removes ci/tools/tests/test_lookup_run_id.py; CI tooling that runs on every PR is exercised by CI itself. Refs NVIDIA#2975.
Contributor
1 of 2 tasks
Member
Author
|
/ok to test b8b2ffe |
Contributor
|
jpascucci-nv
approved these changes
Oct 5, 2026
jpascucci-nv
left a comment
Contributor
There was a problem hiding this comment.
My ai says "My take: PR 3013’s branch-walk design is the better mitigation. I’d prefer adopting that strategy, but keep the tests (JRP I agree we can lose the test) and probably add a local head_branch == REF check in the head_sha results to avoid accidentally accepting a same-SHA run from another branch. (JRP: I guess this could happen if we merge a branch?)"
This branch has not been deployed
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.
Alternative to #2999 for the same underlying issue (#2975), for comparison — not for merging without discussion.
Rewrites branch mode in
ci/tools/lookup-run-idto walk the branch's commit history from HEAD and return the first commit whose workflow has a successful run passing the artifact check. The one Actions-API filter used in the hot path is?head_sha=<SHA>, which is not among the server-side filters community#24626 flags as returning stale slices.Why this instead of #2999's union-and-cross-check approach:
gh run listand the server-sidebranch=/status=/created=filters all drop out — nothing in the hot path hits a filter 24626 names.headSha == BRANCH_HEADpreference encoding — walk order is the preference.Call cost in the common case:
LOOKUP_RUN_ID_COMMIT_SCAN_LIMIT(default 200), errors loudly on exhaustion.Tag mode is untouched (it uses
--commit, not an affected filter, and is low call-volume).Also removes
ci/tools/tests/test_lookup_run_id.py— per discussion on #2975, CI tooling that runs on every PR is exercised by CI itself; the orphaned test suite is removed rather than wired in.-- Leo's bot