File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
components/server/src/workspace Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ export namespace WorkspaceClasses {
85
85
return getDefaultId ( workspaceClasses ) ;
86
86
}
87
87
88
+ // todo: remove this once pvc has been rolled out
89
+ if ( previousWorkspaceClass . endsWith ( "-pvc" ) ) {
90
+ return previousWorkspaceClass ;
91
+ }
92
+
88
93
const config = workspaceClasses . find ( ( c ) => c . id === previousWorkspaceClass ) ;
89
94
if ( ! config ) {
90
95
log . error (
@@ -186,6 +191,11 @@ export namespace WorkspaceClasses {
186
191
const current = classes . find ( ( c ) => c . id === currentClassId ) ;
187
192
let substitute = classes . find ( ( c ) => c . id === substituteClassId ) ;
188
193
194
+ // todo: remove this once pvc has been rolled out
195
+ if ( currentClassId . endsWith ( "-pvc" ) ) {
196
+ return currentClassId ;
197
+ }
198
+
189
199
if ( current ?. marker ?. moreResources ) {
190
200
if ( substitute ?. marker ?. moreResources ) {
191
201
return substitute ?. id ;
Original file line number Diff line number Diff line change @@ -903,9 +903,20 @@ export class WorkspaceStarter {
903
903
904
904
featureFlags = featureFlags . concat ( [ "workspace_class_limiting" ] ) ;
905
905
} else {
906
- workspaceClass = "default" ;
907
- if ( await this . entitlementService . userGetsMoreResources ( user ) ) {
908
- workspaceClass = "gitpodio-internal-xl" ;
906
+ // todo: remove this once pvc has been rolled out
907
+ const prebuildClass = await WorkspaceClasses . getFromPrebuild (
908
+ ctx ,
909
+ workspace ,
910
+ this . workspaceDb . trace ( ctx ) ,
911
+ ) ;
912
+ if ( prebuildClass ?. endsWith ( "-pvc" ) ) {
913
+ workspaceClass = prebuildClass ;
914
+ // ####
915
+ } else {
916
+ workspaceClass = "default" ;
917
+ if ( await this . entitlementService . userGetsMoreResources ( user ) ) {
918
+ workspaceClass = "gitpodio-internal-xl" ;
919
+ }
909
920
}
910
921
}
911
922
You can’t perform that action at this time.
0 commit comments