@@ -306,7 +306,7 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
306
306
m .clearInitializerFromMap (pod .Name )
307
307
308
308
// if the secret is already gone, this won't error
309
- err : = m .deleteWorkspaceSecrets (ctx , pod .Name )
309
+ err = m .deleteWorkspaceSecrets (ctx , pod .Name )
310
310
if err != nil {
311
311
return err
312
312
}
@@ -330,7 +330,6 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
330
330
return nil
331
331
}()
332
332
if err != nil {
333
- tracing .LogError (span , err )
334
333
log .WithError (err ).Error ("was unable to update pod's disposal state - this will break someone's experience" )
335
334
}
336
335
}
@@ -357,7 +356,7 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
357
356
// The alternative is to stop the pod only when the workspaceFailedBeforeStoppingAnnotation is present.
358
357
// However, that's much more brittle than stopping the workspace twice (something that Kubernetes can handle).
359
358
// It is important that we do not fail here if the pod is already gone, i.e. when we lost the race.
360
- err : = m .stopWorkspace (ctx , workspaceID , stopWorkspaceNormallyGracePeriod )
359
+ err = m .stopWorkspace (ctx , workspaceID , stopWorkspaceNormallyGracePeriod )
361
360
if err != nil && ! isKubernetesObjNotFoundError (err ) {
362
361
return xerrors .Errorf ("cannot stop workspace: %w" , err )
363
362
}
@@ -376,7 +375,7 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
376
375
}
377
376
378
377
// we're asked to stop the workspace but aren't doing so yet
379
- err : = m .stopWorkspace (ctx , workspaceID , gracePeriod )
378
+ err = m .stopWorkspace (ctx , workspaceID , gracePeriod )
380
379
if err != nil && ! isKubernetesObjNotFoundError (err ) {
381
380
return xerrors .Errorf ("cannot stop workspace: %w" , err )
382
381
}
@@ -423,7 +422,7 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
423
422
424
423
// In case the pod gets evicted we would not know the hostIP that pod ran on anymore.
425
424
// In preparation for those cases, we'll add it as an annotation.
426
- err : = m .markWorkspace (ctx , workspaceID , addMark (nodeNameAnnotation , wso .NodeName ()))
425
+ err = m .markWorkspace (ctx , workspaceID , addMark (nodeNameAnnotation , wso .NodeName ()))
427
426
if err != nil {
428
427
log .WithError (err ).Warn ("was unable to add host IP annotation from/to workspace" )
429
428
}
@@ -439,7 +438,7 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
439
438
if ! isPodBeingDeleted (pod ) {
440
439
span .LogKV ("event" , "pod not being deleted" )
441
440
// this might be the case if a headless workspace has just completed but has not been deleted by anyone, yet
442
- err : = m .stopWorkspace (ctx , workspaceID , stopWorkspaceNormallyGracePeriod )
441
+ err = m .stopWorkspace (ctx , workspaceID , stopWorkspaceNormallyGracePeriod )
443
442
if err != nil && ! isKubernetesObjNotFoundError (err ) {
444
443
return xerrors .Errorf ("cannot stop workspace: %w" , err )
445
444
}
@@ -518,7 +517,6 @@ func actOnPodEvent(ctx context.Context, m actingManager, manager *Manager, statu
518
517
} else {
519
518
// We start finalizing the workspace content only after the container is gone. This way we ensure there's
520
519
// no process modifying the workspace content as we create the backup.
521
- span .LogKV ("event" , "called finalizeWorkspaceContent" )
522
520
go m .finalizeWorkspaceContent (ctx , wso )
523
521
}
524
522
}
0 commit comments