@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.
Files changed (42) hide show
  1. package/data/gitpod-schema.json +66 -2
  2. package/lib/accounting-protocol.d.ts +7 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +8 -1
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/gitpod-service.d.ts +9 -1
  7. package/lib/gitpod-service.d.ts.map +1 -1
  8. package/lib/gitpod-service.js +8 -7
  9. package/lib/gitpod-service.js.map +1 -1
  10. package/lib/license-protocol.d.ts +7 -0
  11. package/lib/license-protocol.d.ts.map +1 -1
  12. package/lib/license-protocol.js.map +1 -1
  13. package/lib/messaging/error.d.ts +1 -0
  14. package/lib/messaging/error.d.ts.map +1 -1
  15. package/lib/messaging/error.js +2 -0
  16. package/lib/messaging/error.js.map +1 -1
  17. package/lib/protocol.d.ts +27 -3
  18. package/lib/protocol.d.ts.map +1 -1
  19. package/lib/protocol.js +82 -8
  20. package/lib/protocol.js.map +1 -1
  21. package/lib/team-subscription-protocol.d.ts +16 -0
  22. package/lib/team-subscription-protocol.d.ts.map +1 -1
  23. package/lib/team-subscription-protocol.js +12 -1
  24. package/lib/team-subscription-protocol.js.map +1 -1
  25. package/lib/util/tracing.d.ts.map +1 -1
  26. package/lib/util/tracing.js +8 -10
  27. package/lib/util/tracing.js.map +1 -1
  28. package/lib/workspace-instance.d.ts +7 -2
  29. package/lib/workspace-instance.d.ts.map +1 -1
  30. package/lib/wsready.js +1 -1
  31. package/package.json +1 -1
  32. package/pkg-yarn.lock +1 -1
  33. package/provenance-bundle.jsonl +1 -1
  34. package/src/accounting-protocol.ts +10 -0
  35. package/src/gitpod-service.ts +23 -8
  36. package/src/license-protocol.ts +7 -0
  37. package/src/messaging/error.ts +3 -0
  38. package/src/protocol.ts +101 -6
  39. package/src/team-subscription-protocol.ts +24 -0
  40. package/src/util/tracing.ts +8 -10
  41. package/src/workspace-instance.ts +12 -5
  42. package/src/wsready.ts +1 -1
@@ -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
- if (parentCtx && parentCtx.span && !!parentCtx.span.context().toSpanId()) {
26
- options.childOf = parentCtx.span;
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. This means we're building the Docker image for the workspace.
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-03-29 17:08:06.113873917 +0000 UTC m=+0.010035965
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 {