Skip to content

flake: TestWorkspaceProxyWorkspaceApps/WorkspaceAppsProxySubdomain/ProxyError #975

Closed
coder/coder
#20827

Description

@blink-so

CI Failure Details

CI Run Link: https://github.com/coder/coder/actions/runs/17602834933
Commit: 4bf63b4068a157cb0b07b6452626abb8c3a9791a (hugodutka)
Platform: Windows (nightly-gauntlet)
Date: 2025-09-10 04:18:29 GMT

Error Analysis

The test TestWorkspaceProxyWorkspaceApps_BlockDirect/WorkspaceAppsProxySubdomain/ProxyError failed on Windows during the nightly gauntlet run. This appears to be a different failure pattern from the existing issue #112, which reports "failed to reach the Coordinate endpoint" errors.

Test Result:

--- FAIL: TestWorkspaceProxyWorkspaceApps_BlockDirect/WorkspaceAppsProxySubdomain/ProxyError (15.28s)

The test took 15.28 seconds and failed, but the specific error details from the logs show extensive workspace proxy and agent shutdown sequences, suggesting this may be related to cleanup timing issues or resource management during test teardown.

Root Cause Assessment

This appears to be a timing/cleanup issue in the workspace proxy test teardown. The logs show extensive shutdown sequences for:

  1. Agent lifecycle state reporting
  2. Tailnet connection cleanup
  3. Workspace proxy server shutdown
  4. DERP connection cleanup
  5. Provisioner daemon shutdown

The failure may be related to:

  • Race conditions during test cleanup
  • Timing sensitivity on Windows platform
  • Resource cleanup ordering issues
  • Network connection teardown timing

Assignment Analysis

Used git blame on enterprise/wsproxy/wsproxy_test.go line 1001 (test function):

  • Primary author: Colin Adler (original test author, 2024-03-07)
  • Most recent wsproxy flake fixes: Dean Sheather (commit 9d148e954, "chore: fix wsproxy flakes (#18522)")

Assigning to @deansheather based on recent work on wsproxy flake fixes.

Related Issues

Activity

  1. ethanndickson commented on Sep 10, 2025

    @ethanndickson
    Member

    Likely same cause as #960

  2. changed the title [-]flake: TestWorkspaceProxyWorkspaceApps_BlockDirect/WorkspaceAppsProxySubdomain/ProxyError[/-] [+]flake: TestWorkspaceProxyWorkspaceApps/WorkspaceAppsProxySubdomain/ProxyError[/+] on Oct 15, 2025
  3. blink-so commented on Oct 15, 2025

    @blink-so
    Author

    New Occurrence - 2025-10-15

    CI Run Link: https://github.com/coder/coder/actions/runs/18517423772
    Commit: e0b15360757e3f08a59c1439790ec1a48cd5d308
    Platform: macOS (nightly-gauntlet)
    Date: 2025-10-15 04:19:59 GMT

    Error Details

    The test failed with:

    workspace app unavailable: Agent state is "disconnected", not "connected"
    

    Test Output:

    === FAIL: enterprise/wsproxy TestWorkspaceProxyWorkspaceApps/WorkspaceAppsProxySubdomain/ProxyError (35.73s)
    

    The workspace proxy returned a 502 error when trying to issue a signed app token because the agent was in a "disconnected" state instead of "connected".

    Analysis

    This is a reoccurrence of the same timing/race condition, but now observed on macOS instead of Windows. The test attempts to access a workspace app before the agent has fully established its connection state.

    The error occurred at approximately 04:17:31 when the test tried to access test-app-fake via the workspace proxy, but the agent state check reported the agent as "disconnected".

    Pattern

    Both the Windows (original) and macOS (this) occurrences show timing-sensitive behavior around:

    • Agent connection state transitions
    • Workspace proxy app validation
    • Agent lifecycle reporting

    This suggests the fix needs to ensure proper synchronization/waiting for agent connectivity before attempting workspace app access in tests.

  4. assigned and unassigned on Nov 14, 2025
  5. added a commit that references this issue on Nov 19, 2025
    f6556fc
  6. added a commit that references this issue on Nov 25, 2025
    6ba3f3f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions