Skip to content

Commit 61c8dbd

Browse files
ci: capture macOS reranker crash diagnostics
Amp-Thread-ID: https://ampcode.com/threads/T-01a06ea1-0469-74e9-8964-f022065a5f2d Co-authored-by: do do <dodo0709@fastmail.com>
1 parent 2789836 commit 61c8dbd

2 files changed

Lines changed: 23 additions & 11 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
test:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
13+
fail-fast: false
1314
matrix:
1415
include:
1516
# Linux: use sqlite-vec (go-libsql doesn't have Linux prebuilts)
@@ -47,6 +48,17 @@ jobs:
4748
CGO_LDFLAGS: "-lm"
4849
run: go test ${{ matrix.tags }} -v -short -race -coverprofile=coverage.txt -covermode=atomic ./...
4950

51+
- name: Upload macOS crash reports
52+
if: failure() && runner.os == 'macOS'
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: macos-crash-reports-${{ github.run_attempt }}
56+
path: |
57+
~/Library/Logs/DiagnosticReports/
58+
/Library/Logs/DiagnosticReports/
59+
if-no-files-found: warn
60+
retention-days: 7
61+
5062
- name: Test portable SIMD kernels
5163
if: runner.os == 'Linux'
5264
env:

‎pkg/rerank/server_test.go‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func TestRerankerSupervisorRetainsLifecycleLockUntilPublication(t *testing.T) {
285285
Args: []string{"30"},
286286
Environment: os.Environ(),
287287
Stdout: io.Discard,
288-
Stderr: io.Discard,
288+
Stderr: os.Stderr,
289289
LifecycleLock: supervisorLock,
290290
BeforePublish: func() {
291291
close(publicationReached)
@@ -828,7 +828,7 @@ func TestRerankerSupervisorUnadoptedLaunchCleansUp(t *testing.T) {
828828
Args: []string{"30"},
829829
Environment: os.Environ(),
830830
Stdout: io.Discard,
831-
Stderr: io.Discard,
831+
Stderr: os.Stderr,
832832
AdoptionTimeout: 500 * time.Millisecond,
833833
})
834834
}()
@@ -872,7 +872,7 @@ func TestRerankerSupervisorUncommittedAdoptionCleansUp(t *testing.T) {
872872
Args: []string{"30"},
873873
Environment: os.Environ(),
874874
Stdout: io.Discard,
875-
Stderr: io.Discard,
875+
Stderr: os.Stderr,
876876
AdoptionTimeout: time.Second,
877877
AdoptionLease: 300 * time.Millisecond,
878878
})
@@ -929,7 +929,7 @@ func TestRerankerManagerStartAdoptsPublishedSupervisor(t *testing.T) {
929929
"GO_RERANKER_HELPER_READY="+ready,
930930
),
931931
Stdout: io.Discard,
932-
Stderr: io.Discard,
932+
Stderr: os.Stderr,
933933
AdoptionTimeout: 400 * time.Millisecond,
934934
})
935935
}()
@@ -984,7 +984,7 @@ func TestRerankerManagerFailedAdoptionStopsSupervisor(t *testing.T) {
984984
"GO_RERANKER_HELPER_READY="+ready,
985985
),
986986
Stdout: io.Discard,
987-
Stderr: io.Discard,
987+
Stderr: os.Stderr,
988988
AdoptionTimeout: 2 * time.Second,
989989
})
990990
}()
@@ -1038,7 +1038,7 @@ func TestRerankerSupervisorSIGKILLTerminatesReexecutedRoot(t *testing.T) {
10381038
supervisor, done, err := launchRerankerSupervisor(currentSupervisorRegistration(t), dir, control, token, port, os.Args[0], []string{
10391039
"-test.run=TestRerankerHelperProcess", "--",
10401040
"--port", strconv.Itoa(port), "--pooling", "rank",
1041-
}, io.Discard)
1041+
}, os.Stderr)
10421042
if err != nil {
10431043
t.Fatal(err)
10441044
}
@@ -1113,7 +1113,7 @@ func TestRerankerSupervisorSIGKILLTerminatesForkConfinedChild(t *testing.T) {
11131113
supervisor, done, err := launchRerankerSupervisor(currentSupervisorRegistration(t), dir, control, token, port, os.Args[0], []string{
11141114
"-test.run=TestRerankerDescendantHelper", "--",
11151115
"--port", strconv.Itoa(port), "--pooling", "rank",
1116-
}, io.Discard)
1116+
}, os.Stderr)
11171117
if err != nil {
11181118
t.Fatal(err)
11191119
}
@@ -1180,7 +1180,7 @@ func TestRerankerSupervisorStopPreventsDetachedDescendants(t *testing.T) {
11801180
supervisor, done, err := launchRerankerSupervisor(currentSupervisorRegistration(t), dir, control, token, port, os.Args[0], []string{
11811181
"-test.run=TestRerankerDescendantHelper", "--",
11821182
"--port", strconv.Itoa(port), "--pooling", "rank",
1183-
}, io.Discard)
1183+
}, os.Stderr)
11841184
if err != nil {
11851185
t.Fatal(err)
11861186
}
@@ -1239,7 +1239,7 @@ func TestRerankerSupervisorGuardianFailureTerminatesChild(t *testing.T) {
12391239
supervisor, done, err := launchRerankerSupervisor(currentSupervisorRegistration(t), dir, control, token, port, os.Args[0], []string{
12401240
"-test.run=TestRerankerHelperProcess", "--",
12411241
"--port", strconv.Itoa(port), "--pooling", "rank",
1242-
}, io.Discard)
1242+
}, os.Stderr)
12431243
if err != nil {
12441244
t.Fatal(err)
12451245
}
@@ -1450,7 +1450,7 @@ func TestRerankerSupervisorDoesNotInheritHostDescriptors(t *testing.T) {
14501450
supervisor, done, err := launchRerankerSupervisor(currentSupervisorRegistration(t), dir, control, token, port, os.Args[0], []string{
14511451
"-test.run=TestRerankerFDHelper", "--",
14521452
"--port", strconv.Itoa(port), "--pooling", "rank",
1453-
}, io.Discard)
1453+
}, os.Stderr)
14541454
if err != nil {
14551455
t.Fatal(err)
14561456
}
@@ -1639,7 +1639,7 @@ func startTestRerankerSupervisor(t *testing.T, ignoreTerm bool) (rerankerPIDStat
16391639
Args: []string{"-test.run=TestRerankerHelperProcess", "--", "--port", strconv.Itoa(port), "--pooling", "rank"},
16401640
Environment: environment,
16411641
Stdout: io.Discard,
1642-
Stderr: io.Discard,
1642+
Stderr: os.Stderr,
16431643
})
16441644
}()
16451645

0 commit comments

Comments
 (0)