Skip to content

Commit

Permalink
Add annotation gitpod.io/startedDisposal once we enter finalize works…
Browse files Browse the repository at this point in the history
…pace content

Signed-off-by: JenTing Hsiao <[email protected]>
  • Loading branch information
jenting authored and roboquat committed Aug 3, 2022
1 parent b97e21a commit e40e43d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/ws-manager/pkg/manager/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,12 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb
return
}

err := m.manager.markWorkspace(ctx, workspaceID, addMark(startedDisposalAnnotation, util.BooleanTrueString))
if err != nil {
tracing.LogError(span, err)
log.WithError(err).Error("was unable to update pod's start disposal state - this might cause an incorrect disposal state")
}

var disposalStatus *workspaceDisposalStatus
defer func() {
if disposalStatus == nil {
Expand Down Expand Up @@ -1090,12 +1096,6 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb
cancelReq()
}()

err = m.manager.markWorkspace(ctx, workspaceID, addMark(startedDisposalAnnotation, util.BooleanTrueString))
if err != nil {
tracing.LogError(span, err)
log.WithError(err).Error("was unable to update pod's start disposal state - this might cause an incorrect disposal state")
}

if pvcFeatureEnabled {
// pvc was created with the name of the pod. see createDefiniteWorkspacePod()
pvcName := wso.Pod.Name
Expand Down

0 comments on commit e40e43d

Please sign in to comment.