-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[server] Separate instance creation from instance starting (again) #18642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
* See License.AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
import { NamedWorkspaceFeatureFlag } from "./protocol"; | ||
import { EnvVar, NamedWorkspaceFeatureFlag, TaskConfig } from "./protocol"; | ||
import { WorkspaceRegion } from "./workspace-cluster"; | ||
|
||
// WorkspaceInstance describes a part of a workspace's lifetime, specifically a single running session of it | ||
export interface WorkspaceInstance { | ||
|
@@ -30,15 +31,15 @@ export interface WorkspaceInstance { | |
stoppedTime?: string; | ||
|
||
// ideUrl is the URL at which the workspace is available on the internet | ||
// Note: this is nitially empty, filled during starting process! | ||
// Note: this is initially empty, filled during starting process! | ||
ideUrl: string; | ||
|
||
// region is the name of the workspace cluster this instance runs in | ||
// Note: this is nitially empty, filled during starting process! | ||
// Note: this is initially empty, filled during starting process! | ||
region: string; | ||
|
||
// workspaceImage is the name of the Docker image this instance runs | ||
// Note: this is nitially empty, filled during starting process! | ||
// Note: this is initially empty, filled during starting process! | ||
workspaceImage: string; | ||
|
||
// status is the latest status of the instance that we're aware of | ||
|
@@ -48,9 +49,7 @@ export interface WorkspaceInstance { | |
gitStatus?: WorkspaceInstanceRepoStatus; | ||
|
||
// configuration captures the per-instance configuration variance of a workspace | ||
// Beware: this field was added retroactively and not all instances have valid | ||
// values here. | ||
configuration?: WorkspaceInstanceConfiguration; | ||
configuration: WorkspaceInstanceConfiguration; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked the DB: We have 0 instances where this field is NULL or "". |
||
|
||
// instance is hard-deleted on the database and about to be collected by periodic deleter | ||
readonly deleted?: boolean; | ||
|
@@ -280,6 +279,11 @@ export interface ConfigurationIdeConfig { | |
ide?: string; | ||
} | ||
|
||
export interface IdeSetup { | ||
tasks?: TaskConfig[]; | ||
envvars?: EnvVar[]; | ||
} | ||
|
||
// WorkspaceInstanceConfiguration contains all per-instance configuration | ||
export interface WorkspaceInstanceConfiguration { | ||
// theiaVersion is the version of Theia this workspace instance uses | ||
|
@@ -296,18 +300,21 @@ export interface WorkspaceInstanceConfiguration { | |
// including ide-desktop, desktop-plugin and so on | ||
ideImageLayers?: string[]; | ||
|
||
// desktopIdeImage is the ref of the desktop IDE image this instance uses. | ||
// @deprected: replaced with the ideImageLayers field | ||
desktopIdeImage?: string; | ||
|
||
// desktopIdePluginImage is the ref of the desktop IDE plugin image this instance uses. | ||
// @deprected: replaced with the desktopIdePluginImage field | ||
desktopIdePluginImage?: string; | ||
|
||
// supervisorImage is the ref of the supervisor image this instance uses. | ||
supervisorImage?: string; | ||
|
||
// ideSetup contains all piece that are necessary to get the IDE running | ||
// TODO(gpl) ideally also contains the fields above: ideImage, ideImageLayers and supervisorImage | ||
ideSetup?: IdeSetup; | ||
|
||
// ideConfig contains user-controlled IDE configuration | ||
ideConfig?: ConfigurationIdeConfig; | ||
|
||
// The region the user passed as a preference for this workspace | ||
regionPreference?: WorkspaceRegion; | ||
|
||
// Whether this instance is started from a backup | ||
fromBackup?: boolean; | ||
} | ||
|
||
/** | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the DB: We have 0 instances where this field is
NULL
or""
.