Skip to content

flake: TestAPI/NoUpdaterLoopLogspam #766

@dannykopping

Description

@dannykopping

https://github.com/coder/coder/actions/runs/16326297625/job/46117212977

Introduced by coder/coder#18710

=== FAIL: agent/agentcontainers TestAPI/NoUpdaterLoopLogspam (0.01s)
    mock.go:448: Mock Clock - Trap TickerFunc(..., [updaterLoop])
    t.go:106: 2025-07-16 17:36:18.814 [debu]  updater loop started
    t.go:106: 2025-07-16 17:36:18.814 [debu]  cleaning up subagents
    t.go:106: 2025-07-16 17:36:18.814 [debu]  cleanup subagents complete
    t.go:106: 2025-07-16 17:36:18.814 [debu]  performing initial containers update
    t.go:109: 2025-07-16 17:36:18.814 [erro]  initial containers update failed ...
        error= list containers failed:
                   github.com/coder/coder/v2/agent/agentcontainers.(*API).updateContainers
                       /home/runner/work/coder/coder/agent/agentcontainers/api.go:665
                 - first error:
                   github.com/coder/coder/v2/agent/agentcontainers_test.TestAPI.func1
                       /home/runner/work/coder/coder/agent/agentcontainers/api_test.go:356
    mock.go:202: Mock Clock - TickerFunc(<ctx>, 10s, <fn>, [agentcontainers updaterLoop]) call, matched 1 traps
    mock.go:357: Mock Clock - AdvanceNext()
    t.go:109: 2025-07-16 17:36:18.814 [erro]  updater loop ticker failed ...
        error= list containers failed:
                   github.com/coder/coder/v2/agent/agentcontainers.(*API).updateContainers
                       /home/runner/work/coder/coder/agent/agentcontainers/api.go:665
                 - first error:
                   github.com/coder/coder/v2/agent/agentcontainers_test.TestAPI.func1
                       /home/runner/work/coder/coder/agent/agentcontainers/api_test.go:356
    t.go:106: 2025-07-16 17:36:18.815 [debu]  watcher loop started
    api_test.go:383: got log: "2025-07-16 17:36:18.814 [erro]  updater loop ticker failed ...\n    error= list containers failed:\n               github.com/coder/coder/v2/agent/agentcontainers.(*API).updateContainers\n                   /home/runner/work/coder/coder/agent/agentcontainers/api.go:665\n             - first error:\n               github.com/coder/coder/v2/agent/agentcontainers_test.TestAPI.func1\n                   /home/runner/work/coder/coder/agent/agentcontainers/api_test.go:356\n"
    api_test.go:389: Mock Clock - AdvanceNext()
    api_test.go:394: got log: "2025-07-16 17:36:18.815 [debu]  watcher loop started\n"
    api_test.go:395: 
        	Error Trace:	/home/runner/work/coder/coder/agent/agentcontainers/api_test.go:395
        	Error:      	Should be empty, but was 2025-07-16 17:36:18.815 [debu]  watcher loop started
        	Test:       	TestAPI/NoUpdaterLoopLogspam
        	Messages:   	same error should not be logged again
    t.go:106: 2025-07-16 17:36:18.819 [debu]  closing API
    mock.go:202: Mock Clock - TickerFunc.Wait([agentcontainers updaterLoop]) call, matched 0 traps
    t.go:106: 2025-07-16 17:36:18.819 [debu]  updater loop stopped
    t.go:106: 2025-07-16 17:36:18.819 [debu]  api context canceled
    t.go:106: 2025-07-16 17:36:18.819 [debu]  watcher loop stopped
    t.go:106: 2025-07-16 17:36:18.819 [debu]  closed API
    mock.go:477: Mock Clock - test cleanup; will no longer log clock events
    --- FAIL: TestAPI/NoUpdaterLoopLogspam (0.01s)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions