mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
Prevent prebuild deletion from failing because old params were passed in
Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
@ -417,8 +417,13 @@ func (c Controller) provision(ctx context.Context, db database.Store, prebuildID
|
||||
Initiator(PrebuildOwnerUUID).
|
||||
ActiveVersion().
|
||||
VersionID(template.ActiveVersionID).
|
||||
MarkPrebuild().
|
||||
RichParameterValues(params)
|
||||
MarkPrebuild()
|
||||
|
||||
// We only inject the required params when the prebuild is being created.
|
||||
// This mirrors the behaviour of regular workspace deletion (see cli/delete.go).
|
||||
if transition != database.WorkspaceTransitionDelete {
|
||||
builder = builder.RichParameterValues(params)
|
||||
}
|
||||
|
||||
_, provisionerJob, _, err := builder.Build(
|
||||
ctx,
|
||||
|
Reference in New Issue
Block a user