From 3ec49ccdc5110f72f4f5a4810627aad55d58b2b7 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sat, 21 Nov 2026 04:55:26 -0800 Subject: [PATCH 1/3] ci: Draft PRs skip the Go suite; the legacy-fixture pass runs on main and trains only The suite writes real files with fsync to the self-hosted runners' disk: about 650 GiB an hour on tp04 today, most of it from repeated runs on Draft PRs and from the second full pass with the legacy-fixture tag on every PR. A Draft PR now runs no Go suite (marking it ready starts one), and the legacy-fixture pass runs on pushes to main and on train PRs, which carry every change that merges. Co-Authored-By: Claude Opus 5.5 --- seaweed-block/.github/workflows/test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/seaweed-block/.github/workflows/test.yml b/seaweed-block/.github/workflows/test.yml index ef6b67ab9b..de67df6d58 100644 --- a/seaweed-block/.github/workflows/test.yml +++ b/seaweed-block/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: Test on: pull_request: + # ready_for_review: a Draft runs no Go suite (below); marking it ready starts one. + types: [opened, synchronize, reopened, ready_for_review] push: branches: - main @@ -18,6 +20,9 @@ concurrency: jobs: test: name: go test (linux) + # The suite writes heavily to the runner disk (real files, fsync), so a + # Draft PR skips it; its author tests locally until the PR is ready. + if: github.event_name == 'push' || !github.event.pull_request.draft # Pushes and same-repo PRs run on the team's tp04 runner (seaweed.slice, # capped at 8 cores / 8 GiB). Fork PRs never reach it: they stay on a # GitHub-hosted runner. @@ -58,6 +63,9 @@ jobs: test-legacy: name: go test legacy-fixture + # A second full pass (legacy-fixture tag) writes as much again: it runs on + # main and on train PRs, which carry every change that merges. + if: github.event_name == 'push' || startsWith(github.head_ref, 'train/') # Same routing as the default job: same-repo PRs and pushes use the tp04 # runners (two instances, so both passes run in parallel); fork PRs stay on # a GitHub-hosted runner, whose shared queue can wait for hours. From 1122108a48176aa571e816de3e0a4606c0035d11 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sat, 21 Nov 2026 05:31:50 -0800 Subject: [PATCH 2/3] ci: a PR runs the light Go set; the long and timing-sensitive packages run on main and trains core/storage, core/frontend/durable, core/host/master and core/authority take minutes each and hold the timing-sensitive tests; under the CI host's lowered I/O and CPU weight they reached the 10 minute package timeout on PRs that do not touch them. A PR now runs every other package; pushes to main and train PRs run the full list. Branch names reach the script only through the environment. Co-Authored-By: Claude Opus 5.5 --- seaweed-block/.github/workflows/test.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/seaweed-block/.github/workflows/test.yml b/seaweed-block/.github/workflows/test.yml index de67df6d58..c8a51d1ca6 100644 --- a/seaweed-block/.github/workflows/test.yml +++ b/seaweed-block/.github/workflows/test.yml @@ -59,7 +59,19 @@ jobs: run: go vet ./... - name: Test default configuration - run: go test -p=1 -short -count=1 -timeout 10m ./... + # A PR runs the light set: every package except the long, disk-heavy and + # timing-sensitive ones, which run in full on main and on train PRs. + env: + EVENT: ${{ github.event_name }} + HEAD_REF: ${{ github.head_ref }} + run: | + set -euo pipefail + if [ "$EVENT" = push ] || [[ "$HEAD_REF" == train/* ]]; then + pkgs=$(go list ./...) + else + pkgs=$(go list ./... | grep -vE '/core/(storage|frontend/durable|host/master|authority)$') + fi + go test -p=1 -short -count=1 -timeout 10m $pkgs test-legacy: name: go test legacy-fixture From 41444b75bbeb51aadb78f20de4d4a57d89f171e7 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sat, 21 Nov 2026 05:37:49 -0800 Subject: [PATCH 3/3] ci: a PR also runs every heavy package its own diff touches Review fold: the light set dropped the four heavy packages even when the PR changes them, so a PR's own Red-first tests there first ran in a train. The step now adds back each heavy package with a file of the PR's diff in it (checkout depth 2: the merge commit and its base parent). Co-Authored-By: Claude Opus 5.5 --- seaweed-block/.github/workflows/test.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/seaweed-block/.github/workflows/test.yml b/seaweed-block/.github/workflows/test.yml index c8a51d1ca6..f37cdca486 100644 --- a/seaweed-block/.github/workflows/test.yml +++ b/seaweed-block/.github/workflows/test.yml @@ -37,6 +37,9 @@ jobs: uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false + # Two commits: the PR merge commit and its base parent, so the test + # step can see which packages the PR touches. + fetch-depth: 2 - name: Set up Go uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 @@ -59,8 +62,9 @@ jobs: run: go vet ./... - name: Test default configuration - # A PR runs the light set: every package except the long, disk-heavy and - # timing-sensitive ones, which run in full on main and on train PRs. + # A PR runs the light set plus every heavy package its own diff touches; + # the long, disk-heavy, timing-sensitive packages run in full on main and + # on train PRs. A green PR check does not cover an untouched heavy package. env: EVENT: ${{ github.event_name }} HEAD_REF: ${{ github.head_ref }} @@ -70,6 +74,13 @@ jobs: pkgs=$(go list ./...) else pkgs=$(go list ./... | grep -vE '/core/(storage|frontend/durable|host/master|authority)$') + mod=$(go list -m) + changed=$(git diff --name-only HEAD^1 HEAD) + for p in core/storage core/frontend/durable core/host/master core/authority; do + if printf '%s\n' "$changed" | grep -qE "^$p/[^/]+$"; then + pkgs="$pkgs $mod/$p" + fi + done fi go test -p=1 -short -count=1 -timeout 10m $pkgs