Skip to content

Restore pull request cancellation in pull.yml - #22609

Merged
huydhn merged 2 commits into
mainfrom
fix/pull-concurrency
Sep 8, 2026
Merged

huydhn merged 2 commits into
mainfrom
fix/pull-concurrency

Conversation

@huydhn

@huydhn huydhn commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Two things, one enabling the other.

ciflow/trunk/* on pull.yml is a mistake. It arrived in #18172, which moved the ARM Cortex-M size test from trunk.yml to pull.yml and carried trunk's tag trigger across with the job. ciflow/trunk should run trunk.yml; pull.yml already runs on every pull request via pull_request, so those tag runs were duplicates — on #22549 the tag run had 120 jobs against the pull request run's 121. trunk.yml keeps the trigger.

With no tag push reaching this workflow, the concurrency key can go back to pytorch's. #21622 added github.ref_type == 'branch' && github.sha to stop ciflow tag re-pushes flooding the fleet, but that term is truthy on pull_request too, where github.sha is the merge commit and changes with every push — so pushes stopped cancelling superseded runs. Before #21622: eight consecutive runs on one branch, seven cancelled. After: three overlapping full runs on bump-torch-pin-2.14, none cancelled. The key now matches pytorch's pull.yml exactly, github.run_id included so two manual dispatches don't cancel each other.

Authored with Claude Code.

#21622 rolled the trunk-style concurrency key out to all 29 workflows to stop
ciflow tag re-pushes flooding the fleet. On pull.yml that had a cost nobody
noticed: `github.ref_type == 'branch'` is true on pull_request events too, and
there `github.sha` is the merge commit, which changes with every push. So each
push landed in a new group and cancel-in-progress stopped cancelling superseded
runs. Before #21622 eight consecutive runs on one branch would show seven
cancelled; after it, three full runs of this workflow overlap on a single
branch and all go to completion.

pytorch keeps the ref_name and ref_type variant on trunk.yml and periodic.yml,
the tag-driven workflows, and keeps this simpler key on pull.yml. Same split
here, with pull.yml's key now identical to theirs, including run_id on the
dispatch term so two manual dispatches of the same ref no longer cancel each
other.

Dropping the ciflow/trunk tag trigger is what makes that key safe: with no tag
push reaching this workflow there is nothing to fall back to github.sha for.
The tag runs were also redundant, since every pull request already runs this
workflow through pull_request. trunk.yml still triggers on ciflow/trunk.

Authored with Claude Code.
@pytorch-bot

pytorch-bot Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 40 Pending

As of commit bf758ce with merge base 7dc8641 (image):

NEW FAILURE - The following job has failed:

  • Build Presets / apple (llm) / build (gh)
    ##[error]fatal: unable to access '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/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git/': Could not resolve host: github.com

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 8, 2026
@huydhn huydhn added the release notes: none Do not include this in the release notes label Sep 8, 2026
@huydhn

huydhn commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

cc @jathu

@huydhn
huydhn merged commit f2dc5e3 into main Sep 8, 2026
47 of 49 checks passed
@huydhn
huydhn deleted the fix/pull-concurrency branch September 8, 2026 18:31
huydhn added a commit that referenced this pull request Sep 11, 2026
**Draft — needs an Exynos owner's agreement, since it changes when they
get signal.**

Both blocks move verbatim. They landed in `pull.yml` with the Exynos
bring-up (#13677) as ordinary per-PR smoke tests next to the other
backends', with no credentials and a 90 minute timeout. #15731 then
added `secrets: inherit`, `SAMSUNG_AI_LITECORE_KEY` for the SDK
download, timeouts of 180 and 360 minutes, and a fork skip because
secrets aren't available there. That combination belongs in trunk: a six
hour credentialed job on the pull request path costs every PR and
silently does nothing for external contributors.

In `trunk.yml` they run on main, on `ciflow/trunk`, and on pull requests
touching `.ci/scripts/**` — which still covers
`setup-samsung-linux-deps.sh`. The fork skip stays for that last case.

Related: #22609 removes the `ciflow/trunk/*` trigger from `pull.yml`,
which was these jobs' only route to run against a fork PR's code.
Landing this makes that a non-issue, since the label-triggered run
becomes intentional rather than a side effect.

cc @Jiseong-oh

This branch was previously deployed

1 inactive deployment
cadence — bf758ce6 Deployed Sep 8, 2026 by huydhn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants