Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions coderd/autobuild/lifecycle_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ func TestExecutorAutostopTemplateDisabled(t *testing.T) {

// When: the autobuild executor ticks after the workspace setting, but before the template setting:
go func() {
tickCh <- workspace.LatestBuild.CreatedAt.Add(45 * time.Minute)
tickCh <- workspace.LatestBuild.Job.CompletedAt.Add(45 * time.Minute)
}()

// Then: nothing should happen
Expand All @@ -827,7 +827,7 @@ func TestExecutorAutostopTemplateDisabled(t *testing.T) {

// When: the autobuild executor ticks after the template setting:
go func() {
tickCh <- workspace.LatestBuild.CreatedAt.Add(61 * time.Minute)
tickCh <- workspace.LatestBuild.Job.CompletedAt.Add(61 * time.Minute)
close(tickCh)
}()

Expand Down
4 changes: 2 additions & 2 deletions coderd/provisionerdserver/provisionerdserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,9 +1131,9 @@ func (s *server) CompleteJob(ctx context.Context, completed *proto.CompletedJob)

err = db.UpdateProvisionerJobWithCompleteByID(ctx, database.UpdateProvisionerJobWithCompleteByIDParams{
ID: jobID,
UpdatedAt: dbtime.Now(),
UpdatedAt: now,
CompletedAt: sql.NullTime{
Time: dbtime.Now(),
Time: now,
Valid: true,
},
Error: sql.NullString{},
Expand Down