feat: replace linked worktrees with runtime clones
This commit is contained in:
@@ -9,9 +9,7 @@ export type Diagnostic = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
export type WorkingDirectoryMaterializerKind =
|
||||
| "runtime_git_cache"
|
||||
| "local_git_worktree";
|
||||
export type WorkingDirectoryMaterializerKind = "runtime_git_clone";
|
||||
|
||||
export type WorkingDirectoryStatusKind =
|
||||
| "active"
|
||||
|
||||
@@ -11,9 +11,7 @@ export type Diagnostic = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
export type WorkingDirectoryMaterializerKind =
|
||||
| "runtime_git_cache"
|
||||
| "local_git_worktree";
|
||||
export type WorkingDirectoryMaterializerKind = "runtime_git_clone";
|
||||
|
||||
export type WorkingDirectoryStatusKind =
|
||||
| "active"
|
||||
|
||||
@@ -114,8 +114,7 @@ export function parseWorkingDirectorySummary(
|
||||
working_directory_id: stringField(record, "working_directory_id"),
|
||||
repository_key: stringField(record, "repository_key"),
|
||||
materializer_kind: enumField(record, "materializer_kind", [
|
||||
"runtime_git_cache",
|
||||
"local_git_worktree",
|
||||
"runtime_git_clone",
|
||||
]),
|
||||
status: enumField(record, "status", [
|
||||
"active",
|
||||
|
||||
@@ -282,10 +282,7 @@ function runtimeWorkingDirectory(
|
||||
item.materializer_kind,
|
||||
`${label}.materializer_kind`,
|
||||
);
|
||||
if (
|
||||
materializerKind !== "runtime_git_cache" &&
|
||||
materializerKind !== "local_git_worktree"
|
||||
) {
|
||||
if (materializerKind !== "runtime_git_clone") {
|
||||
throw new Error(`${label}.materializer_kind is invalid`);
|
||||
}
|
||||
const status = string(item.status, `${label}.status`);
|
||||
|
||||
@@ -20,10 +20,10 @@ function workdir(
|
||||
repository_key: "repository-1",
|
||||
current_selector,
|
||||
current_ref,
|
||||
materializer_kind: "local_git_worktree",
|
||||
materializer_kind: "runtime_git_clone",
|
||||
status: "active",
|
||||
cleanup_target: {
|
||||
kind: "local_git_worktree",
|
||||
kind: "runtime_git_clone",
|
||||
working_directory_id: "workdir-1",
|
||||
repository_key: "repository-1",
|
||||
},
|
||||
|
||||
@@ -54,12 +54,12 @@ const options: WorkerLaunchOptionsResponse = {
|
||||
creation_ref: "0123456789abcdef",
|
||||
current_selector: null,
|
||||
current_ref: "0123456789abcdef",
|
||||
materializer_kind: "local_git_worktree",
|
||||
materializer_kind: "runtime_git_clone",
|
||||
status: "active",
|
||||
cleanliness: "clean",
|
||||
primary_worker_id: null,
|
||||
cleanup_target: {
|
||||
kind: "git_worktree",
|
||||
kind: "runtime_git_clone",
|
||||
working_directory_id: "wd-1-repo",
|
||||
repository_key: "repo",
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
const summary = {
|
||||
working_directory_id: "workdir-1",
|
||||
repository_key: "main",
|
||||
materializer_kind: "runtime_git_cache",
|
||||
materializer_kind: "runtime_git_clone",
|
||||
status: "active",
|
||||
occupied_by: {
|
||||
runtime_id: "arcadia",
|
||||
|
||||
Reference in New Issue
Block a user