fix(device-plane): activate manager from v2 reconciliation
This commit is contained in:
@@ -12,7 +12,7 @@ const devicePlaneRoot = resolve(platformRoot, "device-plane");
|
||||
const designRoot = resolve(process.env.NODEDC_DEVICE_MANAGER_SOURCE_ROOT || resolve(platformRoot, "../NODEDC_DESIGN_GUIDELINE"));
|
||||
const managerRoot = resolve(designRoot, "apps/device-manager");
|
||||
const artifactDir = resolve(process.env.NODEDC_DEPLOY_ARTIFACT_DIR || resolve(scriptDir, "../deploy-artifacts"));
|
||||
const [patchId = "device-manager-control-plane-20260811-003", ...extra] = process.argv.slice(2);
|
||||
const [patchId = "device-manager-control-plane-v3-20260811-005", ...extra] = process.argv.slice(2);
|
||||
if (extra.length || !/^[A-Za-z0-9._-]{1,96}$/.test(patchId)) throw new Error("usage: build-device-manager-control-plane-artifact.mjs [patch-id]");
|
||||
|
||||
const entries = [
|
||||
@@ -26,7 +26,7 @@ const entries = [
|
||||
"services/device-gateway/package.json",
|
||||
"services/device-edge-relay/package.json",
|
||||
"services/device-manager",
|
||||
"deployment/device-manager-control-plane-v2.json",
|
||||
"deployment/device-manager-control-plane-v3.json",
|
||||
];
|
||||
const stage = await mkdtemp(join(tmpdir(), "nodedc-device-manager-control-plane-"));
|
||||
const payload = join(stage, "payload");
|
||||
@@ -89,15 +89,16 @@ try {
|
||||
if (compose.includes(forbidden)) throw new Error(`device_manager_compose_boundary_violation:${forbidden}`);
|
||||
}
|
||||
const descriptor = JSON.parse(await readFile(
|
||||
join(payload, "deployment/device-manager-control-plane-v2.json"),
|
||||
join(payload, "deployment/device-manager-control-plane-v3.json"),
|
||||
"utf8",
|
||||
));
|
||||
if (
|
||||
descriptor.schemaVersion !== "nodedc.device-plane.device-manager-control-plane.v2"
|
||||
|| descriptor.predecessor?.patchId !== "device-manager-control-plane-reconciliation-20260811-002"
|
||||
|| descriptor.predecessor?.artifactSha256 !== "dd86dd58e4f649db0981db5089e003caf3961356179f2abb514662351487e1e6"
|
||||
descriptor.schemaVersion !== "nodedc.device-plane.device-manager-control-plane.v3"
|
||||
|| descriptor.predecessor?.patchId !== "device-manager-control-plane-v2-reconciliation-20260811-004"
|
||||
|| descriptor.predecessor?.artifactSha256 !== "09600bfd99717314b43936e17ffaaf6b6fca1f2fd008beddddc68480cdf3d284"
|
||||
|| descriptor.predecessor?.mode !== "failed-v2-control-plane-baseline-adoption"
|
||||
|| descriptor.healthGate !== "bounded-container-grace+core-contract"
|
||||
|| descriptor.rollback !== "restore-reconciled-baseline"
|
||||
|| descriptor.rollback !== "restore-v2-reconciled-baseline"
|
||||
) throw new Error("device_manager_activation_successor_contract_mismatch");
|
||||
await writeFile(join(stage, "manifest.env"), `id=${patchId}\ncomponent=device-plane\ntype=app-overlay\n`, "utf8");
|
||||
await writeFile(join(stage, "files.txt"), `${entries.join("\n")}\n`, "utf8");
|
||||
|
||||
Reference in New Issue
Block a user