@gitpod/gitpod-protocol 0.1.5-test.9 → 0.1.5-tweak-workspaceconfig-origin-docs-fork.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/builtin-theia-plugins.json +28 -18
- package/data/gitpod-schema.json +17 -17
- package/lib/accounting-protocol.d.ts +155 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +109 -0
- package/lib/accounting-protocol.js.map +1 -0
- package/lib/admin-protocol.d.ts +22 -5
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +16 -1
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +45 -0
- package/lib/analytics.d.ts.map +1 -0
- package/lib/analytics.js +10 -0
- package/lib/analytics.js.map +1 -0
- package/lib/auth.d.ts +25 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +16 -0
- package/lib/auth.js.map +1 -0
- package/lib/context-url.d.ts +18 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +49 -0
- package/lib/context-url.js.map +1 -0
- package/lib/context-url.spec.d.ts +12 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +73 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/email-protocol.d.ts +2 -2
- package/lib/email-protocol.d.ts.map +1 -1
- package/lib/email-protocol.js +6 -5
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.d.ts +1 -1
- package/lib/encryption/container-module.js +7 -5
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts +1 -1
- package/lib/encryption/encryption-engine.js +21 -21
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts +2 -2
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +31 -37
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts +1 -1
- package/lib/encryption/encryption-service.js +31 -44
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts +2 -2
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +27 -31
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +2 -3
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +21 -21
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.d.ts +1 -1
- package/lib/gitpod-file-parser.js +27 -42
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.d.ts +1 -1
- package/lib/gitpod-file-parser.spec.js +117 -117
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +186 -34
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +239 -116
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +9 -12
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +5 -7
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +26 -0
- package/lib/ide-frontend-service.d.ts.map +1 -0
- package/lib/ide-frontend-service.js +8 -0
- package/lib/ide-frontend-service.js.map +1 -0
- package/lib/ide-protocol.d.ts +81 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/{util/without.js → ide-protocol.js} +2 -2
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +5 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +25 -12
- package/lib/index.js.map +1 -1
- package/lib/license-protocol.d.ts +1 -1
- package/lib/license-protocol.js +2 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +6 -4
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +188 -48
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +26 -0
- package/lib/messaging/browser/window-connection.d.ts.map +1 -0
- package/lib/messaging/browser/window-connection.js +68 -0
- package/lib/messaging/browser/window-connection.js.map +1 -0
- package/lib/messaging/client-call-metrics.d.ts +35 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +83 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/connection-error-handler.js +12 -23
- package/lib/messaging/connection-error-handler.js.map +1 -1
- package/lib/messaging/error.d.ts +6 -2
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +13 -4
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/handler.js +1 -0
- package/lib/messaging/handler.js.map +1 -1
- package/lib/messaging/node/connection.js +23 -22
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +2 -0
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +75 -169
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/payment-protocol.d.ts +18 -0
- package/lib/payment-protocol.d.ts.map +1 -0
- package/lib/payment-protocol.js +13 -0
- package/lib/payment-protocol.js.map +1 -0
- package/lib/permission.d.ts +14 -12
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +21 -19
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +210 -0
- package/lib/plans.d.ts.map +1 -0
- package/lib/plans.js +570 -0
- package/lib/plans.js.map +1 -0
- package/lib/protocol.d.ts +123 -30
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +121 -117
- package/lib/protocol.js.map +1 -1
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +3 -4
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.d.ts +73 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +63 -0
- package/lib/team-subscription-protocol.js.map +1 -0
- package/lib/teams-projects-protocol.d.ts +103 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +23 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/theia-plugins.d.ts +1 -1
- package/lib/theia-plugins.js +1 -1
- package/lib/typings/globals.d.ts +12 -0
- package/lib/typings/globals.d.ts.map +1 -0
- package/lib/typings/globals.js +7 -0
- package/lib/typings/globals.js.map +1 -0
- package/lib/util/analytics.d.ts +8 -0
- package/lib/util/analytics.d.ts.map +1 -0
- package/lib/util/analytics.js +79 -0
- package/lib/util/analytics.js.map +1 -0
- package/lib/util/async-iterator.d.ts +1 -1
- package/lib/util/async-iterator.js +57 -134
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.d.ts +1 -1
- package/lib/util/cancelable.js +19 -60
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.d.ts +1 -1
- package/lib/util/date-time.js +10 -9
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/deep-partial.d.ts +1 -1
- package/lib/util/deep-partial.js +1 -1
- package/lib/util/deferred.d.ts +1 -1
- package/lib/util/deferred.js +12 -13
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.d.ts +2 -2
- package/lib/util/disposable.d.ts.map +1 -1
- package/lib/util/disposable.js +27 -39
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +59 -74
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +1 -1
- package/lib/util/garbage-collected-cache.js +24 -47
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +4 -0
- package/lib/util/generate-workspace-id.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.js +470 -0
- package/lib/util/generate-workspace-id.js.map +1 -0
- package/lib/util/generate-workspace-id.spec.d.ts +7 -0
- package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.spec.js +63 -0
- package/lib/util/generate-workspace-id.spec.js.map +1 -0
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +44 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +8 -3
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +106 -76
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +16 -0
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -0
- package/lib/util/gitpod-host-url.spec.js +124 -0
- package/lib/util/gitpod-host-url.spec.js.map +1 -0
- package/lib/util/grpc.d.ts +15 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +18 -0
- package/lib/util/grpc.js.map +1 -0
- package/lib/util/logging.d.ts +57 -34
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +119 -110
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.d.ts +1 -1
- package/lib/util/make-link.js +4 -3
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/parse-workspace-id.d.ts +14 -4
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +39 -8
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +9 -1
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +129 -48
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.d.ts +1 -1
- package/lib/util/queue.js +18 -56
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.d.ts +1 -1
- package/lib/util/queue.spec.js +145 -287
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeater.d.ts +1 -1
- package/lib/util/repeater.js +37 -89
- package/lib/util/repeater.js.map +1 -1
- package/lib/util/safe-promise.d.ts +1 -1
- package/lib/util/safe-promise.js +11 -13
- package/lib/util/safe-promise.js.map +1 -1
- package/lib/util/semaphore.d.ts +1 -1
- package/lib/util/semaphore.js +17 -47
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts +1 -1
- package/lib/util/skip-if.js +8 -7
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +1 -1
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +30 -17
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +1 -1
- package/lib/util/timeutil.spec.js +23 -25
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +15 -2
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +86 -51
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/workspace-port-authentication.d.ts +1 -1
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +5 -3
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +74 -0
- package/lib/workspace-cluster.d.ts.map +1 -0
- package/lib/workspace-cluster.js +16 -0
- package/lib/workspace-cluster.js.map +1 -0
- package/lib/workspace-instance.d.ts +10 -4
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/workspace-instance.js +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.js +3 -2
- package/lib/wsready.js.map +1 -1
- package/package.json +32 -16
- package/pkg-yarn.lock +18 -9
- package/src/accounting-protocol.ts +229 -0
- package/src/admin-protocol.ts +41 -6
- package/src/analytics.ts +54 -0
- package/src/auth.ts +27 -0
- package/src/context-url.spec.ts +39 -0
- package/src/context-url.ts +51 -0
- package/src/email-protocol.ts +3 -4
- package/src/encryption/container-module.ts +1 -1
- package/src/encryption/encryption-engine.spec.ts +1 -1
- package/src/encryption/encryption-engine.ts +1 -1
- package/src/encryption/encryption-service.ts +1 -1
- package/src/encryption/key-provider.ts +1 -1
- package/src/env.ts +11 -11
- package/src/gitpod-file-parser.spec.ts +1 -1
- package/src/gitpod-file-parser.ts +1 -1
- package/src/gitpod-service.ts +386 -52
- package/src/headless-workspace-log.ts +8 -12
- package/src/ide-frontend-service.ts +28 -0
- package/src/ide-protocol.ts +92 -0
- package/src/index.ts +6 -2
- package/src/license-protocol.ts +1 -1
- package/src/messaging/browser/connection.ts +201 -23
- package/src/messaging/browser/window-connection.ts +72 -0
- package/src/messaging/client-call-metrics.ts +97 -0
- package/src/messaging/error.ts +16 -4
- package/src/messaging/handler.ts +12 -0
- package/src/messaging/node/connection.ts +2 -2
- package/src/messaging/proxy-factory.ts +16 -14
- package/src/payment-protocol.ts +20 -0
- package/src/permission.ts +9 -8
- package/src/plans.ts +632 -0
- package/src/protocol.ts +204 -61
- package/src/snapshot-url.spec.ts +25 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +113 -0
- package/src/teams-projects-protocol.ts +132 -0
- package/src/theia-plugins.ts +1 -1
- package/src/typings/globals.ts +12 -0
- package/src/util/analytics.ts +87 -0
- package/src/util/async-iterator.ts +1 -1
- package/src/util/cancelable.ts +1 -1
- package/src/util/date-time.ts +1 -1
- package/src/util/deep-partial.ts +1 -1
- package/src/util/deferred.ts +2 -2
- package/src/util/garbage-collected-cache.ts +3 -3
- package/src/util/generate-workspace-id.spec.ts +31 -0
- package/src/util/generate-workspace-id.ts +457 -0
- package/src/util/gitpod-cookie.ts +39 -0
- package/src/util/gitpod-host-url.spec.ts +49 -0
- package/src/util/gitpod-host-url.ts +58 -14
- package/src/util/grpc.ts +15 -0
- package/src/util/jaeger-client.d.ts +1 -1
- package/src/util/logging.ts +111 -39
- package/src/util/make-link.ts +1 -1
- package/src/util/parse-workspace-id.spec.ts +46 -5
- package/src/util/parse-workspace-id.ts +39 -8
- package/src/util/queue.spec.ts +2 -2
- package/src/util/queue.ts +1 -1
- package/src/util/repeater.ts +1 -1
- package/src/util/safe-promise.ts +1 -1
- package/src/util/semaphore.ts +3 -3
- package/src/util/skip-if.ts +2 -2
- package/src/util/timeutil.spec.ts +1 -1
- package/src/util/timeutil.ts +5 -5
- package/src/util/tracing.ts +66 -4
- package/src/util/workspace-port-authentication.ts +1 -1
- package/src/workspace-cluster.ts +96 -0
- package/src/workspace-instance.ts +38 -16
- package/src/wsready.ts +2 -2
- package/lib/util/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
+
* See License-AGPL.txt in the project root for license information.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
import { filePathTelepresenceAware } from './env';
|
|
9
|
+
import { DeepPartial } from "./util/deep-partial";
|
|
10
|
+
import { PermissionName } from './permission';
|
|
11
|
+
|
|
12
|
+
export interface WorkspaceCluster {
|
|
13
|
+
// Name of the workspace cluster.
|
|
14
|
+
// This is the string set in each
|
|
15
|
+
// Must be identical to the installationShortname of the cluster it represents!
|
|
16
|
+
name: string;
|
|
17
|
+
|
|
18
|
+
// URL of the cluster's ws-manager API
|
|
19
|
+
url: string;
|
|
20
|
+
|
|
21
|
+
// TLS contains the keys and certificates necessary to use mTLS between server and clients
|
|
22
|
+
tls?: TLSConfig;
|
|
23
|
+
|
|
24
|
+
// Current state of the cluster
|
|
25
|
+
state: WorkspaceClusterState;
|
|
26
|
+
|
|
27
|
+
// Maximum value score can reach for this cluster
|
|
28
|
+
maxScore: number;
|
|
29
|
+
|
|
30
|
+
// Score used for cluster selection when starting workspace instances
|
|
31
|
+
score: number;
|
|
32
|
+
|
|
33
|
+
// True if this bridge should control this cluster
|
|
34
|
+
govern: boolean;
|
|
35
|
+
|
|
36
|
+
// An optional set of constraints that limit who can start workspaces on the cluster
|
|
37
|
+
admissionConstraints?: AdmissionConstraint[];
|
|
38
|
+
|
|
39
|
+
// An optional set of admission preferences that guide cluster selection
|
|
40
|
+
admissionPreferences?: AdmissionPreference[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type WorkspaceClusterState = "available" | "cordoned" | "draining";
|
|
44
|
+
export interface TLSConfig {
|
|
45
|
+
// the CA shared between client and server (base64 encoded)
|
|
46
|
+
ca: string;
|
|
47
|
+
// the private key (base64 encoded)
|
|
48
|
+
key: string;
|
|
49
|
+
// the certificate signed with the shared CA (base64 encoded)
|
|
50
|
+
crt: string;
|
|
51
|
+
}
|
|
52
|
+
export namespace TLSConfig {
|
|
53
|
+
export const loadFromBase64File = (path: string): string => fs.readFileSync(filePathTelepresenceAware(path)).toString("base64");
|
|
54
|
+
}
|
|
55
|
+
export type WorkspaceClusterWoTLS = Omit<WorkspaceCluster, "tls">;
|
|
56
|
+
export type WorkspaceManagerConnectionInfo = Pick<WorkspaceCluster, "name" | "url" | "tls">;
|
|
57
|
+
|
|
58
|
+
export type AdmissionConstraint = AdmissionConstraintFeaturePreview | AdmissionConstraintHasRole | AdmissionConstraintHasUserLevel;
|
|
59
|
+
export type AdmissionConstraintFeaturePreview = { type: "has-feature-preview" };
|
|
60
|
+
export type AdmissionConstraintHasRole = { type: "has-permission", permission: PermissionName };
|
|
61
|
+
export type AdmissionConstraintHasUserLevel = { type: "has-user-level", level: string };
|
|
62
|
+
|
|
63
|
+
export type AdmissionPreference = AdmissionPreferenceUserLevel;
|
|
64
|
+
export type AdmissionPreferenceUserLevel = { type: 'user-level', level: string };
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
export const WorkspaceClusterDB = Symbol("WorkspaceClusterDB");
|
|
68
|
+
export interface WorkspaceClusterDB {
|
|
69
|
+
/**
|
|
70
|
+
* Stores the given WorkspaceCluster to the cluster-local DB in a consistent manner.
|
|
71
|
+
* If there already is an entry with the same name it's merged and updated with the given state.
|
|
72
|
+
* @param cluster
|
|
73
|
+
*/
|
|
74
|
+
save(cluster: WorkspaceCluster): Promise<void>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Deletes the cluster identified by this name, if any.
|
|
78
|
+
* @param name
|
|
79
|
+
*/
|
|
80
|
+
deleteByName(name: string): Promise<void>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Finds a WorkspaceCluster with the given name. If there is none, `undefined` is returned.
|
|
84
|
+
* @param name
|
|
85
|
+
*/
|
|
86
|
+
findByName(name: string): Promise<WorkspaceCluster | undefined>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Lists all WorkspaceClusterWoTls for which the given predicate is true (does not return TLS for size/speed concerns)
|
|
90
|
+
* @param predicate
|
|
91
|
+
*/
|
|
92
|
+
findFiltered(predicate: DeepPartial<WorkspaceClusterFilter>): Promise<WorkspaceClusterWoTLS[]>;
|
|
93
|
+
}
|
|
94
|
+
export interface WorkspaceClusterFilter extends Pick<WorkspaceCluster, "state" | "govern" | "url"> {
|
|
95
|
+
minScore: number;
|
|
96
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2020
|
|
2
|
+
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
@@ -23,16 +23,22 @@ export interface WorkspaceInstance {
|
|
|
23
23
|
// The time an instance has switched phase to 'Running'
|
|
24
24
|
startedTime?: string;
|
|
25
25
|
|
|
26
|
+
// The time an instance has switched phase to 'Stopping' */
|
|
27
|
+
stoppingTime?: string;
|
|
28
|
+
|
|
26
29
|
// The time an instance has switched phase to 'Stopped' */
|
|
27
30
|
stoppedTime?: string;
|
|
28
31
|
|
|
29
32
|
// ideUrl is the URL at which the workspace is available on the internet
|
|
33
|
+
// Note: this is nitially empty, filled during starting process!
|
|
30
34
|
ideUrl: string;
|
|
31
35
|
|
|
32
36
|
// region is the name of the workspace cluster this instance runs in
|
|
37
|
+
// Note: this is nitially empty, filled during starting process!
|
|
33
38
|
region: string;
|
|
34
39
|
|
|
35
40
|
// workspaceImage is the name of the Docker image this instance runs
|
|
41
|
+
// Note: this is nitially empty, filled during starting process!
|
|
36
42
|
workspaceImage: string;
|
|
37
43
|
|
|
38
44
|
// status is the latest status of the instance that we're aware of
|
|
@@ -70,6 +76,12 @@ export interface WorkspaceInstanceStatus {
|
|
|
70
76
|
// nodeName is the name of the node the instance was scheduled onto
|
|
71
77
|
nodeName?: string;
|
|
72
78
|
|
|
79
|
+
// podName is the name of the pod of this instance
|
|
80
|
+
podName?: string;
|
|
81
|
+
|
|
82
|
+
// nodeIp is the IP of the node the workspace is running on
|
|
83
|
+
nodeIp?: string;
|
|
84
|
+
|
|
73
85
|
// ownerToken is the token one needs to access the workspace. Its presence is checked by ws-proxy.
|
|
74
86
|
ownerToken?: string;
|
|
75
87
|
}
|
|
@@ -77,7 +89,7 @@ export interface WorkspaceInstanceStatus {
|
|
|
77
89
|
// WorkspaceInstancePhase describes a high-level state of a workspace instance
|
|
78
90
|
export type WorkspaceInstancePhase =
|
|
79
91
|
// unknown indicates an issue within the system in that it cannot determine the actual phase of
|
|
80
|
-
|
|
92
|
+
// a workspace. This phase is usually accompanied by an error.
|
|
81
93
|
"unknown" |
|
|
82
94
|
|
|
83
95
|
// Preparing means that we haven't actually started the workspace instance just yet, but rather
|
|
@@ -85,21 +97,21 @@ export type WorkspaceInstancePhase =
|
|
|
85
97
|
"preparing" |
|
|
86
98
|
|
|
87
99
|
// Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
|
|
88
|
-
|
|
89
|
-
|
|
100
|
+
// some space within the cluster. If for example the cluster needs to scale up to accomodate the
|
|
101
|
+
// workspace, the workspace will be in Pending state until that happened.
|
|
90
102
|
"pending" |
|
|
91
103
|
|
|
92
104
|
// Creating means the workspace is currently being created. Thati includes downloading the images required
|
|
93
|
-
|
|
94
|
-
|
|
105
|
+
// to run the workspace over the network. The time spent in this phase varies widely and depends on the current
|
|
106
|
+
// network speed, image size and cache states.
|
|
95
107
|
"creating" |
|
|
96
108
|
|
|
97
109
|
// Initializing is the phase in which the workspace is executing the appropriate workspace initializer (e.g. Git
|
|
98
|
-
|
|
110
|
+
// clone or backup download). After this phase one can expect the workspace to either be Running or Failed.
|
|
99
111
|
"initializing" |
|
|
100
112
|
|
|
101
113
|
// Running means the workspace is able to actively perform work, either by serving a user through Theia,
|
|
102
|
-
|
|
114
|
+
// or as a headless workspace.
|
|
103
115
|
"running" |
|
|
104
116
|
|
|
105
117
|
// Interrupted is an exceptional state where the container should be running but is temporarily unavailable.
|
|
@@ -122,9 +134,6 @@ export interface WorkspaceInstanceConditions {
|
|
|
122
134
|
// PullingImages marks if the workspace is currently pulling its images. This condition can only be set during PhaseCreating
|
|
123
135
|
pullingImages?: boolean
|
|
124
136
|
|
|
125
|
-
// ServiceExists denotes if the workspace theia-/ports- services exist. This condition will be true if either of the two services exist.
|
|
126
|
-
serviceExists?: boolean
|
|
127
|
-
|
|
128
137
|
// deployed marks that a workspace instance was sent/deployed at a workspace manager
|
|
129
138
|
deployed?: boolean;
|
|
130
139
|
|
|
@@ -133,6 +142,12 @@ export interface WorkspaceInstanceConditions {
|
|
|
133
142
|
|
|
134
143
|
// ISO8601 timestamp when the first user activity was registered in the frontend. Only set if the workspace is running.
|
|
135
144
|
firstUserActivity?: string;
|
|
145
|
+
|
|
146
|
+
// headless_task_failed indicates that a headless workspace task failed
|
|
147
|
+
headlessTaskFailed?: string;
|
|
148
|
+
|
|
149
|
+
// stopped_by_request is true if the workspace was stopped using a StopWorkspace call
|
|
150
|
+
stoppedByRequest?: boolean;
|
|
136
151
|
}
|
|
137
152
|
|
|
138
153
|
// AdmissionLevel describes who can access a workspace instance and its ports.
|
|
@@ -146,9 +161,6 @@ export interface WorkspaceInstancePort {
|
|
|
146
161
|
// The outward-facing port number
|
|
147
162
|
port: number;
|
|
148
163
|
|
|
149
|
-
// An optional inward-facing port number. If not present we'll use port.
|
|
150
|
-
targetPort?: number;
|
|
151
|
-
|
|
152
164
|
// The visiblity of this port. Optional for backwards compatibility.
|
|
153
165
|
visibility?: PortVisibility;
|
|
154
166
|
|
|
@@ -186,8 +198,18 @@ export interface WorkspaceInstanceRepoStatus {
|
|
|
186
198
|
// WorkspaceInstanceConfiguration contains all per-instance configuration
|
|
187
199
|
export interface WorkspaceInstanceConfiguration {
|
|
188
200
|
// theiaVersion is the version of Theia this workspace instance uses
|
|
189
|
-
|
|
201
|
+
// @deprected: replaced with the ideImage field
|
|
202
|
+
theiaVersion?: string;
|
|
190
203
|
|
|
191
204
|
// feature flags are the lowercase feature-flag names as passed to ws-manager
|
|
192
205
|
featureFlags?: NamedWorkspaceFeatureFlag[];
|
|
193
|
-
|
|
206
|
+
|
|
207
|
+
// ideImage is the ref of the IDE image this instance uses.
|
|
208
|
+
ideImage: string;
|
|
209
|
+
|
|
210
|
+
// desktopIdeImage is the ref of the desktop IDE image this instance uses.
|
|
211
|
+
desktopIdeImage?: string
|
|
212
|
+
|
|
213
|
+
// supervisorImage is the ref of the supervisor image this instance uses.
|
|
214
|
+
supervisorImage?: string;
|
|
215
|
+
}
|
package/src/wsready.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// generated using github.com/32leaves/bel on
|
|
7
|
+
// generated using github.com/32leaves/bel on 2021-11-04 12:16:53.917570766 +0000 UTC m=+0.006002884
|
|
8
8
|
// DO NOT MODIFY
|
|
9
9
|
|
|
10
10
|
export enum WorkspaceInitSource {
|
package/lib/util/without.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 TypeFox GmbH. All rights reserved.
|
|
3
|
-
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License-AGPL.txt in the project root for license information.
|
|
5
|
-
*/
|
|
6
|
-
export declare type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
7
|
-
//# sourceMappingURL=without.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"without.d.ts","sourceRoot":"","sources":["../../src/util/without.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,oBAAY,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
package/lib/util/without.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"without.js","sourceRoot":"","sources":["../../src/util/without.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|