Skip to content

Commit fd0a84d

Browse files
committed
fix: add missing clause for tracking replacements (#17849)
We should only be tracking resource replacements during a prebuild claim. Signed-off-by: Danny Kopping <dannykopping@gmail.com>
1 parent 3027bcf commit fd0a84d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/provisionerdserver/provisionerdserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,7 @@ func (s *server) CompleteJob(ctx context.Context, completed *proto.CompletedJob)
17511751
})
17521752
}
17531753

1754-
if s.PrebuildsOrchestrator != nil {
1754+
if s.PrebuildsOrchestrator != nil && input.PrebuiltWorkspaceBuildStage == sdkproto.PrebuiltWorkspaceBuildStage_CLAIM {
17551755
// Track resource replacements, if there are any.
17561756
orchestrator := s.PrebuildsOrchestrator.Load()
17571757
if resourceReplacements := completed.GetWorkspaceBuild().GetResourceReplacements(); orchestrator != nil && len(resourceReplacements) > 0 {

0 commit comments

Comments
 (0)