fix: Test flake in TestWorkspaceStatus (#4333)

This also changes the status to be on the workspace build, since
that's where the true value is calculated. This exposed a bug where
jobs could never enter the canceled state unless fetched by a
provisioner daemon, which was nice to fix!

See: https://github.com/coder/coder/actions/runs/3175304200/jobs/5173479506
This commit is contained in:
Kyle Carberry
2022-10-03 11:43:11 -05:00
committed by GitHub
parent d11d83cc98
commit df2649ed2a
13 changed files with 148 additions and 143 deletions

View File

@ -78,7 +78,8 @@ WHERE
UPDATE
provisioner_jobs
SET
canceled_at = $2
canceled_at = $2,
completed_at = $3
WHERE
id = $1;