Skip to content

[CI] Remove unused EC2 runner labels and arc.yaml runner_mapping - #200315

Closed
huydhn wants to merge 2 commits into
pytorch:mainfrom
huydhn:cleanup-ec2-runner-labels
Closed

huydhn wants to merge 2 commits into
pytorch:mainfrom
huydhn:cleanup-ec2-runner-labels

Conversation

@huydhn

@huydhn huydhn commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary (human written only)

Clean up old EC2 runner references

Agent details (if applicable)

Workflows now name their ARC pods directly, and map_ec2_to_arc.py, the only reader of runner_mapping in .github/arc.yaml, was removed in #198706. This drops runner_mapping. runner_determinator.py only reads lf_allowlist, which stays, along with the ARC label format docs.

In .github/actionlint.yaml, this drops the EC2 labels that no generated workflow, template or composite action requests anymore: the old AWS Linux labels, the lf.linux.* labels, the unused Windows GPU labels, and windows.12xlarge.nonephemeral / windows.g4dn.xlarge.nonephemeral. The last two are only referenced from the non-nightly branches of windows_binary_build_workflow.yml.j2, which no generated workflow uses. The runs_on default in _binary-build-linux.yml moves from linux.12xlarge.memory.ephemeral to its OSDC equivalent l-x86iavx512-48-384; every caller already passes runs_on. Windows labels still in use are kept. Unused non-EC2 labels are left alone.

@pytorch-bot

pytorch-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 165 Pending

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

🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:

  • Release path
    • Changes the runs_on default in .github/workflows/_binary-build-linux.yml, the reusable build behind the nightly manywheel binary workflows
    • CI config class excludes release or publish paths, even though the template passes runs_on at each call site
  • Lint allowlist coverage
    • Drops windows.12xlarge.nonephemeral and windows.g4dn.xlarge.nonephemeral from .github/actionlint.yaml
    • Both are still emitted by .github/templates/windows_binary_build_workflow.yml.j2 lines 87 and 211, so regenerating a non-nightly workflow would fail actionlint
  • Breadth
    • Removes about 40 runner labels and the whole runner_mapping block from .github/arc.yaml; a human should confirm no out-of-repo consumer reads that block

reason: not_trivial
Reviewed commit: da84817 (NOT the current head c7b2f92)

Inference job

🐛 Report a wrong verdict

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 Oct 8, 2026
@huydhn
huydhn force-pushed the cleanup-ec2-runner-labels branch from 105d066 to 54519cf Compare October 8, 2026 19:01
@huydhn
huydhn marked this pull request as ready for review October 8, 2026 19:04
@huydhn
huydhn requested a review from a team as a code owner October 8, 2026 19:04
@huydhn
huydhn force-pushed the cleanup-ec2-runner-labels branch from 54519cf to da84817 Compare October 9, 2026 19:40

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

Review summary

⚪ 1 nit

  • ⚪ ci-runner-naming.md still describes .github/arc.yaml as "a reference mapping that no code reads" after this change deletes runner_mapping — .github/arc.yaml:23 (LEFT)
Extended analysis (ai-generated section)

What this changes

Three files, mostly deletions. .github/actionlint.yaml loses about forty self-hosted runner labels: the organization-wide AWS Linux set, every lf.linux.* entry, the Windows GPU labels, and two Windows .nonephemeral labels. .github/arc.yaml loses its entire runner_mapping block, leaving lf_allowlist as the file's only content, with the surrounding comments reworded to drop the "post-mapping" framing. .github/workflows/_binary-build-linux.yml:30 changes the runs_on input default from linux.12xlarge.memory.ephemeral to l-x86iavx512-48-384. No script, template, or generated workflow is touched.

What it gets right

The deletions are scoped rather than swept. windows.4xlarge.nonephemeral stays in the allowlist because it is the default of _win-build.yml:51 and is named directly thirteen times in trunk.yml. lf_allowlist stays because runner_determinator.py:720-756 opens the file for exactly that key, and _runner-determinator.yml:125-128 sparse-checks the file out for that read. Nothing in the tree still references runner_mapping or map_ec2_to_arc. All three callers of _binary-build-linux.yml pass runs_on explicitly, so the default change is inert at head.

Where the risk is

