Skip to content

flake: TestPush/CachesSubscriptionsWithinTTL #1593

Description

@flake-investigator

CI Failure Details

CI Run: https://github.com/coder/coder/actions/runs/27613900523
Failed Job: https://github.com/coder/coder/actions/runs/27613900523/job/81644990077 (test-go-pg ubuntu-latest)
Commit: 1290d64cc47169ed736453e5ecab8d50a7c95a44 (dependabot[bot]) coder/coder@1290d64
Date: 2026-06-16

Failing Test

  • coderd/webpush TestPush/CachesSubscriptionsWithinTTL
  • File: coderd/webpush/webpush_test.go:397

Error Output

failed to send webpush notification  error="Post \"http://127.0.0.1:36699\": net/http: HTTP/1.x transport connection broken: http: CloseIdleConnections called"
webpush_test.go:397:
    Error:       Received unexpected error:
                 send webpush notifications:
                   github.com/coder/coder/v2/coderd/webpush.(*Webpusher).Dispatch
                   /home/runner/work/coder/coder/coderd/webpush/webpush.go:264
                 - send webpush notification:
                   github.com/coder/coder/v2/coderd/webpush.(*Webpusher).webpushSend
                   /home/runner/work/coder/coder/coderd/webpush/webpush.go:418
                 - Post "http://127.0.0.1:36699": net/http: HTTP/1.x transport connection broken: http: CloseIdleConnections called

Error Analysis

TestPush/CachesSubscriptionsWithinTTL sends two webpush notifications to a local test server. The request failed with http: CloseIdleConnections called, which indicates the HTTP transport closed idle connections while the request was in flight, resulting in a broken transport and a failed dispatch.

Root Cause Assessment

Likely flaky HTTP transport / test infrastructure timing. The local webpush endpoint is expected to be stable, but a shared transport closing idle connections can interrupt the request, producing a transient failure.

Assignment Analysis

Intended blame command:

  • git blame -L 380,420 coderd/webpush/webpush_test.go

Proxy via history (available tooling):

  • git log --oneline -10 --follow coderd/webpush/webpush_test.go
    • Most recent substantive change: 069223a (Kyle Carberry)

Assigning to @kylecarbs as the most recent modifier of the failing test area.

Data race / crash checks

Searched logs for WARNING: DATA RACE, panic:, and OOM indicators; none found.

Related Issues

Searched coder/internal for:

  • TestPush/CachesSubscriptionsWithinTTL
  • CachesSubscriptionsWithinTTL
  • CloseIdleConnections + webpush
    No existing issues found.

Reproduction

go test ./coderd/webpush -run TestPush/CachesSubscriptionsWithinTTL -count=1

Metadata

Metadata

Assignees

Labels

Type

No type
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