ci: make CircleCI workflow routing declarative#21580
Open
ajsutton wants to merge 1 commit into
Open
Conversation
9d09c3e to
09ace01
Compare
f6d6d94 to
e96f8fe
Compare
09ace01 to
e493fce
Compare
e96f8fe to
37ec546
Compare
e493fce to
d3ee186
Compare
37ec546 to
22c6f11
Compare
d3ee186 to
4cd111f
Compare
22c6f11 to
711b9b2
Compare
ac25283 to
32fe48d
Compare
Base automatically changed from
aj/refactor/circleci-extract-routing-script
to
develop
July 7, 2026 21:59
Move the routing data (schedule->workflows, API dispatch flags, change-detection patterns, passthrough params) into a standalone routing.yml and have compute-workflow-conditions.sh read it, so the scripts hold only the routing logic. collect-params.sh now reads the change patterns from routing.yml, and test-schedule-triggers.js reads the schedule map directly instead of parsing the routing script.
711b9b2 to
38c9f9f
Compare
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.
Separates the CircleCI routing data from the routing logic. Stacked on #21579.
A new
.circleci/routing.ymlholds the declarative data:schedules— schedule name → workflowsapi_dispatch— dispatch flag → workflows (includingmain_dispatchandlabeled_pr, whose conditions stay in the script)change_patterns—any/allERE patterns matched against changed filespassthrough_params— params forwarded to continuation configscompute-workflow-conditions.shnow holds only the conditions;collect-params.shreads the change patterns fromrouting.yml; andtest-schedule-triggers.jsreads the schedule map directly instead of regex-parsing the routing script.No routing behavior changes — the same
c-run_*flags are enabled for every trigger/branch/schedule/dispatch case.Test plan
mise exec -- bash .circleci/scripts/test-decision-tree.sh— 19/19 scenarios pass (now readsrouting.yml)mise exec -- shellcheck .circleci/scripts/*.shmise exec -- bash .circleci/scripts/merge-configs.sh && mise exec -- bash .circleci/scripts/test-continuation-params.sh /tmp/merged-config.ymlmise exec -- bun build .circleci/scripts/test-schedule-triggers.js --outfile=/tmp/x.jsbun .circleci/scripts/test-schedule-triggers.js(live API portion needsCIRCLE_API_TOKEN)