Skip to content

Commit 0f926eb

Browse files
adding missing fields to CreateAndStartWorkspace (#18874)
* adding some missing fields to CreateAndStartWorkspace * updated mocks
1 parent 373e5e4 commit 0f926eb

File tree

5 files changed

+466
-383
lines changed

5 files changed

+466
-383
lines changed

components/gitpod-protocol/go/gitpod-service.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,8 +2016,10 @@ type CreateWorkspaceOptions struct {
20162016
StartWorkspaceOptions
20172017
ContextURL string `json:"contextUrl,omitempty"`
20182018
OrganizationId string `json:"organizationId,omitempty"`
2019-
IgnoreRunningWorkspaceOnSameCommit bool `json:"ignoreRunningWorkspaceOnSameCommit,omitemopty"`
2020-
ForceDefaultConfig bool `json:"forceDefaultConfig,omitemopty"`
2019+
IgnoreRunningWorkspaceOnSameCommit bool `json:"ignoreRunningWorkspaceOnSameCommit,omitempty"`
2020+
ForceDefaultConfig bool `json:"forceDefaultConfig,omitempty"`
2021+
IgnoreRunningPrebuild bool `json:"ignoreRunningPrebuild,omitempty"`
2022+
AllowUsingPreviousPrebuilds bool `json:"allowUsingPreviousPrebuilds,omitempty"`
20212023
}
20222024

20232025
// DeleteOwnAuthProviderParams is the DeleteOwnAuthProviderParams message type

components/public-api-server/pkg/apiv1/workspace.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ func (s *WorkspaceService) CreateAndStartWorkspace(ctx context.Context, req *con
4242
}
4343

4444
ws, err := conn.CreateWorkspace(ctx, &protocol.CreateWorkspaceOptions{
45-
ContextURL: req.Msg.GetContextUrl(),
46-
OrganizationId: req.Msg.GetOrganizationId(),
45+
ContextURL: req.Msg.GetContextUrl(),
46+
OrganizationId: req.Msg.GetOrganizationId(),
47+
IgnoreRunningWorkspaceOnSameCommit: req.Msg.GetIgnoreRunningWorkspaceOnSameCommit(),
48+
IgnoreRunningPrebuild: req.Msg.GetIgnoreRunningPrebuild(),
49+
AllowUsingPreviousPrebuilds: req.Msg.GetAllowUsingPreviousPrebuilds(),
50+
ForceDefaultConfig: req.Msg.GetForceDefaultConfig(),
4751
StartWorkspaceOptions: protocol.StartWorkspaceOptions{
4852
WorkspaceClass: req.Msg.GetStartSpec().GetWorkspaceClass(),
4953
Region: req.Msg.GetStartSpec().GetRegion(),

components/public-api/gitpod/experimental/v1/workspaces.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ message CreateAndStartWorkspaceRequest {
9292
StartWorkspaceSpec start_spec = 5;
9393

9494
string organization_id = 6;
95+
96+
bool ignore_running_workspace_on_same_commit = 7;
97+
bool ignore_running_prebuild = 8;
98+
bool allow_using_previous_prebuilds = 9;
99+
bool force_default_config = 10;
95100
}
96101
message CreateAndStartWorkspaceResponse {
97102
string workspace_id = 1;

0 commit comments

Comments
 (0)