Skip to content

flake: TestListChats/PinnedOnFirstPage #1507

@flake-investigator

Description

@flake-investigator

CI Run: https://github.com/coder/coder/actions/runs/25120997694
Failed Job: https://github.com/coder/coder/actions/runs/25120997694/job/73621426251 (test-go-race-pg)
Commit: 6ea9c61da035d175ea2035b19b9b4327507d4a0b (Paweł Banaszewski) coder/coder@6ea9c61
Date: 2026-04-29

Failing test:

  • coderd package
  • Test: TestListChats/PinnedOnFirstPage
  • File: coderd/exp_chats_test.go (subtest around lines ~1134-1200)

Failure excerpt:

exp_chats_test.go:1178:
    Error:      Received unexpected error:
                context deadline exceeded
    Messages:   Eventually timed out
exp_chats_test.go:1197:
    Error:      Patch "http://127.0.0.1:33801/api/experimental/chats/...": context deadline exceeded

Additional context in the same window:

GET /api/experimental/chats -> 500
response_body: {"message":"Failed to list chats.","detail":"get chat diff statuses: fetch object: context canceled"}

Error analysis / root cause:

  • The test creates 52 chats via the API and then waits for all chats to reach a terminal status via a testutil.Eventually loop before pinning. Under -race, chat processing is slower and the eventual poll can time out, causing the subsequent PATCH to also hit context deadline exceeded.
  • No WARNING: DATA RACE, panic, or OOM indicators seen in the logs.

Assignment analysis:

  • git log --oneline -10 --follow coderd/exp_chats_test.go
    • 5222db86 feat: add after_id pagination for chat messages (david-fraley)
    • be1256c4 fix(coderd): fix TestListChats/PinnedOnFirstPage race timeout (johnstcn)
  • Line-level blame isn’t available in current tooling. The most recent meaningful test-file change is 5222db86 (david-fraley), while be1256c4 previously adjusted this test to avoid race timeouts (current version has the Eventually loop again). Assigning to @david-fraley for triage; please reassign if ownership differs.

Related issues:

Reproduction (if needed):

go test ./coderd -run TestListChats/PinnedOnFirstPage -count=1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions