Skip to content

Commit

Permalink
fix(orchestrator): wait for artifacts to be ready in temp pods (k8s o… (
Browse files Browse the repository at this point in the history
#1327)

* fix(orchestrator): wait for artifacts to be ready in temp pods (k8s only)

* fmt
  • Loading branch information
pepoviola authored Sep 5, 2023
1 parent 7ac3841 commit 79a13be
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions javascript/packages/orchestrator/src/paras.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ 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";
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");

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 79a13be

Please sign in to comment.