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