Skip to content

Commit 79401fb

Browse files
utam0kroboquat
authored andcommitted
ws-manager: if disposal status is finished, don't run finalizer.
1 parent bb60d0a commit 79401fb

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

components/ws-manager/pkg/manager/annotations.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,7 @@ func (m *Manager) markDisposalStatus(ctx context.Context, workspaceID string, di
177177
return err
178178
}
179179

180-
err = m.markWorkspace(ctx, workspaceID, addMark(disposalStatusAnnotation, string(b)))
181-
if err != nil {
182-
return err
183-
}
184-
return nil
180+
return m.markWorkspace(ctx, workspaceID, addMark(disposalStatusAnnotation, string(b)))
185181
}
186182

187183
type DisposalStatus string

components/ws-manager/pkg/manager/monitor.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,11 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
514514
}
515515
return m.modifyFinalizer(ctx, workspaceID, gitpodFinalizerName, false)
516516
} else {
517-
// We start finalizing the workspace content only after the container is gone. This way we ensure there's
518-
// no process modifying the workspace content as we create the backup.
519-
go m.finalizeWorkspaceContent(ctx, wso)
517+
if ds == nil || ds.Status != DisposalFinished {
518+
// We start finalizing the workspace content only after the container is gone. This way we ensure there's
519+
// no process modifying the workspace content as we create the backup.
520+
go m.finalizeWorkspaceContent(ctx, wso)
521+
}
520522
}
521523
}
522524

0 commit comments

Comments
 (0)