@gitpod/gitpod-protocol 0.1.5-vn-jetbrains-backend-plugin-223.7 → 0.1.5-wk-inte-test-20230117000019.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/gitpod-schema.json +16 -0
- package/lib/accounting-protocol.d.ts +1 -1
- package/lib/accounting-protocol.js +1 -1
- package/lib/admin-protocol.d.ts +11 -2
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +1 -1
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +1 -1
- package/lib/analytics.js +1 -1
- package/lib/attribution.d.ts +5 -1
- package/lib/attribution.d.ts.map +1 -1
- package/lib/attribution.js +15 -1
- package/lib/attribution.js.map +1 -1
- package/lib/auth.d.ts +1 -1
- package/lib/auth.js +1 -1
- package/lib/billing-mode.d.ts +5 -1
- package/lib/billing-mode.d.ts.map +1 -1
- package/lib/billing-mode.js +1 -1
- package/lib/blocked-repositories-protocol.d.ts +1 -1
- package/lib/blocked-repositories-protocol.js +1 -1
- package/lib/context-url.d.ts +1 -2
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +1 -3
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts +1 -3
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +1 -29
- package/lib/context-url.spec.js.map +1 -1
- package/lib/encryption/container-module.d.ts +1 -1
- package/lib/encryption/container-module.js +1 -1
- package/lib/encryption/encryption-engine.d.ts +1 -1
- package/lib/encryption/encryption-engine.js +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts +1 -1
- package/lib/encryption/encryption-engine.spec.js +1 -1
- package/lib/encryption/encryption-service.d.ts +1 -1
- package/lib/encryption/encryption-service.js +1 -1
- package/lib/encryption/key-provider.d.ts +1 -1
- package/lib/encryption/key-provider.js +1 -1
- package/lib/env.d.ts +1 -1
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +1 -1
- package/lib/env.js.map +1 -1
- package/lib/experiments/always-default.d.ts +1 -1
- package/lib/experiments/configcat-server.d.ts +1 -1
- package/lib/experiments/configcat-server.d.ts.map +1 -1
- package/lib/experiments/configcat-server.js +2 -1
- package/lib/experiments/configcat-server.js.map +1 -1
- package/lib/experiments/configcat.d.ts +1 -3
- package/lib/experiments/configcat.d.ts.map +1 -1
- package/lib/experiments/configcat.js +2 -8
- package/lib/experiments/configcat.js.map +1 -1
- package/lib/experiments/types.d.ts +1 -3
- package/lib/experiments/types.d.ts.map +1 -1
- package/lib/experiments/types.js +1 -1
- package/lib/experiments/types.js.map +1 -1
- package/lib/frontend-dashboard-service.d.ts +85 -0
- package/lib/frontend-dashboard-service.d.ts.map +1 -0
- package/lib/frontend-dashboard-service.js +32 -0
- package/lib/frontend-dashboard-service.js.map +1 -0
- package/lib/gitpod-file-parser.d.ts +1 -1
- package/lib/gitpod-file-parser.js +1 -1
- package/lib/gitpod-file-parser.spec.d.ts +1 -1
- package/lib/gitpod-file-parser.spec.js +1 -1
- package/lib/gitpod-service.d.ts +17 -22
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +1 -1
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +1 -1
- package/lib/headless-workspace-log.js +1 -1
- package/lib/ide-frontend-service.d.ts +1 -1
- package/lib/ide-frontend-service.js +1 -1
- package/lib/ide-protocol.d.ts +15 -2
- package/lib/ide-protocol.d.ts.map +1 -1
- package/lib/ide-protocol.js +11 -1
- package/lib/ide-protocol.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/installation-admin-protocol.d.ts +1 -1
- package/lib/installation-admin-protocol.js +1 -1
- package/lib/license-protocol.d.ts +1 -1
- package/lib/license-protocol.js +1 -1
- package/lib/messaging/browser/window-connection.d.ts +1 -1
- package/lib/messaging/browser/window-connection.js +1 -1
- package/lib/messaging/client-call-metrics.d.ts +3 -1
- package/lib/messaging/client-call-metrics.d.ts.map +1 -1
- package/lib/messaging/client-call-metrics.js +14 -1
- package/lib/messaging/client-call-metrics.js.map +1 -1
- package/lib/messaging/error.d.ts +3 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +5 -1
- package/lib/messaging/error.js.map +1 -1
- package/lib/oss-allowlist.d.ts +1 -1
- package/lib/oss-allowlist.js +1 -1
- package/lib/payment-protocol.d.ts +1 -1
- package/lib/payment-protocol.js +1 -1
- package/lib/permission.d.ts +1 -1
- package/lib/permission.js +1 -1
- package/lib/plans.d.ts +1 -1
- package/lib/plans.js +3 -3
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +22 -37
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +11 -19
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.spec.d.ts +1 -1
- package/lib/protocol.spec.js +1 -1
- package/lib/snapshot-url.d.ts +1 -1
- package/lib/snapshot-url.js +1 -1
- package/lib/snapshot-url.spec.d.ts +1 -1
- package/lib/snapshot-url.spec.js +1 -1
- package/lib/team-subscription-protocol.d.ts +1 -1
- package/lib/team-subscription-protocol.js +1 -1
- package/lib/teams-projects-protocol.d.ts +9 -3
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +9 -2
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/typings/globals.d.ts +2 -1
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/typings/globals.js +1 -1
- package/lib/usage.d.ts +13 -1
- package/lib/usage.d.ts.map +1 -1
- package/lib/usage.js +8 -2
- package/lib/usage.js.map +1 -1
- package/lib/util/analytics.d.ts +1 -1
- package/lib/util/analytics.js +1 -1
- package/lib/util/async-iterator.d.ts +1 -1
- package/lib/util/async-iterator.js +1 -1
- package/lib/util/cancelable.d.ts +1 -1
- package/lib/util/cancelable.js +1 -1
- package/lib/util/date-time.d.ts +1 -1
- package/lib/util/date-time.js +1 -1
- package/lib/util/debug-app.d.ts +1 -1
- package/lib/util/debug-app.js +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 +1 -1
- package/lib/util/garbage-collected-cache.d.ts +1 -1
- package/lib/util/garbage-collected-cache.js +1 -1
- package/lib/util/generate-workspace-id.d.ts +1 -1
- package/lib/util/generate-workspace-id.js +1 -1
- package/lib/util/generate-workspace-id.spec.d.ts +1 -1
- package/lib/util/generate-workspace-id.spec.js +1 -1
- package/lib/util/gitpod-cookie.d.ts +1 -1
- package/lib/util/gitpod-cookie.js +1 -1
- package/lib/util/gitpod-host-url.d.ts +9 -3
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +22 -8
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +1 -1
- package/lib/util/gitpod-host-url.spec.js +1 -1
- package/lib/util/grpc.d.ts +2 -1
- package/lib/util/grpc.d.ts.map +1 -1
- package/lib/util/grpc.js +1 -1
- package/lib/util/grpc.js.map +1 -1
- package/lib/util/jaeger-client-types.d.ts +1 -1
- package/lib/util/jaeger-client-types.js +1 -1
- package/lib/util/logging.d.ts +1 -1
- package/lib/util/logging.js +1 -1
- package/lib/util/logging.spec.d.ts +1 -1
- package/lib/util/logging.spec.js +1 -1
- package/lib/util/make-link.d.ts +1 -1
- package/lib/util/make-link.js +1 -1
- package/lib/util/nice-grpc.d.ts +9 -0
- package/lib/util/nice-grpc.d.ts.map +1 -0
- package/lib/util/nice-grpc.js +121 -0
- package/lib/util/nice-grpc.js.map +1 -0
- package/lib/util/parse-workspace-id.d.ts +1 -1
- package/lib/util/parse-workspace-id.js +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +1 -1
- package/lib/util/parse-workspace-id.spec.js +1 -1
- package/lib/util/queue.d.ts +1 -1
- package/lib/util/queue.js +1 -1
- package/lib/util/queue.spec.d.ts +1 -1
- package/lib/util/queue.spec.js +1 -1
- package/lib/util/repeat.d.ts +1 -1
- package/lib/util/repeat.js +1 -1
- package/lib/util/semaphore.d.ts +1 -1
- package/lib/util/semaphore.js +1 -1
- package/lib/util/skip-if.d.ts +1 -1
- package/lib/util/skip-if.js +1 -1
- package/lib/util/timeutil.d.ts +1 -1
- package/lib/util/timeutil.js +1 -1
- package/lib/util/timeutil.spec.d.ts +1 -1
- package/lib/util/timeutil.spec.js +1 -1
- package/lib/util/tracing.d.ts +1 -1
- package/lib/util/tracing.js +1 -1
- package/lib/util/tracing.spec.d.ts +1 -1
- package/lib/util/tracing.spec.js +1 -1
- package/lib/util/workspace-port-authentication.d.ts +1 -1
- package/lib/util/workspace-port-authentication.js +1 -1
- package/lib/webhook-event.d.ts +1 -1
- package/lib/webhook-event.js +1 -1
- package/lib/workspace-class.d.ts +2 -2
- package/lib/workspace-class.d.ts.map +1 -1
- package/lib/workspace-class.js +1 -1
- package/lib/workspace-cluster.d.ts +7 -6
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +1 -1
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +2 -1
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/workspace-instance.js +1 -1
- package/lib/wsready.d.ts +10 -4
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +3 -1
- package/lib/wsready.js.map +1 -1
- package/package.json +3 -1
- package/pkg-yarn.lock +3 -1
- package/provenance-bundle.jsonl +1 -1
- package/src/accounting-protocol.ts +1 -1
- package/src/admin-protocol.ts +15 -2
- package/src/analytics.ts +1 -1
- package/src/attribution.ts +16 -1
- package/src/auth.ts +1 -1
- package/src/billing-mode.ts +8 -1
- package/src/blocked-repositories-protocol.ts +1 -1
- package/src/context-url.spec.ts +1 -19
- package/src/context-url.ts +1 -3
- 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 +2 -3
- package/src/experiments/always-default.ts +1 -1
- package/src/experiments/configcat-server.ts +2 -1
- package/src/experiments/configcat.ts +1 -7
- package/src/experiments/types.ts +1 -5
- package/src/frontend-dashboard-service.ts +109 -0
- package/src/gitpod-file-parser.spec.ts +1 -1
- package/src/gitpod-file-parser.ts +1 -1
- package/src/gitpod-service.ts +20 -26
- package/src/headless-workspace-log.ts +1 -1
- package/src/ide-frontend-service.ts +1 -1
- package/src/ide-protocol.ts +20 -2
- package/src/index.ts +1 -1
- package/src/installation-admin-protocol.ts +1 -1
- package/src/license-protocol.ts +1 -1
- package/src/messaging/browser/window-connection.ts +1 -1
- package/src/messaging/client-call-metrics.ts +18 -1
- package/src/messaging/error.ts +7 -1
- package/src/oss-allowlist.ts +1 -1
- package/src/payment-protocol.ts +1 -1
- package/src/permission.ts +1 -1
- package/src/plans.ts +3 -3
- package/src/protocol.spec.ts +1 -1
- package/src/protocol.ts +30 -49
- package/src/snapshot-url.spec.ts +1 -1
- package/src/snapshot-url.ts +1 -1
- package/src/team-subscription-protocol.ts +1 -1
- package/src/teams-projects-protocol.ts +15 -4
- package/src/typings/globals.ts +3 -1
- package/src/usage.ts +15 -1
- package/src/util/analytics.ts +1 -1
- 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/debug-app.ts +1 -1
- package/src/util/deep-partial.ts +1 -1
- package/src/util/deferred.ts +1 -1
- package/src/util/garbage-collected-cache.ts +1 -1
- package/src/util/generate-workspace-id.spec.ts +1 -1
- package/src/util/generate-workspace-id.ts +1 -1
- package/src/util/gitpod-cookie.ts +1 -1
- package/src/util/gitpod-host-url.spec.ts +1 -1
- package/src/util/gitpod-host-url.ts +27 -8
- package/src/util/grpc.ts +4 -1
- package/src/util/jaeger-client-types.ts +1 -1
- package/src/util/logging.spec.ts +1 -1
- package/src/util/logging.ts +1 -1
- package/src/util/make-link.ts +1 -1
- package/src/util/nice-grpc.ts +96 -0
- package/src/util/parse-workspace-id.spec.ts +1 -1
- package/src/util/parse-workspace-id.ts +1 -1
- package/src/util/queue.spec.ts +1 -1
- package/src/util/queue.ts +1 -1
- package/src/util/repeat.ts +1 -1
- package/src/util/semaphore.ts +1 -1
- package/src/util/skip-if.ts +1 -1
- package/src/util/timeutil.spec.ts +1 -1
- package/src/util/timeutil.ts +1 -1
- package/src/util/tracing.spec.ts +1 -1
- package/src/util/tracing.ts +1 -1
- package/src/util/workspace-port-authentication.ts +1 -1
- package/src/webhook-event.ts +1 -1
- package/src/workspace-class.ts +2 -2
- package/src/workspace-cluster.ts +12 -7
- package/src/workspace-instance.ts +7 -1
- package/src/wsready.ts +12 -6
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 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 { isAbortError } from "abort-controller-x";
|
|
8
|
+
import {
|
|
9
|
+
CallOptions,
|
|
10
|
+
ClientError,
|
|
11
|
+
ClientMiddleware,
|
|
12
|
+
ClientMiddlewareCall,
|
|
13
|
+
Status,
|
|
14
|
+
MethodDescriptor,
|
|
15
|
+
} from "nice-grpc-common";
|
|
16
|
+
import { GrpcMethodType, IClientCallMetrics } from "./grpc";
|
|
17
|
+
|
|
18
|
+
function getLabels(method: MethodDescriptor) {
|
|
19
|
+
const callType = method.requestStream
|
|
20
|
+
? method.responseStream
|
|
21
|
+
? "bidi_stream"
|
|
22
|
+
: "client_stream"
|
|
23
|
+
: method.responseStream
|
|
24
|
+
? "server_stream"
|
|
25
|
+
: "unary";
|
|
26
|
+
const { path } = method;
|
|
27
|
+
const [serviceName, methodName] = path.split("/").slice(1);
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
type: callType as GrpcMethodType,
|
|
31
|
+
service: serviceName,
|
|
32
|
+
method: methodName,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function* incrementStreamMessagesCounter<T>(iterable: AsyncIterable<T>, callback: () => void): AsyncIterable<T> {
|
|
37
|
+
for await (const item of iterable) {
|
|
38
|
+
callback();
|
|
39
|
+
yield item;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function prometheusClientMiddleware(metrics: IClientCallMetrics): ClientMiddleware {
|
|
44
|
+
return async function* prometheusClientMiddlewareGenerator<Request, Response>(
|
|
45
|
+
call: ClientMiddlewareCall<Request, Response>,
|
|
46
|
+
options: CallOptions,
|
|
47
|
+
): AsyncGenerator<Response, Response | void, undefined> {
|
|
48
|
+
const labels = getLabels(call.method);
|
|
49
|
+
|
|
50
|
+
metrics.started(labels);
|
|
51
|
+
|
|
52
|
+
const stopTimer = metrics.startHandleTimer(labels);
|
|
53
|
+
|
|
54
|
+
let settled = false;
|
|
55
|
+
let status: Status = Status.OK;
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
let request;
|
|
59
|
+
|
|
60
|
+
if (!call.requestStream) {
|
|
61
|
+
request = call.request;
|
|
62
|
+
} else {
|
|
63
|
+
request = incrementStreamMessagesCounter(call.request, metrics.sent.bind(metrics, labels));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (!call.responseStream) {
|
|
67
|
+
const response = yield* call.next(request, options);
|
|
68
|
+
settled = true;
|
|
69
|
+
return response;
|
|
70
|
+
} else {
|
|
71
|
+
yield* incrementStreamMessagesCounter(
|
|
72
|
+
call.next(request, options),
|
|
73
|
+
metrics.received.bind(metrics, labels),
|
|
74
|
+
);
|
|
75
|
+
settled = true;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
} catch (err) {
|
|
79
|
+
settled = true;
|
|
80
|
+
if (err instanceof ClientError) {
|
|
81
|
+
status = err.code;
|
|
82
|
+
} else if (isAbortError(err)) {
|
|
83
|
+
status = Status.CANCELLED;
|
|
84
|
+
} else {
|
|
85
|
+
status = Status.UNKNOWN;
|
|
86
|
+
}
|
|
87
|
+
throw err;
|
|
88
|
+
} finally {
|
|
89
|
+
if (!settled) {
|
|
90
|
+
status = Status.CANCELLED;
|
|
91
|
+
}
|
|
92
|
+
stopTimer({ grpc_code: Status[status] });
|
|
93
|
+
metrics.handled({ ...labels, code: Status[status] });
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as chai from "chai";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const REGEX_WORKSPACE_ID = /[0-9a-z]{2,16}-[0-9a-z]{2,16}-[0-9a-z]{8,11}/;
|
package/src/util/queue.spec.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { suite, test, slow, timeout } from "mocha-typescript";
|
package/src/util/queue.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { Deferred } from "./deferred";
|
package/src/util/repeat.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { Disposable } from "..";
|
package/src/util/semaphore.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export class Semaphore {
|
package/src/util/skip-if.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as chai from "chai";
|
package/src/util/timeutil.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
package/src/util/tracing.spec.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { suite, test } from "mocha-typescript";
|
package/src/util/tracing.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as opentracing from "opentracing";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
package/src/webhook-event.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export interface WebhookEvent {
|
package/src/workspace-class.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export interface SupportedWorkspaceClass {
|
|
@@ -10,5 +10,5 @@ export interface SupportedWorkspaceClass {
|
|
|
10
10
|
displayName: string;
|
|
11
11
|
description: string;
|
|
12
12
|
powerups: number;
|
|
13
|
-
|
|
13
|
+
isDefault: boolean;
|
|
14
14
|
}
|
package/src/workspace-cluster.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fs from "fs";
|
|
@@ -15,6 +15,10 @@ export interface WorkspaceCluster {
|
|
|
15
15
|
// Must be identical to the installationShortname of the cluster it represents!
|
|
16
16
|
name: string;
|
|
17
17
|
|
|
18
|
+
// The name of the application cluster to which this cluster should be registered.
|
|
19
|
+
// The name can be at most 60 characters.
|
|
20
|
+
applicationCluster: string;
|
|
21
|
+
|
|
18
22
|
// URL of the cluster's ws-manager API
|
|
19
23
|
url: string;
|
|
20
24
|
|
|
@@ -86,20 +90,21 @@ export interface WorkspaceClusterDB {
|
|
|
86
90
|
* Deletes the cluster identified by this name, if any.
|
|
87
91
|
* @param name
|
|
88
92
|
*/
|
|
89
|
-
deleteByName(name: string): Promise<void>;
|
|
93
|
+
deleteByName(name: string, applicationCluster: string): Promise<void>;
|
|
90
94
|
|
|
91
95
|
/**
|
|
92
96
|
* Finds a WorkspaceCluster with the given name. If there is none, `undefined` is returned.
|
|
93
97
|
* @param name
|
|
94
98
|
*/
|
|
95
|
-
findByName(name: string): Promise<WorkspaceCluster | undefined>;
|
|
99
|
+
findByName(name: string, applicationCluster: string): Promise<WorkspaceCluster | undefined>;
|
|
96
100
|
|
|
97
101
|
/**
|
|
98
102
|
* Lists all WorkspaceClusterWoTls for which the given predicate is true (does not return TLS for size/speed concerns)
|
|
99
103
|
* @param predicate
|
|
100
104
|
*/
|
|
101
|
-
findFiltered(predicate:
|
|
102
|
-
}
|
|
103
|
-
export interface WorkspaceClusterFilter extends Pick<WorkspaceCluster, "state" | "govern" | "url"> {
|
|
104
|
-
minScore: number;
|
|
105
|
+
findFiltered(predicate: WorkspaceClusterFilter): Promise<WorkspaceClusterWoTLS[]>;
|
|
105
106
|
}
|
|
107
|
+
|
|
108
|
+
export type WorkspaceClusterFilter = Pick<WorkspaceCluster, "applicationCluster"> &
|
|
109
|
+
DeepPartial<Pick<WorkspaceCluster, "name" | "state" | "govern" | "url">> &
|
|
110
|
+
Partial<{ minScore: number }>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { NamedWorkspaceFeatureFlag } from "./protocol";
|
|
@@ -243,10 +243,16 @@ export interface WorkspaceInstanceConfiguration {
|
|
|
243
243
|
// ideImage is the ref of the IDE image this instance uses.
|
|
244
244
|
ideImage: string;
|
|
245
245
|
|
|
246
|
+
// ideImageLayers are images needed for the ide to run,
|
|
247
|
+
// including ide-desktop, desktop-plugin and so on
|
|
248
|
+
ideImageLayers?: string[];
|
|
249
|
+
|
|
246
250
|
// desktopIdeImage is the ref of the desktop IDE image this instance uses.
|
|
251
|
+
// @deprected: replaced with the ideImageLayers field
|
|
247
252
|
desktopIdeImage?: string;
|
|
248
253
|
|
|
249
254
|
// desktopIdePluginImage is the ref of the desktop IDE plugin image this instance uses.
|
|
255
|
+
// @deprected: replaced with the desktopIdePluginImage field
|
|
250
256
|
desktopIdePluginImage?: string;
|
|
251
257
|
|
|
252
258
|
// supervisorImage is the ref of the supervisor image this instance uses.
|
package/src/wsready.ts
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// generated using github.com/32leaves/bel on 2022-
|
|
7
|
+
// generated using github.com/32leaves/bel on 2022-11-25 13:39:08.995865257 +0000 UTC m=+0.015035221
|
|
8
8
|
// DO NOT MODIFY
|
|
9
9
|
|
|
10
|
-
export interface WorkspaceReadyMessage {
|
|
11
|
-
source: WorkspaceInitSource;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
export enum WorkspaceInitSource {
|
|
15
11
|
WorkspaceInitFromBackup = "from-backup",
|
|
16
12
|
WorkspaceInitFromPrebuild = "from-prebuild",
|
|
17
13
|
WorkspaceInitFromOther = "from-other",
|
|
18
14
|
}
|
|
15
|
+
export interface WorkspaceReadyMessage {
|
|
16
|
+
source: WorkspaceInitSource;
|
|
17
|
+
metrics: InitializerMetric[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface InitializerMetric {
|
|
21
|
+
type: string;
|
|
22
|
+
duration: number;
|
|
23
|
+
size: number;
|
|
24
|
+
}
|