-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Test Failure
Test: TestPatchCancelWorkspaceBuild/Cancel_with_expect_state=pending_when_job_is_running_-_should_fail_with_412
Commit: 229d05193d4d7891c33278a42fdeb316743c0c57 (spikecurtis)
CI Run: https://github.com/coder/coder/actions/runs/17118408540
Error Details
The test expected a 412 status code but received a 500 status code instead:
Error: Not equal:
expected: 412
actual : 500
The response body shows:
{
"message": "Internal error fetching provisioner job.",
"detail": "sql: no rows in result set"
}
Analysis
This appears to be a race condition where the test is trying to cancel a workspace build with expect_state=pending
, but the provisioner job is not found in the database when the cancel request is processed, resulting in a "sql: no rows in result set" error instead of the expected 412 Precondition Failed status.
Previous Occurrences
This test has been flaky before - see closed issue #9331 from 2023.