fix: route artifact registry health via remote control plane
This commit is contained in:
+11
-1
@@ -692,6 +692,8 @@ async function remoteArtifactRegistry(session: FrontendSession, args: string[]):
|
||||
const command = ["frontend", "/api/dispatch", probe.providerId, "host.ssh", action];
|
||||
const result = commandResultFromFrontendTask(command, dispatched.task);
|
||||
const registryResult = artifactRegistryReadonlyResultFromCommand(probe, result);
|
||||
const dispatchBody = dispatched.dispatch.body as Record<string, unknown> | null | undefined;
|
||||
const dispatchError = typeof dispatchBody?.error === "string" ? dispatchBody.error : null;
|
||||
return {
|
||||
transport: "frontend",
|
||||
readonly: true,
|
||||
@@ -706,13 +708,21 @@ async function remoteArtifactRegistry(session: FrontendSession, args: string[]):
|
||||
decision: "infra-blocked",
|
||||
retryable: true,
|
||||
runnerDisposition: "infra-blocked",
|
||||
failureClassification: "control-plane-missing",
|
||||
recommendedAction: "restore the remote frontend/backend-core dispatch control plane, then rerun artifact-registry status|health",
|
||||
healthyScopes: [],
|
||||
failedScopes: ["backend-core-api"],
|
||||
failedScopes: ["control-plane-missing", "backend-core-api"],
|
||||
runtimeApiHealthy: false,
|
||||
channels: [
|
||||
{ channel: "backend-core-api", ok: false, requiredFor: "frontend /api/dispatch backend-core session creation", detail: dispatched.dispatch },
|
||||
{ channel: "provider-dispatch", ok: false, requiredFor: "host.ssh task creation", detail: dispatched.dispatch },
|
||||
],
|
||||
controlPlane: {
|
||||
transport: "remote-frontend",
|
||||
failureClassification: "control-plane-missing",
|
||||
dispatchStatus: dispatched.dispatch.status ?? null,
|
||||
dispatchError,
|
||||
},
|
||||
registry: registryResult,
|
||||
}
|
||||
: registryResult,
|
||||
|
||||
Reference in New Issue
Block a user