Skip to content

Compute .ci/docker tree hash to runner_determinator - #182579

Closed
malfet wants to merge 2 commits into
gh/malfet/883/basefrom
gh/malfet/883/head
Closed

malfet wants to merge 2 commits into
gh/malfet/883/basefrom
gh/malfet/883/head

Conversation

@malfet

@malfet malfet commented May 5, 2026 •

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

Adds a ci-docker-hash output to the runner-determinator reusable workflow, computed once via git rev-parse HEAD:.ci/docker.
This is a prep no-op: no callers consume the output yet.
The intent is to pass a versioned docker image tag to ARC-hosted jobs so they can use the same versioned images as their non-ARC counterparts

Test plan: #182894 - sparse checkout is still 1 sec, computed hash looks reasonable, need to merge the change first to understand if it'll pick them up

Authored by Claude.

[ghstack-poisoned]
@malfet
malfet requested a review from a team as a code owner May 5, 2026 22:23
@pytorch-bot

pytorch-bot Bot commented May 5, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/182579

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit af64f68 with merge base 0464301 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label May 5, 2026
@huydhn

huydhn commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Why not add this to get-label-type, i.e. https://github.com/pytorch/pytorch/blob/main/.github/workflows/pull.yml#L59 instead of job-filter? We need get-label-type in all migrated workflow as it runs the runner determinator logic, while job-filter is not an universal steps in CI, i.e. https://github.com/pytorch/pytorch/blob/main/.github/workflows/slow.yml doesn't have it

Comment thread .github/workflows/job-filter.yml Resolved
@malfet

malfet commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

Why not add this to get-label-type, i.e. https://github.com/pytorch/pytorch/blob/main/.github/workflows/pull.yml#L59 instead of job-filter? We need get-label-type in all migrated workflow as it runs the runner determinator logic, while job-filter is not an universal steps in CI, i.e. https://github.com/pytorch/pytorch/blob/main/.github/workflows/slow.yml doesn't have it

get-label-type feels like a more natural name than runner determinator, but sure, why not

[ghstack-poisoned]
malfet added a commit that referenced this pull request May 7, 2026
Adds a `ci-docker-hash` output to the job-filter reusable workflow,
computed once via `git rev-parse HEAD:.ci/docker`. This is a prep no-op:
no callers consume the output yet. The intent is to pass a versioned
docker image tag to ARC-hosted jobs so they can skip the per-job
`calculate-docker-image` step and pull the exact image directly.

Authored by Claude.

ghstack-source-id: 730aa69
Pull-Request: #182579
@malfet malfet changed the title Compute .ci/docker tree hash in job-filter Compute .ci/docker tree hash to runner_determinator May 7, 2026

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

LGTM! I will land pytorch/ci-infra#540 so we can test this out on CI

@malfet

malfet commented May 7, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -f "Lint is green"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@malfet

malfet commented May 7, 2026

Copy link
Copy Markdown
Collaborator Author

And it works as expected, from https://github.com/pytorch/pytorch/actions/runs/25522529652/job/74910194109?pr=182894#step:2:5

ci-docker-hash=4472be62ae0897e883f819f46e0d531d8d4f12cd

Which indeed was a local hash at the time I've merged it

Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
Adds a `ci-docker-hash` output to the runner-determinator reusable workflow, computed once via `git rev-parse HEAD:.ci/docker`.
This is a prep no-op: no callers consume the output yet.
The intent is to pass a versioned docker image tag to ARC-hosted jobs so they can use the same versioned images as their non-ARC counterparts

Test plan: pytorch#182894 - sparse checkout is still 1 sec, computed hash looks reasonable, need to merge the change first to understand if it'll pick them up

Authored by Claude.
Pull Request resolved: pytorch#182579
Approved by: https://github.com/huydhn
@github-actions
github-actions Bot deleted the gh/malfet/883/head branch June 7, 2026 02:29
aperson30 pushed a commit to aperson30/pytorch that referenced this pull request Jun 20, 2026
Adds a `ci-docker-hash` output to the runner-determinator reusable workflow, computed once via `git rev-parse HEAD:.ci/docker`.
This is a prep no-op: no callers consume the output yet.
The intent is to pass a versioned docker image tag to ARC-hosted jobs so they can use the same versioned images as their non-ARC counterparts

Test plan: pytorch#182894 - sparse checkout is still 1 sec, computed hash looks reasonable, need to merge the change first to understand if it'll pick them up

Authored by Claude.
Pull Request resolved: pytorch#182579
Approved by: https://github.com/huydhn
zxiiro added a commit that referenced this pull request Jul 13, 2026
_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]>
pytorchmergebot pushed a commit that referenced this pull request Jul 14, 2026
_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.
Pull Request resolved: #189782
Approved by: https://github.com/huydhn, https://github.com/jeanschmidt

Co-authored-by: Claude Sonnet 5 <[email protected]>
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
Adds a `ci-docker-hash` output to the runner-determinator reusable workflow, computed once via `git rev-parse HEAD:.ci/docker`.
This is a prep no-op: no callers consume the output yet.
The intent is to pass a versioned docker image tag to ARC-hosted jobs so they can use the same versioned images as their non-ARC counterparts

Test plan: pytorch#182894 - sparse checkout is still 1 sec, computed hash looks reasonable, need to merge the change first to understand if it'll pick them up

Authored by Claude.
Pull Request resolved: pytorch#182579
Approved by: https://github.com/huydhn
vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
_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]>
DamJanusz pushed a commit to DamJanusz/pytorch that referenced this pull request Jul 21, 2026
_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]>
youlituao pushed a commit to youlituao/pytorch that referenced this pull request Jul 28, 2026
_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]>
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
Adds a `ci-docker-hash` output to the runner-determinator reusable workflow, computed once via `git rev-parse HEAD:.ci/docker`.
This is a prep no-op: no callers consume the output yet.
The intent is to pass a versioned docker image tag to ARC-hosted jobs so they can use the same versioned images as their non-ARC counterparts

Test plan: pytorch#182894 - sparse checkout is still 1 sec, computed hash looks reasonable, need to merge the change first to understand if it'll pick them up

Authored by Claude.
Pull Request resolved: pytorch#182579
Approved by: https://github.com/huydhn
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
_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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants