Repository navigation
Conversation
_runner-determinator.yml checked out .github/scripts/runner_determinator.py from github.event.pull_request.head.sha, so PRs whose branch predates a change to the script (e.g. the "lf." -> "lf-" prefix rename, or the EC2 build-path removal in #189113/#189171) run a stale copy. That stale copy can emit a runner-label prefix main's build workflow no longer knows how to route (e.g. "lf.l-x86iavx512-8-64" - a dead EC2-era dotted prefix glued onto a post-#189113 ARC-only label), leaving the job stuck unroutable instead of just landing on the wrong fleet. The PR-head ref was introduced in #182579 only so ci-docker-hash reflects the PR's own .ci/docker tree, not to let PRs self-test determinator changes. Split the checkout in two: the script now comes from the default ref (main, or the merge commit for pull_request events, which still includes the PR's own edits to the script), while .ci/docker keeps using head.sha via a separate sparse checkout under pr-head/. This also removes the --help probing for --workflow-name, since the script is no longer stale relative to main and always supports the flag. Co-Authored-By: Claude Sonnet 5 <[email protected]> Signed-off-by: Thanh Ha <[email protected]>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/189782
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 3 PendingAs of commit 831d605 with merge base 5869005 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
huydhn
left a comment
There was a problem hiding this comment.
Oh, good catch! Is my understanding correct that this would help fix pytorch/ci-infra#895 too as the runner determination script and the workflow are now in sync?
|
please review this PR and answer a few questions:
|
|
Claude finished @jeanschmidt's task in 3m 15s —— View job Review: Checkout determinator script from base ref, not PR headGood, well-scoped change. Splitting the single sparse-checkout into two (script from the default ref, Detailed answers & review1) Does it point to
|
This does not touch lint or ghstack so I'm not sure if it solves those specific items mentioned in your issue. But because it uses merge commit, it does solve the runner determinator python script and workflow issue so both can be merged in the same commit now. If someone proposes a change to either workflow or python script (or both). It will then use the PR's version so the script and workflow are now in sync with this change. |
|
we probably need to rethink, as this won't work with ghstack. So maybe we should target main directly. I mean, when the author uses ghstack, they will never see a run from a different version of runner determinator. Due to a quirk on how ghstack works. |
|
see #189795 for example, the base is a synthetic base that is fixed and does not follow main |
jeanschmidt
left a comment
There was a problem hiding this comment.
use of ghstack is very common on pytorch, lets make sure to use main and not base to avoid the same problem on most of the PRs
Hmm, I'm a bit confuse on why this is not what we need on ghstack. If I understand this correctly, ghstack PRs will use whatever the runner script / workflows are on the stack. The problem is not really old runner determinator script, but that the script and the workflows are out of sync. And this change address this discrepancy by pointing them both to the "default" merge commit. We can test this using ghstack to confirm, for example adding a new parameter to the script? |
|
Ok, not following: Isn't the problem that runner determinator is running from PR head, and this changes to base ref? If this is the case, assuming the author is not introducing runner determinator or workflow changes this should not change the situation. Correct? |
Not sure if this makes it more clear. It uses a merge of base & PR head. So when an ghaction job runs it starts with the latest "main" for example (or whatever the merge branch is), and then adds PR changes on top of main. So my understand of how this works is:
|
I always thought that the runner determinator is from main because of this line https://github.com/pytorch/pytorch/blob/main/.github/workflows/pull.yml#L60, and the log shows https://github.com/pytorch/pytorch/actions/runs/29296467089/job/86970972910?pr=189797#step:1:30. But, as @zxiiro points out here, the checkout step inside actually get from PR head https://github.com/pytorch/pytorch/actions/runs/29296467089/job/86970972866?pr=189797#step:2:113. The regression here came from #182579. This change effectively reverts / redos #182579. This is the part that makes sense. On ghstack, the same principal applies, but the script and the workflow would come from the stack base, which could be very old, but "should" work as long as they are consistent |
|
ahh so we don't want runner determinator from main? Why not use PR head instead? What is the discrepancy we care about runner determinator script vs current main or runner determinator script vs pr head/base? |
|
@pytorchbot merge Another note is that I think the proposals from pytorch/ci-infra#895 still stands though as detecting the discrepancy (AI linter) and refuse to run PR whose base commit is too old (might be a controversy) can be useful feature to have |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 jobs have failed, first few of them are: Auto Request Review, docs-build Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot merge -f 'CI signals look a-ok' |
|
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
_runner-determinator.yml checked out .github/scripts/runner_determinator.py from github.event.pull_request.head.sha, so PRs whose branch predates a change to the script (e.g. the "lf." -> "lf-" prefix rename, or the EC2 build-path removal in pytorch#189113/pytorch#189171) run a stale copy. That stale copy can emit a runner-label prefix main's build workflow no longer knows how to route (e.g. "lf.l-x86iavx512-8-64" - a dead EC2-era dotted prefix glued onto a post-pytorch#189113 ARC-only label), leaving the job stuck unroutable instead of just landing on the wrong fleet. The PR-head ref was introduced in pytorch#182579 only so ci-docker-hash reflects the PR's own .ci/docker tree, not to let PRs self-test determinator changes. Split the checkout in two: the script now comes from the default ref (main, or the merge commit for pull_request events, which still includes the PR's own edits to the script), while .ci/docker keeps using head.sha via a separate sparse checkout under pr-head/. This also removes the --help probing for --workflow-name, since the script is no longer stale relative to main and always supports the flag. Pull Request resolved: pytorch#189782 Approved by: https://github.com/huydhn, https://github.com/jeanschmidt Co-authored-by: Claude Sonnet 5 <[email protected]>
_runner-determinator.yml checked out .github/scripts/runner_determinator.py from github.event.pull_request.head.sha, so PRs whose branch predates a change to the script (e.g. the "lf." -> "lf-" prefix rename, or the EC2 build-path removal in pytorch#189113/pytorch#189171) run a stale copy. That stale copy can emit a runner-label prefix main's build workflow no longer knows how to route (e.g. "lf.l-x86iavx512-8-64" - a dead EC2-era dotted prefix glued onto a post-pytorch#189113 ARC-only label), leaving the job stuck unroutable instead of just landing on the wrong fleet. The PR-head ref was introduced in pytorch#182579 only so ci-docker-hash reflects the PR's own .ci/docker tree, not to let PRs self-test determinator changes. Split the checkout in two: the script now comes from the default ref (main, or the merge commit for pull_request events, which still includes the PR's own edits to the script), while .ci/docker keeps using head.sha via a separate sparse checkout under pr-head/. This also removes the --help probing for --workflow-name, since the script is no longer stale relative to main and always supports the flag. Pull Request resolved: pytorch#189782 Approved by: https://github.com/huydhn, https://github.com/jeanschmidt Co-authored-by: Claude Sonnet 5 <[email protected]>
_runner-determinator.yml checked out .github/scripts/runner_determinator.py from github.event.pull_request.head.sha, so PRs whose branch predates a change to the script (e.g. the "lf." -> "lf-" prefix rename, or the EC2 build-path removal in pytorch#189113/pytorch#189171) run a stale copy. That stale copy can emit a runner-label prefix main's build workflow no longer knows how to route (e.g. "lf.l-x86iavx512-8-64" - a dead EC2-era dotted prefix glued onto a post-pytorch#189113 ARC-only label), leaving the job stuck unroutable instead of just landing on the wrong fleet. The PR-head ref was introduced in pytorch#182579 only so ci-docker-hash reflects the PR's own .ci/docker tree, not to let PRs self-test determinator changes. Split the checkout in two: the script now comes from the default ref (main, or the merge commit for pull_request events, which still includes the PR's own edits to the script), while .ci/docker keeps using head.sha via a separate sparse checkout under pr-head/. This also removes the --help probing for --workflow-name, since the script is no longer stale relative to main and always supports the flag. Pull Request resolved: pytorch#189782 Approved by: https://github.com/huydhn, https://github.com/jeanschmidt Co-authored-by: Claude Sonnet 5 <[email protected]>
_runner-determinator.yml checked out .github/scripts/runner_determinator.py from github.event.pull_request.head.sha, so PRs whose branch predates a change to the script (e.g. the "lf." -> "lf-" prefix rename, or the EC2 build-path removal in pytorch#189113/pytorch#189171) run a stale copy. That stale copy can emit a runner-label prefix main's build workflow no longer knows how to route (e.g. "lf.l-x86iavx512-8-64" - a dead EC2-era dotted prefix glued onto a post-pytorch#189113 ARC-only label), leaving the job stuck unroutable instead of just landing on the wrong fleet. The PR-head ref was introduced in pytorch#182579 only so ci-docker-hash reflects the PR's own .ci/docker tree, not to let PRs self-test determinator changes. Split the checkout in two: the script now comes from the default ref (main, or the merge commit for pull_request events, which still includes the PR's own edits to the script), while .ci/docker keeps using head.sha via a separate sparse checkout under pr-head/. This also removes the --help probing for --workflow-name, since the script is no longer stale relative to main and always supports the flag. Pull Request resolved: pytorch#189782 Approved by: https://github.com/huydhn, https://github.com/jeanschmidt Co-authored-by: Claude Sonnet 5 <[email protected]>
_runner-determinator.yml checked out .github/scripts/runner_determinator.py from github.event.pull_request.head.sha, so PRs whose branch predates a change to the script (e.g. the "lf." -> "lf-" prefix rename, or the EC2 build-path removal in #189113/#189171) run a stale copy. That stale copy can emit a runner-label prefix main's build workflow no longer knows how to route (e.g. "lf.l-x86iavx512-8-64" - a dead EC2-era dotted prefix glued onto a post-#189113 ARC-only label), leaving the job stuck unroutable instead of just landing on the wrong fleet.
The PR-head ref was introduced in #182579 only so ci-docker-hash reflects the PR's own .ci/docker tree, not to let PRs self-test determinator changes. Split the checkout in two: the script now comes from the default ref (main, or the merge commit for pull_request events, which still includes the PR's own edits to the script), while .ci/docker keeps using head.sha via a separate sparse checkout under pr-head/.
This also removes the --help probing for --workflow-name, since the script is no longer stale relative to main and always supports the flag.