ci: extract CircleCI workflow routing into a script#21579
Open
ajsutton wants to merge 1 commit into
Open
Conversation
09ace01 to
e493fce
Compare
e242dd4 to
7b9aae5
Compare
e493fce to
d3ee186
Compare
Base automatically changed from
aj/fix/circleci-schedule-trigger-check
to
develop
July 6, 2026 22:18
Move the inline bash from the prepare-continuation-config "Compute workflow conditions" step in config.yml into a standalone compute-workflow-conditions.sh, with no behavioral change. The decision-tree and schedule-trigger tests now read the extracted script instead of the config.yml inline command. test-decision-tree.sh runs the real routing script and so must not write the pipeline's shared /tmp/pipeline-parameters.json: finalize would leave c-run_* flags (e.g. c-run_close_issue from the last scenario) that the later collect-params/compute steps inherit. It now uses an isolated, exported OUTPUT file; workflow-helpers.sh honors that override.
d3ee186 to
4cd111f
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.
Moves the inline bash from the
prepare-continuation-config"Compute workflow conditions" step inconfig.ymlinto a standalonecompute-workflow-conditions.sh. Pure mechanical extraction — no routing behavior changes.The decision-tree and schedule-trigger tests now read the extracted script instead of
yq-extracting the inline command fromconfig.yml.Because
test-decision-tree.shnow runs the real routing script (which callsfinalize), it uses an isolated, exportedOUTPUTfile instead of the pipeline's shared/tmp/pipeline-parameters.json— otherwise the last scenario'sc-run_*flags (e.g.c-run_close_issue) would be left in that file and inherited by the latercollect-params/computesteps.workflow-helpers.shhonors theOUTPUToverride.This is step 1 of a two-step split; the declarative refactor (separating routing data from logic) is stacked on top.
Stacked on #21575.
Test plan
mise exec -- bash .circleci/scripts/test-decision-tree.sh— 19/19 scenarios pass (runs the extracted script directly); verified it leaves/tmp/pipeline-parameters.jsonuntouchedmise exec -- shellcheck .circleci/scripts/*.shmise 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)