Repository navigation
feat: start the workflow of a label by workflow_dispatch - #151
Merged
Merged
Conversation
…tch (#149) A label no longer creates a run of every heavy workflow of a package: label-dispatch.yml dispatches only the workflow of the label just added, so the runs of different labels accumulate on the pull request and none cancels another. - label-dispatch.yml (reusable) and scripts/label-dispatch/{plan,test}.sh: the mapping label -> workflow, tested by label-dispatch-tests.yml - ci, documentation, breakage-suite, breakage: a workflow_dispatch with the input `pr` counts as a run of that pull request (concurrency group, baseline, comment, preview) - docs/workflows/label-dispatch.md, labels.md, superseded-runs.md, README.md Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t repo Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
….yml)
A workflow_dispatch run is attached to the head commit but absent from the checks of the
pull request: nothing there tells that a label started something. ci, documentation and
breakage-suite post a pending status at the start and the final one at the end, one
context per workflow ('CI / kkt', 'Documentation', 'Breakage / packages').
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Documenter posts the link to a preview only for a pull_request event; a dispatched run has none. pr-status.yml adds '<context> / preview' with the link when the preview was deployed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eview Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #149.
Problem
Every label added to a pull request created a run of each heavy workflow of a package (
CI,Documentation,Breakage), all jobs skipped. The run in progress was not cancelled, but it was hidden on the PR page behind the latest, skipped one, and each label left ~30 skipped jobs in the Checks.Change
The heavy workflows no longer listen to
pull_request: a label dispatches them byworkflow_dispatch, one run per label. Runs started by different labels accumulate, and adding a label never cancels a run started by another (this is what made #148 unacceptable).label-dispatch.yml(reusable, called by a package'sLabels.yml): onlabeled, dispatches the workflow of the added label only; onsynchronize/reopened, the workflow of every label present. Nothing for a closed PR or a fork.scripts/label-dispatch/{plan,test}.sh+label-dispatch-tests.yml: the mapping label → workflow and its tests.ci.yml,documentation.yml,breakage-suite.yml,breakage.yml: aworkflow_dispatchwith the inputprcounts as a run of that PR (concurrency group and cancellation by a newer push, breakage base/baseline/comment read through the API, documentation preview viaGITHUB_EVENT_NAME=pull_request/GITHUB_REF=refs/pull/<pr>/merge).pr-status.yml: a dispatched run is not in the Checks tab nor in the checks list of the PR (found on the pilot). It posts a commit status instead (CI / kkt,Documentation,Breakage / packages, andDocumentation / previewlinking topreviews/PR<n>/), which is in the merge box.docs/workflows/label-dispatch.md,labels.md,superseded-runs.md,README.md.Backward compatible: nothing changes for a package until its callers move.
Verified on the pilot (CTFlows.jl#518)
kkt) run side by side, none cancels another.bugdispatches nothing.documentation push preview:previews/PR518is deployed from a dispatched run; both statuses are posted.run ci kkt-runner:CI kkt #518starts on the self-hosted runner.Behaviour changes for a package that moves
statuses: writeto the job that calls the workflows.Not verified
https://<owner>.org/<repository>/previews/PR<n>/.Merging
The pilot's callers (CTFlows.jl#518) point to the branch of this PR, and the pilot calls
pr-status.yml@main: its runs started after this commit fail until this PR is merged. After the merge, the callers of each package use@mainandLabels.ymlloses itsctactions_ref.actionlintpasses on all workflows;bash scripts/label-dispatch/test.sh: 10 tests pass.🤖 Generated with Claude Code