Skip to content

Add annotation gitpod.io/startedDisposal ealier #11826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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