@gitpod/gitpod-protocol 0.1.5-mp-wsi-status-version.0 → 0.1.5-mp-usage-list-workspaces.12
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 +66 -2
- package/lib/accounting-protocol.d.ts +7 -0
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +8 -1
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/gitpod-service.d.ts +9 -1
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +8 -7
- package/lib/gitpod-service.js.map +1 -1
- package/lib/license-protocol.d.ts +7 -0
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/error.d.ts +1 -0
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +2 -0
- package/lib/messaging/error.js.map +1 -1
- package/lib/protocol.d.ts +27 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +82 -8
- package/lib/protocol.js.map +1 -1
- package/lib/team-subscription-protocol.d.ts +16 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +12 -1
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +8 -10
- package/lib/util/tracing.js.map +1 -1
- package/lib/workspace-instance.d.ts +7 -2
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.js +1 -1
- package/package.json +1 -1
- package/pkg-yarn.lock +1 -1
- package/provenance-bundle.jsonl +1 -1
- package/src/accounting-protocol.ts +10 -0
- package/src/gitpod-service.ts +23 -8
- package/src/license-protocol.ts +7 -0
- package/src/messaging/error.ts +3 -0
- package/src/protocol.ts +101 -6
- package/src/team-subscription-protocol.ts +24 -0
- package/src/util/tracing.ts +8 -10
- package/src/workspace-instance.ts +12 -5
- package/src/wsready.ts +1 -1
package/src/util/tracing.ts
CHANGED
|
@@ -22,17 +22,15 @@ export type TraceContextWithSpan = TraceContext & {
|
|
|
22
22
|
export namespace TraceContext {
|
|
23
23
|
export function startSpan(operation: string, parentCtx?: TraceContext): opentracing.Span {
|
|
24
24
|
const options: opentracing.SpanOptions = {};
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
|
|
26
|
+
// references should contain span id.
|
|
27
|
+
// cf. https://github.com/jaegertracing/jaeger-client-node/issues/432
|
|
28
|
+
if (!!parentCtx?.span) {
|
|
29
|
+
const ctx = parentCtx?.span?.context();
|
|
30
|
+
if (ctx && !!ctx.toTraceId() && !!ctx.toSpanId()) {
|
|
31
|
+
options.references = [opentracing.followsFrom(ctx)];
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
|
-
// TODO(gpl) references lead to a huge amount of errors in prod logs. Avoid those until we have time to figure out how to fix it.
|
|
29
|
-
// if (referencedSpans) {
|
|
30
|
-
// // note: allthough followsForm's type says it takes 'opentracing.Span | opentracing.SpanContext', it only works with SpanContext (typing mismatch)
|
|
31
|
-
// // note2: we need to filter out debug spans (spanId === "")
|
|
32
|
-
// options.references = referencedSpans.filter(s => s !== undefined)
|
|
33
|
-
// .filter(s => !!s!.context().toSpanId())
|
|
34
|
-
// .map(s => followsFrom(s!.context()));
|
|
35
|
-
// }
|
|
36
34
|
|
|
37
35
|
return opentracing.globalTracer().startSpan(operation, options);
|
|
38
36
|
}
|
|
@@ -56,6 +56,12 @@ export interface WorkspaceInstance {
|
|
|
56
56
|
* Contains information about the image build, if there was any
|
|
57
57
|
*/
|
|
58
58
|
imageBuildInfo?: ImageBuildInfo;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* workspace class, also known as workspace size, determines the type of
|
|
62
|
+
* resources that are provided to the workspace.
|
|
63
|
+
*/
|
|
64
|
+
workspaceClass?: string;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
// WorkspaceInstanceStatus describes the current state of a workspace instance
|
|
@@ -89,10 +95,6 @@ export interface WorkspaceInstanceStatus {
|
|
|
89
95
|
|
|
90
96
|
// ownerToken is the token one needs to access the workspace. Its presence is checked by ws-proxy.
|
|
91
97
|
ownerToken?: string;
|
|
92
|
-
|
|
93
|
-
// statusVersion defines the last observed stateVersion from a WorkspaceStatus. See ws-manager-api/core.proto.
|
|
94
|
-
// statusVersion must only be set by a controller/observer.
|
|
95
|
-
statusVersion: number;
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
// WorkspaceInstancePhase describes a high-level state of a workspace instance
|
|
@@ -102,9 +104,13 @@ export type WorkspaceInstancePhase =
|
|
|
102
104
|
| "unknown"
|
|
103
105
|
|
|
104
106
|
// Preparing means that we haven't actually started the workspace instance just yet, but rather
|
|
105
|
-
// are still preparing for launch.
|
|
107
|
+
// are still preparing for launch.
|
|
106
108
|
| "preparing"
|
|
107
109
|
|
|
110
|
+
// Building means that we are building the Docker image for the workspace. A workspace will enter this phase only
|
|
111
|
+
// if an image build is required for that workspace.
|
|
112
|
+
| "building"
|
|
113
|
+
|
|
108
114
|
// Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
|
|
109
115
|
// some space within the cluster. If for example the cluster needs to scale up to accomodate the
|
|
110
116
|
// workspace, the workspace will be in Pending state until that happened.
|
|
@@ -211,6 +217,7 @@ export interface WorkspaceInstanceRepoStatus {
|
|
|
211
217
|
// ConfigurationIdeConfig ide config of WorkspaceInstanceConfiguration
|
|
212
218
|
export interface ConfigurationIdeConfig {
|
|
213
219
|
useLatest?: boolean;
|
|
220
|
+
desktopIdeAlias?: string;
|
|
214
221
|
}
|
|
215
222
|
|
|
216
223
|
// WorkspaceInstanceConfiguration contains all per-instance configuration
|
package/src/wsready.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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 2022-
|
|
7
|
+
// generated using github.com/32leaves/bel on 2022-05-18 18:19:49.011672619 +0000 UTC m=+0.006607361
|
|
8
8
|
// DO NOT MODIFY
|
|
9
9
|
|
|
10
10
|
export enum WorkspaceInitSource {
|