Skip to content

ci: label dispatch, a label starts its own workflow (CTActions#149) - #447

Merged
ocots merged 1 commit into
mainfrom
chore/149-label-dispatch
Nov 11, 2026
Merged

ocots merged 1 commit into
mainfrom
chore/149-label-dispatch

Conversation

@ocots

@ocots ocots commented Nov 11, 2026

Copy link
Copy Markdown
Member

Part of control-toolbox/CTActions#149 (label dispatch, CTActions#151 merged). Draft until CTActions#153 is merged: Labels.yml uses its inputs restart_labels / restart_prefix.

A label added to a pull request no longer creates a run of every workflow with its jobs skipped: Labels.yml dispatches, by workflow_dispatch, only the workflow of the label just added. Runs started by different labels accumulate; adding a label never cancels a run started by another.

  • Labels.yml (new). It names the scope labels of the CI, restart_labels: '["release"]' and restart_prefix: 'test ', and subscribes to unlabeled: added or removed while run ci github-runner is on the PR, they run the CI again (as today), without any other label doing so.
  • CI.yml: no more pull_request; workflow_dispatch with pr and target. The scope job runs for a push and for target=github, and reads the PR's labels, changed files and their count through the API (pr input) instead of the event payload; tools/ci/scope.py is unchanged. call is the github target, test-gpu-occidata and test-gpu-kkt their own, test-gpu-main and results as before.
  • Documentation.yml, Breakage.yml: as in the other packages.
  • ReleaseGate.yml, the crons: unchanged.
  • test/README.md: where the runs are.

What changes for the person using labels

  • A dispatched run is not in the Checks tab of the PR: it shows as a commit status (CI / github, Documentation, Documentation / preview, Breakage / packages) with a link to the run.
  • The scope job no longer runs on every label event (it ran, unguarded, even on a closed PR).
  • A run tests the head of the branch, not the merge commit of the PR.

tools/ci tests: 47 pass. To check once CTActions#153 is merged: run ci github-runner then test JuMP backend (the CI restarts with the new scope, summary of the scope job), then removing it; release.

🤖 Generated with Claude Code

Labels.yml dispatches the workflow of the label just added; CI, Documentation and Breakage
listen to workflow_dispatch instead of pull_request. The scope job of the CI reads the labels
and the files of the pull request through the API (input pr). The scope labels (test ... and
release) run the CI again through restart_labels, added or removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ocots
ocots marked this pull request as ready for review November 11, 2026 12:51
@ocots ocots added run ci github-runner Trigger the CI workflow on GitHub-hosted runners test JuMP backend Package-specific scope or cron label release Release preparation bug Something isn't working ci on main: changes only Before merging: on main, rerun only the jobs the merged files can affect (never on a release PR) and removed test JuMP backend Package-specific scope or cron label run ci github-runner Trigger the CI workflow on GitHub-hosted runners bug Something isn't working release Release preparation labels Nov 11, 2026
@ocots

ocots commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Merging: the label dispatch (CTActions#149) is in place on this package.

Checked here with the CI: run ci github-runner starts one run (the scope job reads the labels and the files of the PR through the API); adding or removing a test … label and adding release restart it (the previous run is cancelled); an unrelated label (bug) starts nothing. The CI / github status is red only because I cancelled the test runs; the change touches workflows only, so ci on main: changes only is set. Not run here: the narrowed scope (this PR changes workflows, so everything runs), Documentation.yml and Breakage.yml, checked on the other packages.

🤖 Generated with Claude Code

@ocots
ocots merged commit 35ac568 into main Nov 11, 2026
51 of 57 checks passed
@ocots
ocots deleted the chore/149-label-dispatch branch November 11, 2026 12:57
ocots pushed a commit that referenced this pull request Nov 11, 2026
Brings in #446 (JuMP and comparison tests rationalized), #447 (label
dispatch) and #448 (statuses permission for the crons). No conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BSmPZipCYwgepwKpMP9sep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci on main: changes only Before merging: on main, rerun only the jobs the merged files can affect (never on a release PR)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant