From a8ca091c5e4305a5c5201c19d425267f6a3e0bf0 Mon Sep 17 00:00:00 2001 From: Joshua Temple Date: Sun, 5 Jul 2026 15:01:28 -0400 Subject: [PATCH] feat(fleet): add optional cascade_version inputs to dispatch-suite action Add cascade_version and cascade_version_sha as optional, empty-by-default inputs to the dispatch-suite composite action, forwarded to the target suite's workflow_dispatch only when non-empty. No caller sets them yet and no example-repo suite declares the inputs, so this is inert: every fleet run stays byte-for-byte unchanged until a lane opts in. Signed-off-by: Joshua Temple --- .github/actions/dispatch-suite/action.yaml | 36 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/actions/dispatch-suite/action.yaml b/.github/actions/dispatch-suite/action.yaml index 730c649d..af6457f9 100644 --- a/.github/actions/dispatch-suite/action.yaml +++ b/.github/actions/dispatch-suite/action.yaml @@ -20,6 +20,21 @@ inputs: description: "Target ref to dispatch against (must be the target's default branch)" required: false default: 'main' + cascade_version: + description: >- + The rc tag under test, forwarded to the target suite's workflow_dispatch + as its cascade_version input. Only passed when non-empty, so suites that + have not declared this input are unaffected. Empty by default. + required: false + default: '' + cascade_version_sha: + description: >- + The peeled commit sha behind the rc tag under test, forwarded to the + target suite's workflow_dispatch as its cascade_version_sha input. Only + passed when non-empty, so suites that have not declared this input are + unaffected. Empty by default. + required: false + default: '' recover-attempts: description: 'How many times to poll for the dispatched run before giving up' required: false @@ -69,6 +84,8 @@ runs: TARGET_REPO: ${{ inputs.repo }} TARGET_WORKFLOW: ${{ inputs.workflow }} TARGET_REF: ${{ inputs.ref }} + CASCADE_VERSION: ${{ inputs.cascade_version }} + CASCADE_VERSION_SHA: ${{ inputs.cascade_version_sha }} RECOVER_ATTEMPTS: ${{ inputs.recover-attempts }} RECOVER_INTERVAL: ${{ inputs.recover-interval }} WATCH_INTERVAL: ${{ inputs.watch-interval }} @@ -88,13 +105,22 @@ runs: DISPATCH_TS=$(date -u +%Y-%m-%dT%H:%M:%SZ) echo "Dispatching $TARGET_WORKFLOW in $TARGET_REPO @ $TARGET_REF (since $DISPATCH_TS)" - # NOTE: do NOT pass -f cascade_version=... here. The suites do not define - # that input yet, so an extra input would error with "unexpected inputs". - # The version under test is computed and logged by the orchestrator but - # is inert until the suites accept the input. + # NOTE: cascade_version / cascade_version_sha are only forwarded when + # non-empty. No caller passes them today, so this stays inert: the + # suites do not define those inputs yet, and an undeclared input would + # error with "unexpected inputs" if passed unconditionally. + local -a EXTRA_ARGS=() + if [ -n "$CASCADE_VERSION" ]; then + EXTRA_ARGS+=(-f "cascade_version=$CASCADE_VERSION") + fi + if [ -n "$CASCADE_VERSION_SHA" ]; then + EXTRA_ARGS+=(-f "cascade_version_sha=$CASCADE_VERSION_SHA") + fi + gh workflow run "$TARGET_WORKFLOW" \ --repo "$TARGET_REPO" \ - --ref "$TARGET_REF" + --ref "$TARGET_REF" \ + "${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"}" # Recover the run id. Cross-repo dispatch is async; the run may not be # listable immediately, so poll with a bounded retry.