CI Failure Details
Failure Evidence
=== FAIL: cli TestServer/Logging/JSON (1.01s)
clitest.go:299: command "coder server" exited with error: running command "coder server": connect to postgres:
- get postgres version:
github.com/coder/coder/v2/cli.ConnectToPostgres
- pq: canceling statement due to user request
Error Analysis
- Failure happens during server startup when running
SHOW server_version_num in ConnectToPostgres.
- The test uses
clitest.Start, which applies a default timeout; the context cancels and PostgreSQL reports canceling statement due to user request.
- No data race warnings, panics, or OOM indicators observed in the job logs.
Root Cause Classification
- Flaky test / timing-sensitive Postgres startup on macOS.
Ownership / Assignment Analysis
Suggested blame commands:
# Failing test
git blame -L 1783,1810 cli/server_test.go
# Postgres connect/version check
git blame -L 2725,2755 cli/server.go
Recent test-file history (git log --oneline --follow cli/server_test.go) includes:
eb74d902 test: fix TestServer cases that cancel before PostgreSQL work is done (Spike Curtis)
5b692bf test: rename ExpectMatchContext to ExpectMatch (Spike Curtis)
Assigning to spikecurtis based on recent work in TestServer cancellation behavior and CLI test harness.
Related Issues
Reproduction
go test ./cli -run TestServer/Logging/JSON -count=1
CI Failure Details
Failure Evidence
Error Analysis
SHOW server_version_numinConnectToPostgres.clitest.Start, which applies a default timeout; the context cancels and PostgreSQL reportscanceling statement due to user request.Root Cause Classification
Ownership / Assignment Analysis
Suggested blame commands:
Recent test-file history (
git log --oneline --follow cli/server_test.go) includes:eb74d902test: fix TestServer cases that cancel before PostgreSQL work is done (Spike Curtis)5b692bftest: rename ExpectMatchContext to ExpectMatch (Spike Curtis)Assigning to spikecurtis based on recent work in TestServer cancellation behavior and CLI test harness.
Related Issues
no rows returned for version select#672 (different failure signature; being closed as unrelated)Reproduction