Skip to content

flake: TestSubscribeRelayDrainWithinGraceLeavesBufferRetained #1474

@flake-investigator

Description

@flake-investigator

CI Run

Commit

  • SHA: a53f52ee38e3b5537048e3c227f7a1d9dda3a5ed
  • Author: Danielle Maywood

Failure

=== FAIL: enterprise/coderd/x/chatd TestSubscribeRelayDrainWithinGraceLeavesBufferRetained (25.20s)
    chatd_test.go:1519:
        Error:       Received unexpected error:
                     context deadline exceeded
        Messages:    Eventually timed out
    chatd_test.go:1536:
        Error:       Received unexpected error:
                     context deadline exceeded
        Messages:    Eventually timed out
    chatd_test.go:1553:
        Error:       Received unexpected error:
                     context deadline exceeded
        Messages:    retained buffer must still contain message_parts after the relay drains within grace

Error Analysis

  • The test’s testutil.Eventually assertions timed out waiting for relay drain behavior and retained buffer checks.
  • Logs show pubsub events and chat processing completing, but the expected retained message_parts were not observed before the context deadline.
  • No panic/OOM indicators found. No data race warnings observed in the job logs.

Root Cause Assessment

  • Flaky timing in the enterprise relay drain + retained buffer behavior. The test relies on ordering between relay drain, worker grace window, and subscription teardown; in this run the expected retained buffer state was not observed before the deadline.

Assignment Analysis

  • git blame -L 1440,1585 enterprise/coderd/x/chatd/chatd_test.go → commit 3f6b40a83384fc337fa1ac42edfdd7e96a4652bf (Cian Johnston) introduced this test and surrounding relay drain/retained buffer characterization.
  • git log --oneline -10 --follow enterprise/coderd/x/chatd/chatd_test.go shows the most recent relevant changes are in 3f6b40a83384... (adds regression tests in enterprise/coderd/x/chatd).

Suggested owner: Cian Johnston (commit 3f6b40a83384...). GitHub assignee could not be auto-set.

Related Issues

  • Searched: TestSubscribeRelayDrainWithinGraceLeavesBufferRetained, SubscribeRelayDrainWithinGrace, retained buffer + chatd, chatd_test.go SubscribeRelayDrain
  • No matching open/closed issues found in coder/internal.

Reproduction

go test ./enterprise/coderd/x/chatd -run TestSubscribeRelayDrainWithinGraceLeavesBufferRetained -count=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions