Skip to content

Commit 3beda24

Browse files
committed
ci(deploy-runner,deploy-api): never skip build+deploy on push (force-push edge)
Both workflows previously fell through to a 'workflow only — SKIP build + deploy' branch when dorny/paths-filter saw an empty diff against github.event.before. That assumption — empty diff → safe to skip — breaks on a force-push rebase, where event.before is the previous force-push head (also has the fix) but the actually-deployed binary on Tokyo is from an older state without it. Result: validate's head commit advertises 'fix(runner): ...' but the Tokyo runner serves the old binary, and test_exec_on_stopped_box_is_typed_error keeps returning 500 'Handle invalidated after stop()' even though apps/ runner/pkg/api/controllers/boxlite_exec.go on the head clearly has the IsStopped / IsInvalidState classification. Always build + deploy on every push (or non-push event). The libboxlite_changed signal in deploy-runner stays narrowed because it controls whether build_c_sdk rebuilds .a from source vs fetches the tagged-release tarball — that optimization is still safe to gate. The redeploy_current and prev_run_id short-circuits also still apply.
1 parent 510f487 commit 3beda24

2 files changed

Lines changed: 21 additions & 15 deletions

File tree

.github/workflows/deploy-api.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,22 @@ jobs:
135135
fi
136136
echo "redeploy_current=false" >> "$GITHUB_OUTPUT"
137137
138+
# NEVER fall through to a no-build branch — a force-push rebase
139+
# produces an empty diff vs. github.event.before even when the
140+
# actually-deployed Api image is stale, and the previous "workflow
141+
# only — skip" decision then left Tokyo on the older image while
142+
# the head commit advertised the fix. Always build + deploy on
143+
# any push (or non-push event). The redeploy_current short-circuit
144+
# above still applies when explicitly requested.
138145
if [ "${{ github.event_name }}" != 'push' ]; then
139146
echo "Non-push event (${{ github.event_name }}) — build + deploy."
140-
echo "should_build=true" >> "$GITHUB_OUTPUT"
141-
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
142147
elif [ "${PUSH_CHANGED:-false}" = 'true' ]; then
143148
echo "Push touched api_source paths — build + deploy."
144-
echo "should_build=true" >> "$GITHUB_OUTPUT"
145-
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
146149
else
147-
echo "Push only touched workflow files — SKIP build + deploy."
148-
echo "should_build=false" >> "$GITHUB_OUTPUT"
149-
echo "should_deploy=false" >> "$GITHUB_OUTPUT"
150+
echo "Push didn't touch api_source paths — build + deploy anyway (avoid stale Tokyo on rebase)."
150151
fi
152+
echo "should_build=true" >> "$GITHUB_OUTPUT"
153+
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
151154
152155
# ── Deploy: ECR push (optional) + ECS register-TD + UpdateService ─
153156
deploy:

.github/workflows/deploy-runner.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,25 @@ jobs:
177177
fi
178178
179179
# Push branch: gate each stage on the narrowest change-set
180-
# that affects its inputs.
180+
# that affects its inputs. NEVER fall through to a no-build
181+
# branch — force-push rebases produce an empty diff vs.
182+
# github.event.before even when the actually-deployed binary
183+
# is now stale, and a "workflow only — skip" decision then
184+
# leaves Tokyo on the older runner while the head commit
185+
# advertises the fix. Always build + deploy on push; only
186+
# the libboxlite_changed signal stays narrowed (it controls
187+
# whether build_c_sdk rebuilds .a from source vs. fetches
188+
# the tagged-release tarball).
181189
if [ "${LIBBOXLITE_CHANGED:-false}" = 'true' ]; then
182190
echo "Push touched libboxlite_chain — rebuild .a + runner + deploy."
183191
echo "should_build=true" >> "$GITHUB_OUTPUT"
184192
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
185193
echo "libboxlite_changed=true" >> "$GITHUB_OUTPUT"
186-
elif [ "${GO_RUNNER_CHANGED:-false}" = 'true' ]; then
187-
echo "Push touched go_runner_chain only — reuse release libboxlite.a, rebuild runner + deploy."
194+
else
195+
echo "Push didn't touch libboxlite_chain — reuse release libboxlite.a, rebuild runner + deploy."
188196
echo "should_build=true" >> "$GITHUB_OUTPUT"
189197
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
190198
echo "libboxlite_changed=false" >> "$GITHUB_OUTPUT"
191-
else
192-
echo "Push only touched workflow files — SKIP build + deploy."
193-
echo "should_build=false" >> "$GITHUB_OUTPUT"
194-
echo "should_deploy=false" >> "$GITHUB_OUTPUT"
195-
echo "libboxlite_changed=false" >> "$GITHUB_OUTPUT"
196199
fi
197200
198201
# ── Build libboxlite.a from THIS checkout's Rust source ────────────

0 commit comments

Comments
 (0)