mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 06:19:21 +00:00
fix(ci): kill the Windows child via taskkill, not a signal
Review found kill -TERM against a native Windows binary (bun.exe) under Git Bash is best-effort thread injection, not a real signal, and can fail to land -- reproducing the exact hang this watchdog exists to prevent. taskkill //F //T is a real TerminateProcess call. Also: cite the run id instead of a branch name (branches get deleted), and add the missing shell: bash the repo's other Windows steps already set explicitly.
This commit is contained in:
@@ -508,6 +508,7 @@ jobs:
|
||||
run: bash scripts/ci/install-workspace-dependencies.sh --ignore-scripts
|
||||
- name: Install dependencies
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: bash scripts/ci/install-workspace-dependencies.sh --ignore-scripts --linker=hoisted
|
||||
- run: bun run --cwd packages/cli test src/utils/npxCommand.test.ts src/commands/skills.test.ts
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ COPY packages/engine/package.json packages/engine/
|
||||
COPY packages/producer/package.json packages/producer/
|
||||
|
||||
# A corrupt tarball extraction can print an error and then hang instead of
|
||||
# exiting (fix/regression-docker-build-timeout). Bound each attempt and retry.
|
||||
# exiting (run 35468046055). Bound each attempt and retry.
|
||||
RUN npm install --global bun && \
|
||||
(timeout 300 bun install --frozen-lockfile || timeout 300 bun install --frozen-lockfile) && \
|
||||
npm uninstall --global bun
|
||||
|
||||
@@ -18,7 +18,15 @@ run_with_timeout() {
|
||||
local elapsed=0
|
||||
while kill -0 "$pid" 2>/dev/null; do
|
||||
if ((elapsed >= seconds)); then
|
||||
kill -TERM "$pid" 2>/dev/null
|
||||
# Git Bash's `kill -TERM` on a native Windows binary (bun.exe) is a
|
||||
# best-effort thread-injection emulation, not a real signal, and can
|
||||
# fail to land -- the exact hang this function exists to prevent.
|
||||
# taskkill //T (kills the child tree) //F (TerminateProcess) is real.
|
||||
if [[ "${OS:-}" == "Windows_NT" ]]; then
|
||||
taskkill //F //T //PID "$pid" 2>/dev/null
|
||||
else
|
||||
kill -TERM "$pid" 2>/dev/null
|
||||
fi
|
||||
wait "$pid" 2>/dev/null
|
||||
return 124
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user