From 79a13be5477db22ab24ca68948c4e7e36d19bfb5 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 5 Sep 2023 14:10:04 -0300 Subject: [PATCH] =?UTF-8?q?fix(orchestrator):=20wait=20for=20artifacts=20t?= =?UTF-8?q?o=20be=20ready=20in=20temp=20pods=20(k8s=20o=E2=80=A6=20(#1327)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(orchestrator): wait for artifacts to be ready in temp pods (k8s only) * fmt --- javascript/packages/orchestrator/src/paras.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/javascript/packages/orchestrator/src/paras.ts b/javascript/packages/orchestrator/src/paras.ts index 836dc0107..33f5b7bed 100644 --- a/javascript/packages/orchestrator/src/paras.ts +++ b/javascript/packages/orchestrator/src/paras.ts @@ -7,6 +7,7 @@ import { GENESIS_STATE_FILENAME, GENESIS_WASM_FILENAME, K8S_WAIT_UNTIL_SCRIPT_SUFIX, + NODE_CONTAINER_WAIT_LOG, WAIT_UNTIL_SCRIPT_SUFIX, } from "./constants"; import { decorate } from "./paras-decorators"; @@ -14,6 +15,7 @@ import { Providers } from "./providers"; import { getClient } from "./providers/client"; import { fileMap } from "./types"; import { Node, ZombieRole, Parachain } from "./sharedTypes"; +import { KubeClient } from "./providers/k8s/kubeClient"; const debug = require("debug")("zombie::paras"); @@ -278,6 +280,15 @@ export async function generateParachainFiles( await client.spawnFromDef(podDef, filesToCopyToNodes); + if (client.providerName === "kubernetes") { + debug("waiting for artifacts been created in pod"); + await (client as KubeClient).waitLog( + podName, + podName, + NODE_CONTAINER_WAIT_LOG, + ); + } + if (parachain.genesisStateGenerator) { await client.copyFileFromPod( podDef.metadata.name,