Skip to content

Commit 1594c9b

Browse files
committed
Add warning to ws metadata when starting workspace
1 parent fbcde24 commit 1594c9b

File tree

8 files changed

+1183
-850
lines changed

8 files changed

+1183
-850
lines changed

components/dashboard/src/workspaces/CreateWorkspacePage.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,11 @@ export function CreateWorkspacePage() {
552552
<span className="text-sm">{warningIde}</span>
553553
</Alert>
554554
)}
555+
{workspaceContext.data?.data.metadata?.warnings.map((w) => (
556+
<Alert type="warning" key={w}>
557+
<span className="text-sm">{w}</span>
558+
</Alert>
559+
)) ?? []}
555560

556561
<InputField>
557562
<RepositoryFinder

components/gitpod-protocol/src/protocol.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,8 @@ export interface WorkspaceContext {
10181018
normalizedContextURL?: string;
10191019
forceCreateNewWorkspace?: boolean;
10201020
forceImageBuild?: boolean;
1021+
// The context can have non-blocking warnings that should be displayed to the user.
1022+
warnings?: string[];
10211023
}
10221024

10231025
export namespace WorkspaceContext {

components/public-api/gitpod/v1/workspace.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ message WorkspaceMetadata {
316316
// original_context_url is the normalized URL from which the workspace was
317317
// created
318318
string original_context_url = 7;
319+
320+
// warnings are user-facing warnings that should be displayed to the user when trying to start the workspace
321+
repeated string warnings = 8;
319322
}
320323

321324
// WorkspaceSpec specifies the configuration of a workspace for a workspace

components/public-api/go/v1/workspace.pb.go

Lines changed: 598 additions & 587 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)