From b88a21fe31fe62b9d3d4672eef36a86d6d62fd08 Mon Sep 17 00:00:00 2001 From: svenefftinge Date: Thu, 5 Oct 2023 08:30:27 +0000 Subject: [PATCH] [prebuilds] changed prebuild semantics - no more incremental prebuilds - always incremental workspace - never wait for running prebuilds --- .../dashboard/src/admin/ProjectDetail.tsx | 3 - .../src/projects/ProjectSettings.tsx | 140 ++++------ .../dashboard/src/service/public-api.ts | 3 - .../src/workspaces/CreateWorkspacePage.tsx | 1 - .../gitpod-protocol/go/gitpod-service.go | 27 +- .../gitpod-protocol/src/gitpod-service.ts | 2 - components/gitpod-protocol/src/protocol.ts | 9 - .../src/teams-projects-protocol.ts | 21 +- .../public-api-server/pkg/apiv1/project.go | 9 +- .../pkg/apiv1/project_test.go | 5 +- .../gitpod/experimental/v1/projects.proto | 6 +- .../go/experimental/v1/projects.pb.go | 263 ++++++++---------- .../src/gitpod/experimental/v1/projects_pb.ts | 18 -- components/server/src/config.ts | 5 - components/server/src/container-module.ts | 4 +- ...ce.ts => incremental-workspace-service.ts} | 16 +- .../src/prebuilds/prebuild-manager.spec.ts | 4 +- .../server/src/prebuilds/prebuild-manager.ts | 81 +----- .../src/workspace/gitpod-server-impl.ts | 196 ++----------- .../server/src/workspace/workspace-factory.ts | 86 +----- test/pkg/integration/workspace.go | 1 - test/tests/components/server/server_test.go | 1 - 22 files changed, 242 insertions(+), 659 deletions(-) rename components/server/src/prebuilds/{incremental-prebuilds-service.ts => incremental-workspace-service.ts} (94%) diff --git a/components/dashboard/src/admin/ProjectDetail.tsx b/components/dashboard/src/admin/ProjectDetail.tsx index c72d512eaaafa5..ab68d6926ba331 100644 --- a/components/dashboard/src/admin/ProjectDetail.tsx +++ b/components/dashboard/src/admin/ProjectDetail.tsx @@ -45,9 +45,6 @@ export default function ProjectDetail(props: { project: Project; owner: string |
- - {props.project.settings?.useIncrementalPrebuilds ? "Yes" : "No"} - {props.project.markedDeleted ? "Yes" : "No"}
diff --git a/components/dashboard/src/projects/ProjectSettings.tsx b/components/dashboard/src/projects/ProjectSettings.tsx index 7a3bd09ec011f2..f5eefa878aa5c1 100644 --- a/components/dashboard/src/projects/ProjectSettings.tsx +++ b/components/dashboard/src/projects/ProjectSettings.tsx @@ -9,7 +9,6 @@ import { useCallback, useContext, useState, Fragment, useMemo, useEffect } from import { useHistory } from "react-router"; import { CheckboxInputField } from "../components/forms/CheckboxInputField"; import { PageWithSubMenu } from "../components/PageWithSubMenu"; -import PillLabel from "../components/PillLabel"; import { getGitpodService } from "../service/service"; import { ProjectContext, useCurrentProject } from "./project-context"; import { getProjectSettingsMenu, getProjectTabs } from "./projects.routes"; @@ -239,7 +238,7 @@ export default function ProjectSettingsView() { {prebuildSettings.enable ? ( - Prebuilds will run for any before or init tasks. + Prebuilds execute and cache the result of the init tasks. ) : ( "Requires permissions to configure repository webhooks." @@ -259,17 +258,51 @@ export default function ProjectSettingsView() { /> {prebuildSettings.enable && ( <> - setPrebuildBranchStrategy(val as PrebuildSettings.BranchStrategy)} - > - - - - +
+
+ + setPrebuildInterval(target.value)} + /> +
+ The number of commits to be skipped between prebuild runs. +
+
+
+
+ setPrebuildBranchStrategy(val as PrebuildSettings.BranchStrategy)} + > + + + + +
+ Which branches are considered for prebuilds. +
+
{prebuildSettings.branchStrategy === "matched-branches" && (