@@ -119,11 +119,13 @@ import { UsageServiceDefinition } from "@gitpod/usage-api/lib/usage/v1/usage.pb"
119
119
import { getExperimentsClientForBackend } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server" ;
120
120
import { BillingServiceClient , BillingServiceDefinition } from "@gitpod/usage-api/lib/usage/v1/billing.pb" ;
121
121
import { IncrementalPrebuildsService } from "../prebuilds/incremental-prebuilds-service" ;
122
+ import { ConfigProvider } from "../../../src/workspace/config-provider" ;
122
123
123
124
@injectable ( )
124
125
export class GitpodServerEEImpl extends GitpodServerImpl {
125
126
@inject ( PrebuildManager ) protected readonly prebuildManager : PrebuildManager ;
126
127
@inject ( IncrementalPrebuildsService ) protected readonly incrementalPrebuildsService : IncrementalPrebuildsService ;
128
+ @inject ( ConfigProvider ) protected readonly configProvider : ConfigProvider ;
127
129
@inject ( LicenseDB ) protected readonly licenseDB : LicenseDB ;
128
130
@inject ( LicenseKeySource ) protected readonly licenseKeySource : LicenseKeySource ;
129
131
@@ -987,9 +989,11 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
987
989
const logPayload = { mode, cloneUrl, commit : commitSHAs , prebuiltWorkspace } ;
988
990
log . debug ( logCtx , "Looking for prebuilt workspace: " , logPayload ) ;
989
991
if ( prebuiltWorkspace ?. state !== "available" && mode === CreateWorkspaceMode . UseLastSuccessfulPrebuild ) {
992
+ const { config } = await this . configProvider . fetchConfig ( { } , user , context ) ;
990
993
const history = await this . incrementalPrebuildsService . getCommitHistoryForContext ( context , user ) ;
991
994
prebuiltWorkspace = await this . incrementalPrebuildsService . findGoodBaseForIncrementalBuild (
992
995
context ,
996
+ config ,
993
997
history ,
994
998
user ,
995
999
) ;
0 commit comments