Commit dd909ab
Frank Guo
Test: disable git auto-gc to fix TestPush_E2E_ExportAndPush flake
Root cause: git's receive-pack runs `git gc --auto` after a push once
loose-object/pack thresholds are crossed, and that gc forks and
detaches — control returns to the pushing `git push` (and so to the
test) before gc necessarily finishes repacking/pruning the receiving
repo. TestPush_E2E_ExportAndPush does two checkpoint→push cycles in
quick succession, which is exactly the shape that crosses gc.auto's
thresholds. t.TempDir()'s cleanup (os.RemoveAll) then raced that
detached background process: the exact failure CI hit, "TempDir
RemoveAll cleanup: unlinkat .../002: directory not empty", is git gc
still touching the bare remote directory (the second t.TempDir() call
in the test) when RemoveAll walked it moments later. Not a DuckDB/nomic
handle leak or a missing Close() — every connection opened during the
test's two checkpoint/push cycles was already correctly deferred-closed
(checked doCheckpoint, push.go's exportNewFrames and
markCheckpointsExported, and updateIndexIncremental).
This is a test-lifecycle issue, not a product bug: a real user's repo
is never subject to a test harness deleting it out from under a
background gc a few milliseconds after a push returns. Fixed in the
test harness: every git repo created in integration tests (the main
TestEnv repo, every bare push remote, and clones used to simulate a
teammate) now gets gc.auto=0 and receive.autogc=false set immediately
after creation, via a new initBareRemote/disableAutoGC helper replacing
four copy-pasted `git init --bare` blocks in checkpoint_e2e_test.go.
Verified: TestPush_E2E_ExportAndPush at -count=50 -race (previously
flaky under CI load) and the three push/import/conflict E2E tests
together at -count=20 -race, all clean. Full suite + lint green.1 parent 106af60 commit dd909ab
2 files changed
Lines changed: 57 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 211 | + | |
214 | 212 | | |
215 | 213 | | |
216 | 214 | | |
| |||
384 | 382 | | |
385 | 383 | | |
386 | 384 | | |
387 | | - | |
388 | | - | |
389 | | - | |
| 385 | + | |
390 | 386 | | |
391 | 387 | | |
392 | 388 | | |
| |||
407 | 403 | | |
408 | 404 | | |
409 | 405 | | |
| 406 | + | |
410 | 407 | | |
411 | 408 | | |
412 | 409 | | |
| |||
568 | 565 | | |
569 | 566 | | |
570 | 567 | | |
571 | | - | |
572 | | - | |
573 | | - | |
| 568 | + | |
574 | 569 | | |
575 | 570 | | |
576 | 571 | | |
| |||
596 | 591 | | |
597 | 592 | | |
598 | 593 | | |
| 594 | + | |
599 | 595 | | |
600 | 596 | | |
601 | 597 | | |
| |||
749 | 745 | | |
750 | 746 | | |
751 | 747 | | |
752 | | - | |
753 | | - | |
754 | | - | |
| 748 | + | |
755 | 749 | | |
756 | 750 | | |
757 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
53 | 104 | | |
54 | 105 | | |
55 | 106 | | |
| |||
0 commit comments