Skip to content

flake: Test_TaskLogs_Golden/SnapshotWithLogs_Table #1322

@flake-investigator

Description

@flake-investigator

CI Failure Details

CI Run Link: https://github.com/coder/coder/actions/runs/21595278959

Commit Info:

  • SHA: 6b3d4377c3a50a2742eef13ceefc17565c8d3e00
  • Author: Steven Masley
  • Date: 2026-02-02T15:03:18Z

Failed Job: test-go-pg (windows-2022)
Test Location: cli/task_logs_test.go (Test_TaskLogs_Golden/SnapshotWithLogs_Table)

Error Analysis

The CLI task logs snapshot test failed because the API returned a 409 (task status error) instead of logs:

GET http://127.0.0.1:55141/api/v2/tasks/me/<task-id>/logs: unexpected status code 409: Cannot fetch logs for task in current state.
Error: Task status is "error".

This is unexpected for SnapshotWithLogs_Table, which creates a task in paused status via setupCLITaskTestWithSnapshot(...) and expects logs to be fetchable from the snapshot.

Root Cause Assessment

Likely flaky test / timing issue: the task created via dbfake in setupCLITaskTestWithSnapshot sometimes ends up in error status on Windows, causing the 409 from the logs endpoint.

No data race warnings, panics, or OOM indicators were present in the logs.

Assignment Analysis

Recent changes in the failing test file:

  • git log --oneline -10 --follow cli/task_logs_test.go
    • efcfee80b8e0 feat(cli): show snapshots in task logs (#21787) — Mathias Fredriksson (@mafredri)

This commit introduced the snapshot-related task logs tests, including SnapshotWithLogs_* variants, so assigning to @mafredri.

Related Issues

  • None found. Searched for: Test_TaskLogs_Golden, SnapshotWithLogs, Cannot fetch logs for task in current state, task_logs_test.go.
  • Closed issue flake: TestTasks/Logs/UpstreamError #1067 is a different test (TestTasks/Logs/UpstreamError).

Reproduction

Not yet identified; appears intermittent on Windows CI runners.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions