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).
|
Initiator(PrebuildOwnerUUID).
|
||||||
ActiveVersion().
|
ActiveVersion().
|
||||||
VersionID(template.ActiveVersionID).
|
VersionID(template.ActiveVersionID).
|
||||||
MarkPrebuild().
|
MarkPrebuild()
|
||||||
RichParameterValues(params)
|
|
||||||
|
// 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(
|
_, provisionerJob, _, err := builder.Build(
|
||||||
ctx,
|
ctx,
|
||||||
|
Reference in New Issue
Block a user