mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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>
This commit is contained in:
@@ -1836,7 +1836,7 @@ func (s *server) CompleteJob(ctx context.Context, completed *proto.CompletedJob)
|
||||
})
|
||||
}
|
||||
|
||||
if s.PrebuildsOrchestrator != nil {
|
||||
if s.PrebuildsOrchestrator != nil && input.PrebuiltWorkspaceBuildStage == sdkproto.PrebuiltWorkspaceBuildStage_CLAIM {
|
||||
// Track resource replacements, if there are any.
|
||||
orchestrator := s.PrebuildsOrchestrator.Load()
|
||||
if resourceReplacements := completed.GetWorkspaceBuild().GetResourceReplacements(); orchestrator != nil && len(resourceReplacements) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user