4
4
* See License.AGPL.txt in the project root for license information.
5
5
*/
6
6
7
- import { NamedWorkspaceFeatureFlag } from "./protocol" ;
7
+ import { EnvVar , NamedWorkspaceFeatureFlag , TaskConfig } from "./protocol" ;
8
+ import { WorkspaceRegion } from "./workspace-cluster" ;
8
9
9
10
// WorkspaceInstance describes a part of a workspace's lifetime, specifically a single running session of it
10
11
export interface WorkspaceInstance {
@@ -30,15 +31,15 @@ export interface WorkspaceInstance {
30
31
stoppedTime ?: string ;
31
32
32
33
// ideUrl is the URL at which the workspace is available on the internet
33
- // Note: this is nitially empty, filled during starting process!
34
+ // Note: this is initially empty, filled during starting process!
34
35
ideUrl : string ;
35
36
36
37
// region is the name of the workspace cluster this instance runs in
37
- // Note: this is nitially empty, filled during starting process!
38
+ // Note: this is initially empty, filled during starting process!
38
39
region : string ;
39
40
40
41
// workspaceImage is the name of the Docker image this instance runs
41
- // Note: this is nitially empty, filled during starting process!
42
+ // Note: this is initially empty, filled during starting process!
42
43
workspaceImage : string ;
43
44
44
45
// status is the latest status of the instance that we're aware of
@@ -48,9 +49,7 @@ export interface WorkspaceInstance {
48
49
gitStatus ?: WorkspaceInstanceRepoStatus ;
49
50
50
51
// configuration captures the per-instance configuration variance of a workspace
51
- // Beware: this field was added retroactively and not all instances have valid
52
- // values here.
53
- configuration ?: WorkspaceInstanceConfiguration ;
52
+ configuration : WorkspaceInstanceConfiguration ;
54
53
55
54
// instance is hard-deleted on the database and about to be collected by periodic deleter
56
55
readonly deleted ?: boolean ;
@@ -280,6 +279,11 @@ export interface ConfigurationIdeConfig {
280
279
ide ?: string ;
281
280
}
282
281
282
+ export interface IdeSetup {
283
+ tasks ?: TaskConfig [ ] ;
284
+ envvars ?: EnvVar [ ] ;
285
+ }
286
+
283
287
// WorkspaceInstanceConfiguration contains all per-instance configuration
284
288
export interface WorkspaceInstanceConfiguration {
285
289
// theiaVersion is the version of Theia this workspace instance uses
@@ -296,18 +300,21 @@ export interface WorkspaceInstanceConfiguration {
296
300
// including ide-desktop, desktop-plugin and so on
297
301
ideImageLayers ?: string [ ] ;
298
302
299
- // desktopIdeImage is the ref of the desktop IDE image this instance uses.
300
- // @deprected : replaced with the ideImageLayers field
301
- desktopIdeImage ?: string ;
302
-
303
- // desktopIdePluginImage is the ref of the desktop IDE plugin image this instance uses.
304
- // @deprected : replaced with the desktopIdePluginImage field
305
- desktopIdePluginImage ?: string ;
306
-
307
303
// supervisorImage is the ref of the supervisor image this instance uses.
308
304
supervisorImage ?: string ;
309
305
306
+ // ideSetup contains all piece that are necessary to get the IDE running
307
+ // TODO(gpl) ideally also contains the fields above: ideImage, ideImageLayers and supervisorImage
308
+ ideSetup ?: IdeSetup ;
309
+
310
+ // ideConfig contains user-controlled IDE configuration
310
311
ideConfig ?: ConfigurationIdeConfig ;
312
+
313
+ // The region the user passed as a preference for this workspace
314
+ regionPreference ?: WorkspaceRegion ;
315
+
316
+ // Whether this instance is started from a backup
317
+ fromBackup ?: boolean ;
311
318
}
312
319
313
320
/**
0 commit comments