The problems cluster on one seam: what the repo declares versus what can still generate a label. actionlint reads only .github/workflows/*.yml — .lintrunner.toml:1024-1031 scopes it that way — so the Jinja templates that produce those workflows are outside the check, and a deletion from the allowlist can only be validated by reading templates by hand. That is where the Windows finding lands: windows_binary_build_workflow.yml.j2:87 and :211 still emit the two delisted labels in their branches != "nightly" arms, which generate nothing today only because generate_ci_workflows.py:61 pins branches to nightly. The runs_on default is the same seam one level down: runs-on: ${{ inputs.runner_prefix }}${{ inputs.runs_on }} now composes an empty prefix default with a bare ARC core, so a caller relying on both defaults requests a label with no mt-/lf- routing. Both findings were merged from more than one reviewer's report, both are latent rather than live, and both share a failure mode: correctness checked against the currently generated set, not against every path that can generate. The documentation nit is that shape in prose — ci-runner-naming.md:134 still calls .github/arc.yaml "a reference mapping that no code reads", which after this change is false in both halves. The three carry separate cluster ids; they are not one edit.

Before merge, and after

The Windows template divergence is the one to settle first, despite its severity, because it is the cleanup's own premise: either delete the non-nightly arms at windows_binary_build_workflow.yml.j2:84-88 and :208-218, or restore the two lines to .github/actionlint.yaml. Either is a few lines. The runs_on default question needs an answer from outside the repository — whether the OSDC fleet serves an unprefixed l-* label at all. If it does not, making the input required: true to match _binary-test-linux.yml:32-33 is a one-line fix; if it does, the concern reduces to bypassed provider routing. The ci-runner-naming.md wording is reasonable follow-up: it is a single parenthetical in a file this change does not otherwise touch.

Comment thread .github/arc.yaml
# Entries marked "# upgraded" had no exact ARC equivalent and were mapped to
# the next larger available runner.

runner_mapping:

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.

I just had a chat with @mtarsel to provide a .md in test-infra with the naming schema in test-infra and we should probably point somewhere in this repo to it.


⚪ ci-runner-naming.md still describes .github/arc.yaml as "a reference mapping that no code reads" after this change deletes runner_mapping (ai-generated section)

This change deletes the whole runner_mapping block from .github/arc.yaml (the anchor line is the pre-change runner_mapping: key, numbered in the base file), leaving lf_allowlist as the file's only content. The repo's own review guide at .agents/skills/pr-review/ci-runner-naming.md:134 still characterises the file parenthetically as "a reference mapping that no code reads" — after this change there is no mapping in it, and the content that remains is read by the runner determinator on every CI run. .agents/skills/pr-review/ci-runner-naming.md:134: "Lines in .github/actionlint.yaml (a lint allowlist), .github/arc.yaml (a reference mapping that no code reads), *.md files or test fixtures never count." Post-change .github/arc.yaml (lines 22-33 in the head checkout) contains only lf_allowlist:; get_lf_runners_output() at .github/scripts/runner_determinator.py:720-756 opens that path and reads lf_allowlist, with the CLI default .github/arc.yaml set at .github/scripts/runner_determinator.py:269-270, and .github/workflows/_runner-determinator.yml:125-128 sparse-checks out .github/arc.yaml for exactly that read. .github/scripts/filter_test_configs.py:630-633 likewise calls get_lf_runners_output() "the only reader of arc.yaml". A repo-wide grep finds no remaining reference to runner_mapping or map_ec2_to_arc. A reviewer (or contributor) following that guide is told .github/arc.yaml is dead reference data, when after this change it is live configuration: its lf_allowlist entries are the only thing the determinator reads from the file, and editing them changes which ARC targets may stay on the lf- fleet. The step-6 rule itself (arc.yaml lines never count as a prior use of a runner label) is unaffected; only its justification is now false. Update the parenthetical at .agents/skills/pr-review/ci-runner-naming.md:134 to describe what the file now holds, e.g. ".github/arc.yaml (the LF fleet allowlist read by runner_determinator.py)", keeping the rule that its lines never count as a prior use of a label.

Reviewed by claude-opus-5[1m] at max effort, against da84817.

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 can open a PR in test-infra (not ci-infra) with what I described here: pytorch/ci-infra#396 (comment) and could add a comment in arc.yaml pointing to the markdown file

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.

Workflows now name their ARC pods directly, and map_ec2_to_arc.py, the only
reader of runner_mapping in .github/arc.yaml, was removed in pytorch#198706. That PR
kept the mapping as a reference for the EC2 correspondence, but it is no longer
needed, so drop it. runner_determinator.py only reads lf_allowlist, which stays,
along with the ARC label format docs.

In .github/actionlint.yaml, drop the EC2 labels that no workflow, template or
composite action requests anymore: the old AWS Linux labels, the lf.linux.*
Linux Foundation labels, and the unused Windows GPU labels. EC2 labels still in
use are kept: linux.12xlarge.memory.ephemeral (runs_on default in
_binary-build-linux.yml) and the windows.g4dn/4xlarge/12xlarge labels used by
the Windows binary workflows. Unused non-EC2 labels are left alone.

Test Plan:

```
lintrunner --take ACTIONLINT --all-files
cd .github/scripts && python -m unittest test_runner_determinator test_filter_test_configs
```

Both pass.

This PR was authored with an AI assistant (Claude Code).
Every caller passes runs_on, so the linux.12xlarge.memory.ephemeral default
was dead. Point it at l-x86iavx512-48-384, the ARC equivalent of r5.12xlarge
that the x86 build callers already use, and drop the label from
actionlint.yaml.

runs-on is composed as ${{ inputs.runner_prefix }}${{ inputs.runs_on }}, so
also default runner_prefix to mt-, the runner determinator's fallback prefix.
Otherwise a caller relying on both defaults would request a bare ARC label
with no fleet prefix. All current callers pass runner_prefix explicitly, so
neither default change affects them.

windows.12xlarge.nonephemeral and windows.g4dn.xlarge.nonephemeral stay in
actionlint.yaml: they are still emitted by the non-nightly branches of
windows_binary_build_workflow.yml.j2, even though no generated workflow uses
those branches today.

Also update ci-runner-naming.md, which described .github/arc.yaml as a
reference mapping that no code reads. With runner_mapping gone it only holds
lf_allowlist, which runner_determinator.py reads.

Test Plan:

```
lintrunner --take ACTIONLINT --all-files
```

No runner-label errors; the remaining shellcheck warnings are identical on
upstream/main.

This PR was authored with an AI assistant (Claude Code).
@huydhn
huydhn force-pushed the cleanup-ec2-runner-labels branch from da84817 to c7b2f92 Compare October 13, 2026 17:32
@huydhn huydhn added the ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR label Oct 13, 2026
@huydhn

huydhn commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f 'PR to clean up old runner labels, lint jobs have passed'

1 similar comment
@huydhn

huydhn commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f 'PR to clean up old runner labels, lint jobs have passed'

@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

@jeanschmidt

Copy link
Copy Markdown
Contributor

Documentation that now holds the official list and naming convention:

https://github.com/pytorch/ci-infra/blob/main/osdc/docs/runner_naming_convention.md
pytorch/ci-infra#1141

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

Labels

ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants