Skip to content

flake: Test_TaskStatus (multiple variants) #1388

@flake-investigator

Description

@flake-investigator

CI Run: https://github.com/coder/coder/actions/runs/22780868233
Failed Job: test-go-pg (macos-latest)
Commit: b9b3c67c73c551ce9ac0d5c2ee5c703700cc00eb (Kyle Carberry)

Failure:

=== FAIL: cli Test_TaskStatus/exists (1.24s)
    task_status_test.go:275: unexpected output diff (-want +got):
         strings.Join({
         	"STATE CHANGED  STATUS  HEALTHY  STATE    MESSAGE\n",
        -	"0",
        +	"1",
         	"s ago         active  true     working  Thinking furiously...",
         }, "")
--- FAIL: Test_TaskStatus/exists (1.24s)

=== FAIL: cli Test_TaskStatus/exists,--watch (1.34s)
    task_status_test.go:275: unexpected output diff (-want +got):
         strings.Join({
         	"STATE CHANGED  STATUS   HEALTHY  STATE  MESSAGE\n",
        -	"5",
        +	"6",
         	"s ago         pending  true\n",
        -	"4",
        +	"5",
         	"s ago         initializing  true\n",
        -	"4",
        +	"5",
         	"s ago         active  true\n",
        -	"3",
        +	"4",
         	"s ago         active  true     working  Reticulating splines...\n",
        -	"2",
        +	"3",
         	"s ago         active  true     complete  Splines reticulated successfully!",
         }, "")
--- FAIL: Test_TaskStatus/exists,--watch (1.34s)

DONE 2509 tests, 37 skipped, 3 failures in 101.792s

Error Analysis:

  • Output includes relative time strings ("Xs ago") derived from time.Now in the test. macOS runner timing drift causes off-by-one seconds vs expected values.
  • Failure only observed on macOS job; Linux/Windows test-go-pg jobs passed in same run.

Root Cause Classification: Flaky test (timing-sensitive output assertions)

Assignment Analysis:

  • git blame -L 250,280 cli/task_status_test.go
    • b255827a5269f767c2dba476c7189ef6157ff574 chore: promote tasks to stable from experimental (#20921) (author: Danielle Maywood, GitHub: DanielleMaywood)
  • git log --oneline -10 --follow cli/task_status_test.go points to the same commit as the most recent functional change.

Suggested Assignee: DanielleMaywood

Related Issues: none found in coder/internal

Reproduction:

  • go test ./cli -run Test_TaskStatus -count=1

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions