@@ -211,14 +211,6 @@ export function isClusterMaintenanceError(err: any): boolean {
211
211
) ;
212
212
}
213
213
214
- /**
215
- * Context for creating the actual workspace spec.
216
- * This is meant to help make the actual spec generation stateless and testable.
217
- */
218
- interface CreateSpecContext {
219
- project ?: Project ;
220
- }
221
-
222
214
@injectable ( )
223
215
export class WorkspaceStarter {
224
216
static readonly STARTING_PHASES : WorkspaceInstancePhase [ ] = [ "preparing" , "building" , "pending" ] ;
@@ -653,8 +645,7 @@ export class WorkspaceStarter {
653
645
) ;
654
646
655
647
// create spec
656
- const specCtx = await this . getCreateSpecContext ( user , workspace ) ;
657
- const spec = await this . createSpec ( { span } , specCtx , user , workspace , instance , envVars ) ;
648
+ const spec = await this . createSpec ( { span } , user , workspace , instance , envVars ) ;
658
649
659
650
// create start workspace request
660
651
const metadata = await this . createMetadata ( workspace ) ;
@@ -1379,7 +1370,6 @@ export class WorkspaceStarter {
1379
1370
1380
1371
private async createSpec (
1381
1372
traceCtx : TraceContext ,
1382
- specCtx : CreateSpecContext ,
1383
1373
user : User ,
1384
1374
workspace : Workspace ,
1385
1375
instance : WorkspaceInstance ,
@@ -1998,14 +1988,6 @@ export class WorkspaceStarter {
1998
1988
} ;
1999
1989
}
2000
1990
2001
- private async getCreateSpecContext ( user : User , workspace : Workspace ) : Promise < CreateSpecContext > {
2002
- let project : Project | undefined ;
2003
- if ( workspace . projectId ) {
2004
- project = await this . projectService . getProject ( user . id , workspace . projectId , true ) ;
2005
- }
2006
- return { project } ;
2007
- }
2008
-
2009
1991
private toWorkspaceFeatureFlags ( featureFlags : NamedWorkspaceFeatureFlag [ ] ) : WorkspaceFeatureFlag [ ] {
2010
1992
const result = featureFlags
2011
1993
. map ( ( name ) => {
0 commit comments