Remove legacy client-manager workflows
This commit is contained in:
@@ -122,7 +122,6 @@ const runtimeActions = {
|
||||
{ key: "generate-run", label: "Generate run", available: true },
|
||||
{ key: "download-run", label: "Download run", available: true },
|
||||
{ key: "push-run-update", label: "Push run update", available: true },
|
||||
{ key: "generate-client-manager", label: "Generate client manager", available: true },
|
||||
{ key: "dependencies-check", label: "Check dependencies", available: true },
|
||||
{ key: "historical-logs", label: "Historical logs", available: true }
|
||||
]
|
||||
@@ -476,53 +475,6 @@ describe("PlatformApiClient AI providers", () => {
|
||||
count: 1
|
||||
});
|
||||
}
|
||||
if (url.endsWith("/api/v1/server-instances/server-1/client-managers/generate") && init?.method === "POST") {
|
||||
expect(JSON.parse(String(init.body))).toEqual({
|
||||
profileKey: "example-client-manager",
|
||||
targetOs: "windows",
|
||||
targetArch: "amd64",
|
||||
repositoryUrl: "https://example.test/client-manager.git",
|
||||
sourceRevision: "main",
|
||||
idempotencyKey: "idem-client-generate"
|
||||
});
|
||||
return jsonResponse({
|
||||
id: "client-dist-1",
|
||||
serverInstanceId: server.id,
|
||||
pluginId: plugin.id,
|
||||
profileKey: "example-client-manager",
|
||||
targetOs: "windows",
|
||||
targetArch: "amd64",
|
||||
repositoryUrl: "https://example.test/client-manager.git",
|
||||
sourceRevision: "main",
|
||||
buildJobId: "client-build-1",
|
||||
artifactId: "artifact-client-1",
|
||||
checksum: "sha256:clientchecksum",
|
||||
keyGeneration: 1,
|
||||
secretRef: "secret://runtime-keys/server-1/client-manager/example-client-manager/current",
|
||||
status: "available",
|
||||
createdAt: "2026-07-03T00:00:00Z",
|
||||
updatedAt: "2026-07-03T00:00:00Z"
|
||||
});
|
||||
}
|
||||
if (url.endsWith("/api/v1/server-instances/server-1/client-managers/download") && init?.method === "POST") {
|
||||
expect(JSON.parse(String(init.body))).toEqual({ profileKey: "example-client-manager" });
|
||||
return jsonResponse({ ...runtimeDownload, artifactId: "artifact-client-1", filename: "example-client-manager.exe" });
|
||||
}
|
||||
if (url.endsWith("/api/v1/server-instances/server-1/client-managers/key/reset") && init?.method === "POST") {
|
||||
expect(JSON.parse(String(init.body))).toEqual({ componentKind: "client-manager", componentKey: "example-client-manager" });
|
||||
return jsonResponse({
|
||||
id: "runtime-key-server-1-client-2",
|
||||
serverInstanceId: server.id,
|
||||
componentKind: "client-manager",
|
||||
componentKey: "example-client-manager",
|
||||
secretRef: "secret://runtime-keys/server-1/client-manager/example-client-manager/current",
|
||||
fingerprint: "def456abc123",
|
||||
generation: 2,
|
||||
status: "active",
|
||||
createdAt: "2026-07-03T00:00:00Z",
|
||||
updatedAt: "2026-07-03T00:00:00Z"
|
||||
});
|
||||
}
|
||||
if (url.endsWith("/api/v1/server-instances/server-1/dependencies/check") && init?.method === "POST") {
|
||||
expect(JSON.parse(String(init.body))).toEqual({ probeKey: "java-21", idempotencyKey: "idem-dep-check" });
|
||||
return jsonResponse({ ...job, id: "job-dep-check", capability: "dependencies.check", targetKey: "dependencies/java-21" });
|
||||
@@ -652,18 +604,6 @@ describe("PlatformApiClient AI providers", () => {
|
||||
status: "queued"
|
||||
});
|
||||
await expect(client.listRunUpdates(server.id)).resolves.toMatchObject({ count: 1, items: [{ phase: "restart-requested", rollback: false }] });
|
||||
await expect(
|
||||
client.generateClientManager(server.id, {
|
||||
profileKey: "example-client-manager",
|
||||
targetOs: "windows",
|
||||
targetArch: "amd64",
|
||||
repositoryUrl: "https://example.test/client-manager.git",
|
||||
sourceRevision: "main",
|
||||
idempotencyKey: "idem-client-generate"
|
||||
})
|
||||
).resolves.toMatchObject({ artifactId: "artifact-client-1", profileKey: "example-client-manager" });
|
||||
await expect(client.downloadLatestClientManager(server.id, { profileKey: "example-client-manager" })).resolves.toMatchObject({ artifactId: "artifact-client-1" });
|
||||
await expect(client.resetClientManagerKey(server.id, { componentKind: "client-manager", componentKey: "example-client-manager" })).resolves.toMatchObject({ generation: 2 });
|
||||
await expect(client.checkDependencies(server.id, { probeKey: "java-21", idempotencyKey: "idem-dep-check" })).resolves.toMatchObject({ capability: "dependencies.check" });
|
||||
await expect(client.getDependencyCatalog(server.id)).resolves.toMatchObject({ targetOs: "linux", plans: [{ digest: runtimeDigest }] });
|
||||
await expect(client.installDependencies(server.id, { probeKey: "java-21", installPlanKey: "install-java-linux", planDigest: runtimeDigest, idempotencyKey: "idem-dep-install" })).resolves.toMatchObject({
|
||||
@@ -673,7 +613,7 @@ describe("PlatformApiClient AI providers", () => {
|
||||
client.invokeAI({ requestId: "ai-1", serverInstanceId: server.id, purpose: "config.suggest", prompt: "Tune PVP safely", currentConfig: "server.name=Example Survival #1\n" })
|
||||
).resolves.toMatchObject({ status: "ok", usage: { mocked: true }, configRecommendation: { diffSummary: "review required" } });
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledTimes(46);
|
||||
expect(fetchMock).toHaveBeenCalledTimes(43);
|
||||
});
|
||||
|
||||
it("normalizes server file workspace null arrays from older platform responses", async () => {
|
||||
|
||||
Reference in New Issue
Block a user