Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b10e89

Browse files
authored
Revert "fix: change auto-start to automatically update workspaces (#6053)" (#7084)
This reverts commitbdddc3e.
1 parent9d39371 commit3b10e89

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎coderd/autobuild/executor/lifecycle_executor.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func build(ctx context.Context, store database.Store, workspace database.Workspa
308308
CreatedAt:now,
309309
UpdatedAt:now,
310310
WorkspaceID:workspace.ID,
311-
TemplateVersionID:template.ActiveVersionID,
311+
TemplateVersionID:priorHistory.TemplateVersionID,
312312
BuildNumber:priorBuildNumber+1,
313313
ProvisionerState:priorHistory.ProvisionerState,
314314
InitiatorID:workspace.OwnerID,

‎coderd/autobuild/executor/lifecycle_executor_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ func TestExecutorAutostartTemplateUpdated(t *testing.T) {
9797
close(tickCh)
9898
}()
9999

100-
// Then: the workspaceisstarted using thenew template version, not theold one.
100+
// Then: the workspaceshould bestarted using theprevious template version,andnot theupdated version.
101101
stats:=<-statsCh
102102
assert.NoError(t,stats.Error)
103103
assert.Len(t,stats.Transitions,1)
104104
assert.Contains(t,stats.Transitions,workspace.ID)
105105
assert.Equal(t,database.WorkspaceTransitionStart,stats.Transitions[workspace.ID])
106106
ws:=coderdtest.MustWorkspace(t,client,workspace.ID)
107-
assert.Equal(t,newVersion.ID,ws.LatestBuild.TemplateVersionID,"expected workspace build to be using thenew template version")
107+
assert.Equal(t,workspace.LatestBuild.TemplateVersionID,ws.LatestBuild.TemplateVersionID,"expected workspace build to be using theold template version")
108108
}
109109

110110
funcTestExecutorAutostartAlreadyRunning(t*testing.T) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp