Skip to content

Commit f2edcf3

Browse files
authored
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 522c178 commit f2edcf3

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
@@ -1836,7 +1836,7 @@ func (s *server) CompleteJob(ctx context.Context, completed *proto.CompletedJob)
18361836
})
18371837
}
18381838

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy