mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 08:31:44 +01:00
The weekly test-time recording can land again on its own (GST-3303) (#4581)
The weekly job that re-records how long each test file takes can land its update again without someone fixing it by hand. Free Tests uses those times to split the suite evenly. It had not landed an update since 11-09: the Windows half kept failing, and its pull request waited for a maintainer whenever a new file ran past 60 seconds. Nothing to do. The bot's commit and pull-request step runs for real only on the weekly schedule, so the next Monday run is its first live test. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Refs: GST-3303
This commit is contained in:
1 parent
ef4a7f5cbf
commit
507ebfc16d
8 files changed
+146
-9
No files matched your search
@@ -137,6 +137,12 @@ jobs:
|
||||
fi
|
||||
cp "$RUNNER_TEMP/linux/free-test-durations.json" scripts/free-test-durations.json
|
||||
cp "$RUNNER_TEMP/windows/free-test-durations-windows.json" scripts/free-test-durations-windows.json
|
||||
# New files over the 60 s ceiling become annotated exceptions naming
|
||||
# this recording, and files back under it leave the allowlist, so the
|
||||
# seed PR passes the ratchet without a maintainer edit (GST-3303).
|
||||
allowlist=$(bun --no-env-file --config=/dev/null run scripts/free-seed-allowlist.ts --reconcile --recording "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID")
|
||||
if [ -n "$allowlist" ]; then allowlist_line=$(printf '%s\n' "$allowlist" | paste -sd, - | sed 's/,/, /g'); else allowlist_line=unchanged; fi
|
||||
echo "Seed allowlist: $allowlist_line" | tee -a "$GITHUB_STEP_SUMMARY"
|
||||
if ratchet=$(GSTACK_FREE_SEED_BASE="$(git rev-parse HEAD)" bun test test/free-seed-ratchet.test.ts 2>&1); then
|
||||
ratchet_line="passes"
|
||||
else
|
||||
@@ -163,7 +169,7 @@ jobs:
|
||||
git switch -C "$branch"
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
git add scripts/free-test-durations.json scripts/free-test-durations-windows.json
|
||||
git add scripts/free-test-durations.json scripts/free-test-durations-windows.json scripts/free-test-seed-allowlist.json
|
||||
git commit -m "$subject"
|
||||
git push --force-with-lease="refs/heads/$branch:$remote_head" origin "HEAD:refs/heads/$branch"
|
||||
cat > pr-body.md <<EOF
|
||||
@@ -172,6 +178,7 @@ jobs:
|
||||
- Linux seed (ubicloud-standard-8): +$linux_added / -$linux_removed files
|
||||
- Windows seed (windows-latest): +$windows_added / -$windows_removed files
|
||||
- Files that failed while recording (durations kept; this PR's own free checks decide): $failed_line
|
||||
- Seed allowlist (each new file over 60 s is admitted with a todo to split it; files back under 60 s leave): $allowlist_line
|
||||
- Seed growth ratchet (60 s ceiling, shrink-only allowlist): $ratchet_line
|
||||
|
||||
Data only. This run dispatched Free Tests (the required free-tests check), Windows Smoke and Quality gate on this branch; those are this PR's checks. The pull_request runs wait as "action required" because a token-opened PR never starts them without approval. Stamp and merge per docs/ship-policy.md; the stamp push runs the full PR checks.
|
||||
|
||||
@@ -310,7 +310,7 @@ jobs:
|
||||
windows-record-durations:
|
||||
if: ${{ inputs.record_durations }}
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
with:
|
||||
@@ -334,12 +334,18 @@ jobs:
|
||||
# Records into this checkout's default seed path: GSTACK_FREE_TEST_DURATIONS
|
||||
# would leak into every timed test, and seed-reading tests would then read
|
||||
# the half-written recording instead of their fixtures.
|
||||
# Two workers, not the four a windows-latest runner offers: at four, files
|
||||
# that pass in the nightly run failed under the recording load (assertion and
|
||||
# JSON-parse errors) and the whole recording outran its 30-minute job (runs
|
||||
# 43802987074 and 44830554276); at two it timed all 921 files cleanly in 38
|
||||
# minutes (44830546810).
|
||||
- name: Time every Windows-safe file alone
|
||||
id: record
|
||||
shell: bash
|
||||
env:
|
||||
TEMP: ${{ runner.temp }}
|
||||
TMP: ${{ runner.temp }}
|
||||
GSTACK_FREE_JOBS: '2'
|
||||
run: |
|
||||
set -o pipefail
|
||||
bun run test:windows --record-durations --wall-timeout 1200 2>&1 | tee "$RUNNER_TEMP/record.log"
|
||||
|
||||
Reference in new issue
Block a user