Skip to content

flake: TestServer/Logging/JSON #1618

Description

@flake-investigator

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

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions