Skip to content

fix(coderd/database): avoid clobbering workspace build state #9826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 22, 2023
Merged
Prev Previous commit
Next Next commit
fixup! RED: update tests in enterprise/coderd/schedule.go to replicat…
…e issue
  • Loading branch information
johnstcn committed Sep 22, 2023
commit 2dd595df52975ce05262af974510c931c7e9c5c0
9 changes: 4 additions & 5 deletions enterprise/coderd/schedule/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,10 @@ func TestTemplateUpdateBuildDeadlinesSkip(t *testing.T) {
require.NotEmpty(t, wsBuild.ProvisionerState, "provisioner state must not be empty")

err := db.UpdateWorkspaceBuildByID(ctx, database.UpdateWorkspaceBuildByIDParams{
ID: wsBuild.ID,
UpdatedAt: buildTime,
ProvisionerState: []byte{},
Deadline: originalMaxDeadline,
MaxDeadline: originalMaxDeadline,
ID: wsBuild.ID,
UpdatedAt: buildTime,
Deadline: originalMaxDeadline,
MaxDeadline: originalMaxDeadline,
})
require.NoError(t, err)

Expand Down