-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The test TestTemplateEdit/Autostop/startRequirement/BlockedNotEntitled
is failing consistently across multiple CI runs and platforms (both Linux and macOS runners).
Test Details
This test verifies that when a user tries to edit template autostop requirements without the proper license entitlement, the operation should fail with a "license is not entitled" error.
The test:
- Creates a proxy server that returns entitlements without the advanced scheduling feature
- Attempts to set autostop requirements via the CLI
- Expects the operation to fail with a license error
Failure Evidence
- Failed on PR fix: preserve existing template fields in PATCH requests coder#19238 (fix/template-patch-preserve-fields)
- Failed on multiple runners:
test-go-race-pg
,test-go-pg-17
,test-go-pg (macos-latest)
- Error appears to be consistent across different platforms
Potential Causes
- Race condition: The entitlements check might happen before the proxy server is fully set up
- Timing issue: The client configuration with the proxy might not be properly established
- Test isolation: The test might be affected by other parallel tests
Suggested Investigation
- Add more logging to understand the exact failure mode
- Check if the proxy server is properly intercepting the entitlements request
- Verify the client is correctly configured to use the proxy
- Consider adding retry logic or better synchronization in the test setup
Impact
This flaky test is blocking CI and preventing legitimate changes from being merged. The test failure appears to be unrelated to the actual code changes being tested.
Related Files
/cli/templateedit_test.go
(lines ~338-450)/cli/templateedit.go
(entitlements check logic)
cc: @coder/backend
Metadata
Metadata
Assignees
Labels
No labels