Repository navigation
ci(queue): dispatch Queue onto a branch head #7617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,11 @@ on: | |
| types: [opened, synchronize, reopened, edited] | ||
| merge_group: | ||
| types: [checks_requested] | ||
| # Reports the skipped context on a branch's head without a pull_request | ||
| # event. A PR whose test merge commit predates this workflow gets no | ||
| # pull_request run from it (GitHub runs PR workflows from that commit), so | ||
| # `gh workflow run queue.yml --ref <branch>` gives it the context. | ||
| workflow_dispatch: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A Technical details# workflow_dispatch runs the ref's copy of the workflow
## Affected sites
- `.github/workflows/queue.yml:24` — `workflow_dispatch:` added here, but the workflow file at the target ref is what governs whether the dispatch is accepted.
## Evidence
- `gh workflow run --ref` documents `--ref` as "Branch or tag name which contains the version of the workflow file you'd like to run" (https://cli.github.com/manual/gh_workflow_run).
- cli/cli#5268 and its maintainer replies: a `workflow_dispatch` workflow must be registered (on the default branch or via a prior run) **and** the ref must contain the file; a branch missing it errors, and branch contents may differ and are what runs (https://github.com/cli/cli/issues/5268).
- Community discussion #45990: the error is "Workflow does not exist or does not have a workflow_dispatch trigger in this branch" (https://github.com/orgs/community/discussions/45990).
- cli/cli#9781 confirms the workflow must be on the default branch to be resolvable, but the run still takes the ref's definition (https://github.com/cli/cli/issues/9781).
## Target branches (verified)
- Heads that predate #7612 lack `.github/workflows/queue.yml`: #6373 `a033c6345`, #6949 `9fbcbdef0` → 404.
- Heads that merged `main` after #7612 carry the old blob `b4cb104eb` (the #7612 version, no `workflow_dispatch`): #6972 `31b1446f8`, #7616 `1460470b8` → rejected (no `workflow_dispatch` in this branch).
So the skipped `Queue` check never lands on any targeted head, and the follow-up plan of dispatching on each queued PR's branch will fail for all of them.
## Required outcome
- Either prove a dispatch on one of these branch heads actually yields a `Queue` check (e.g. run it against #6949's head and inspect the check suite), or replace the mechanism with one that does not depend on the ref containing `queue.yml` (the `quest/m0/ci/land.md` note currently says old PRs report `Queue` after a push, reopen, or edit).
## Open questions for the human
- Did this work in a local trial on a target branch? If so, which ref and what did the check suite show? |
||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use
workflow_dispatchto satisfy the requiredQueuecheck.GitHub does not evaluate checks created by a
workflow_dispatchrun against a pull request's required status checks, even when the run targets the pull request head. The skippedQueuejob therefore cannot satisfy themainruleset, so affected pull requests remain blocked. Use an eligible check mechanism, or verify another ruleset-supported approach before relying on this trigger. (docs.github.com)