Skip to content

Commit c867ecb

Browse files
committed
fix(ci): kill wedged checkout fetches
1 parent 9fd8158 commit c867ecb

5 files changed

Lines changed: 35 additions & 12 deletions

File tree

‎.github/workflows/ci-build-artifacts-testbox.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
6262
git -C "$workdir" config gc.auto 0
6363
64-
timeout --signal=TERM 30s git -C "$workdir" \
64+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
6565
-c protocol.version=2 \
6666
-c "http.extraheader=AUTHORIZATION: basic ${auth_header}" \
6767
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \

‎.github/workflows/ci-check-testbox.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
6060
git -C "$workdir" config gc.auto 0
6161
62-
timeout --signal=TERM 30s git -C "$workdir" \
62+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
6363
-c protocol.version=2 \
6464
-c "http.extraheader=AUTHORIZATION: basic ${auth_header}" \
6565
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ jobs:
435435
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
436436
git -C "$workdir" config gc.auto 0
437437
438-
timeout --signal=TERM 30s git -C "$workdir" \
438+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
439439
-c protocol.version=2 \
440440
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
441441
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -659,7 +659,7 @@ jobs:
659659
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
660660
git -C "$workdir" config gc.auto 0
661661
662-
timeout --signal=TERM 30s git -C "$workdir" \
662+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
663663
-c protocol.version=2 \
664664
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
665665
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -745,7 +745,7 @@ jobs:
745745
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
746746
git -C "$workdir" config gc.auto 0
747747
748-
timeout --signal=TERM 30s git -C "$workdir" \
748+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
749749
-c protocol.version=2 \
750750
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
751751
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -825,7 +825,7 @@ jobs:
825825
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
826826
git -C "$workdir" config gc.auto 0
827827
828-
timeout --signal=TERM 30s git -C "$workdir" \
828+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
829829
-c protocol.version=2 \
830830
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
831831
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -902,7 +902,7 @@ jobs:
902902
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
903903
git -C "$workdir" config gc.auto 0
904904
905-
timeout --signal=TERM 30s git -C "$workdir" \
905+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
906906
-c protocol.version=2 \
907907
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
908908
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -977,7 +977,7 @@ jobs:
977977
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
978978
git -C "$workdir" config gc.auto 0
979979
980-
timeout --signal=TERM 30s git -C "$workdir" \
980+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
981981
-c protocol.version=2 \
982982
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
983983
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -1099,7 +1099,7 @@ jobs:
10991099
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
11001100
git -C "$workdir" config gc.auto 0
11011101
1102-
timeout --signal=TERM 30s git -C "$workdir" \
1102+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
11031103
-c protocol.version=2 \
11041104
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
11051105
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -1229,7 +1229,7 @@ jobs:
12291229
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
12301230
git -C "$workdir" config gc.auto 0
12311231
1232-
timeout --signal=TERM 30s git -C "$workdir" \
1232+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
12331233
-c protocol.version=2 \
12341234
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
12351235
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -1378,7 +1378,7 @@ jobs:
13781378
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
13791379
git -C "$workdir" config gc.auto 0
13801380
1381-
timeout --signal=TERM 30s git -C "$workdir" \
1381+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
13821382
-c protocol.version=2 \
13831383
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
13841384
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
@@ -1748,7 +1748,7 @@ jobs:
17481748
git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
17491749
git -C "$workdir" config gc.auto 0
17501750
1751-
timeout --signal=TERM 30s git -C "$workdir" \
1751+
timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
17521752
-c protocol.version=2 \
17531753
fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
17541754
"+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Docs: https://docs.openclaw.ai
2626
- Telegram: treat `/command@TargetBot` bot-command entities as explicit mentions for the addressed bot so `requireMention` groups no longer drop targeted commands or captions. Fixes #84462. (#86553) Thanks @luoyanglang.
2727
- CI: bound Docker/Bash E2E tarball npm installs with `OPENCLAW_E2E_NPM_INSTALL_TIMEOUT` so package, onboarding, plugin, and upgrade lanes fail instead of hanging on a stuck npm install.
2828
- CI: keep `OPENCLAW_TESTBOX=1 pnpm check:changed` delegating to Blacksmith Testbox through Crabbox without forwarding local Testbox or worker env into the remote command.
29+
- CI: send KILL after the TERM grace period for manual checkout fetch timeouts so stuck Testbox and workflow checkout retries cannot hang behind a wedged `git fetch`.
2930
- iMessage: thread current channel/account inbound attachment roots into the image tool so iMessage-saved attachments under `~/Library/Messages/Attachments` (including the wildcard `/Users/*/Library/Messages/Attachments` root) are read through the existing inbound path policy instead of being rejected as `path-not-allowed`. Literal `localRoots` stays workspace-scoped. Fixes #30170. (#86569)
3031
- QQ Bot: respect `OPENCLAW_HOME` for outbound media path resolution so `<qqmedia>` sends no longer silently fail when `HOME` and `OPENCLAW_HOME` differ (Docker / multi-user hosts). Persisted QQ Bot data (sessions, known users, refs) stays anchored on the OS home for upgrade compatibility. Fixes #83562. Thanks @sliverp.
3132
- Update: report the primary malformed `openclaw.extensions` payload error without adding a duplicate missing-main diagnostic. (#86596) Thanks @ferminquant.

‎test/scripts/ci-workflow-guards.test.ts‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@ import { readFileSync } from "node:fs";
22
import { describe, expect, it } from "vitest";
33

44
describe("ci workflow guards", () => {
5+
it("kills timed manual checkout fetches after the grace period", () => {
6+
const workflowPaths = [
7+
".github/workflows/ci.yml",
8+
".github/workflows/ci-check-testbox.yml",
9+
".github/workflows/ci-build-artifacts-testbox.yml",
10+
];
11+
12+
for (const workflowPath of workflowPaths) {
13+
const workflow = readFileSync(workflowPath, "utf8");
14+
const fetchTimeouts = workflow.match(
15+
/timeout --signal=TERM[^\n]* 30s git -C "\$workdir"/g,
16+
);
17+
18+
expect(fetchTimeouts?.length, workflowPath).toBeGreaterThan(0);
19+
expect(fetchTimeouts, workflowPath).toEqual(
20+
fetchTimeouts?.map(
21+
() => 'timeout --signal=TERM --kill-after=10s 30s git -C "$workdir"',
22+
),
23+
);
24+
}
25+
});
26+
527
it("runs dependency policy guards in PR CI preflight", () => {
628
const workflow = readFileSync(".github/workflows/ci.yml", "utf8");
729
const preflightGuards = workflow.slice(

0 commit comments

Comments
 (0)