Skip to content

flake: TestStreamAgentReinitEvents/doesn't_transmit_events_if_the_transmitter_context_is_canceled #1451

@flake-investigator

Description

@flake-investigator

CI Failure Information

CI Run Link: https://github.com/coder/coder/actions/runs/24042078118
Job: test-go-pg-17 (job ID: 70116121339)
Commit: 4cfbf544a045d62e5df02474f0ae4c168f871dce — "feat: add per-chat system prompt option (#24053)" by Kyle Carberry

Failure Details

Test: codersdk/agentsdk.TestStreamAgentReinitEvents/doesn't_transmit_events_if_the_transmitter_context_is_canceled

Error Snippet:

agentsdk_test.go:84:
    Error:       Received unexpected error:
                 Get "http://127.0.0.1:35719": net/http: HTTP/1.x transport connection broken: http: CloseIdleConnections called

Test Summary: DONE 19557 tests, 56 skipped, 2 failures in 319.429s

Root Cause Analysis

  • No data race warnings detected
  • No panic/OOM indicators detected
  • Failure appears to be a flaky HTTP transport issue where a request is interrupted by CloseIdleConnections.
  • The test uses client := &http.Client{} (default transport). Other parallel tests calling CloseIdleConnections on the shared default transport can break in-flight requests.

Assignment Analysis

  • Failing test function: TestStreamAgentReinitEvents in codersdk/agentsdk/agentsdk_test.go (line ~84).
  • Recent file history (via GitHub commit history for codersdk/agentsdk/agentsdk_test.go):
    • 5b6b7719 (Sas Swart, PR #23108) — added OwnerID to TestStreamAgentReinitEvents and related reinit logic.
  • This is the most recent substantive change to the failing test; assigning to @SasSwart.

Related Issues

Reproduction

go test ./codersdk/agentsdk -run TestStreamAgentReinitEvents/doesn't_transmit_events_if_the_transmitter_context_is_canceled -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