Skip to content

flake: TestWorkspaceProxyWorkspaceApps/WorkspaceAppsProxyPath/ProxyError #1385

@flake-investigator

Description

@flake-investigator

CI Run Link: https://github.com/coder/coder/actions/runs/22749233417
Job: test-go-pg (windows-2022)
Date: 2026-03-06 04:56 UTC
Commit: d034903736047c4168562d4bfe6fd1417b1c9b64 (Kyle Carberry)

Failure summary

  • Test: TestWorkspaceProxyWorkspaceApps/WorkspaceAppsProxyPath/ProxyError
  • Package: enterprise/wsproxy
  • Error: context deadline exceeded while waiting for workspace LastUsedAt to update

Key evidence

apptest.go:2443:
	Error: Received unexpected error:
	Get "http://127.0.0.1:64009/api/v2/workspaces/871c44b2-1ba9-47d9-992f-78fb17164f86": context deadline exceeded
	Test: TestWorkspaceProxyWorkspaceApps/WorkspaceAppsProxyPath/ProxyError

apptest.go:380:
	Error: Received unexpected error:
	context deadline exceeded
	Messages: Eventually timed out

Additional log context shows the workspace API responding during shutdown:

GET /api/v2/workspaces/... status_code=500 response_body={"message":"Internal error fetching workspace resources.","detail":"get templates: (dev error) prepare sql filter: new partial authorizer: context canceled"}

Root cause assessment

  • Category: A. Flaky test (timing/race)
  • The failure comes from assertWorkspaceLastUsedAtUpdated in coderd/workspaceapps/apptest/apptest.go, which explicitly notes racy behavior when tests run in parallel. The testutil.Eventually polling timed out, leading to a context deadline exceeded on the workspace API call.
  • No evidence of data races, panics, or OOMs in logs.

Precise assignment analysis

  • git log --oneline -10 --follow coderd/workspaceapps/apptest/apptest.go shows recent relevant changes:
    • 4a56a409 (Cian Johnston): apptest updated to context-aware testutil.Eventually
    • 42dd544d (Dean Sheather): unique cookies for workspace proxies
  • git log --oneline -10 --follow enterprise/wsproxy/wsproxy_test.go shows no recent functional changes to this test aside from formatting/chore updates.
  • The failure is in apptest helper timing; assigning to @johnstcn (recent functional changes in apptest helpers and workspace apps test logic). If this is more about wsproxy test setup, please reassign.

Related issues

Reproduction

  • Not deterministic; occurs intermittently on Windows nightly-gauntlet.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions