File tree 2 files changed +1
-30
lines changed
components/ws-manager-bridge
2 files changed +1
-30
lines changed Original file line number Diff line number Diff line change 7
7
import { WorkspaceManagerBridge } from "../../src/bridge" ;
8
8
import { inject , injectable } from "inversify" ;
9
9
import { TraceContext } from "@gitpod/gitpod-protocol/lib/util/tracing" ;
10
- import { WorkspaceStatus , WorkspaceType , WorkspacePhase } from "@gitpod/ws-manager/lib" ;
10
+ import { WorkspaceStatus , WorkspaceType } from "@gitpod/ws-manager/lib" ;
11
11
import { HeadlessWorkspaceEvent } from "@gitpod/gitpod-protocol/lib/headless-workspace-log" ;
12
12
import { WorkspaceInstance } from "@gitpod/gitpod-protocol" ;
13
13
import { log , LogContext } from "@gitpod/gitpod-protocol/lib/util/logging" ;
@@ -18,29 +18,6 @@ export class WorkspaceManagerBridgeEE extends WorkspaceManagerBridge {
18
18
@inject ( PrebuildStateMapper )
19
19
protected readonly prebuildStateMapper : PrebuildStateMapper ;
20
20
21
- protected async cleanupProbeWorkspace ( ctx : TraceContext , status : WorkspaceStatus . AsObject | undefined ) {
22
- if ( ! status ) {
23
- return ;
24
- }
25
- if ( status . spec && status . spec . type != WorkspaceType . PROBE ) {
26
- return ;
27
- }
28
- if ( status . phase !== WorkspacePhase . STOPPED ) {
29
- return ;
30
- }
31
-
32
- const span = TraceContext . startSpan ( "cleanupProbeWorkspace" , ctx ) ;
33
- try {
34
- const workspaceId = status . metadata ! . metaId ! ;
35
- await this . workspaceDB . trace ( { span } ) . hardDeleteWorkspace ( workspaceId ) ;
36
- } catch ( e ) {
37
- TraceContext . setError ( { span } , e ) ;
38
- throw e ;
39
- } finally {
40
- span . finish ( ) ;
41
- }
42
- }
43
-
44
21
protected async updatePrebuiltWorkspace (
45
22
ctx : TraceContext ,
46
23
userId : string ,
Original file line number Diff line number Diff line change @@ -380,8 +380,6 @@ export class WorkspaceManagerBridge implements Disposable {
380
380
381
381
// cleanup
382
382
// important: call this after the DB update
383
- await this . cleanupProbeWorkspace ( ctx , status ) ;
384
-
385
383
if ( ! ! lifecycleHandler ) {
386
384
await lifecycleHandler ( ) ;
387
385
}
@@ -469,10 +467,6 @@ export class WorkspaceManagerBridge implements Disposable {
469
467
await Promise . all ( promises ) ;
470
468
}
471
469
472
- protected async cleanupProbeWorkspace ( ctx : TraceContext , status : WorkspaceStatus . AsObject | undefined ) {
473
- // probes are an EE feature - we just need the hook here
474
- }
475
-
476
470
protected async updatePrebuiltWorkspace (
477
471
ctx : TraceContext ,
478
472
userId : string ,
You can’t perform that action at this time.
0 commit comments