From b586dfb13aac7ac5af9e9e029a73a62443371950 Mon Sep 17 00:00:00 2001 From: Javier Viola <363911+pepoviola@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:40:37 -0300 Subject: [PATCH] `ci-fixes` on dumpLogs map before allSettled (#1885) * ci-fixes, on dumpLogs map before allSettled * lint --- javascript/packages/orchestrator/src/network.ts | 10 ++++++---- .../orchestrator/src/providers/k8s/kubeClient.ts | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/javascript/packages/orchestrator/src/network.ts b/javascript/packages/orchestrator/src/network.ts index bf437a33e..bfb0f8115 100644 --- a/javascript/packages/orchestrator/src/network.ts +++ b/javascript/packages/orchestrator/src/network.ts @@ -168,10 +168,12 @@ export class Network { [], ); - const dumpsPromises = this.relay.concat(paraNodes).map((node) => { - this.client.dumpLogs(this.tmpDir, node.name); - }); - await Promise.allSettled(dumpsPromises); + const dumpsNodes = this.relay.concat(paraNodes); + await Promise.allSettled( + dumpsNodes.map((node) => { + this.client.dumpLogs(this.tmpDir, node.name); + }), + ); if (showLogPath) new CreateLogTable({ colWidths: [20, 100] }).pushToPrint([ diff --git a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts index 5842584b4..f27d41258 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts @@ -750,6 +750,7 @@ export class KubeClient extends Client { // We should read it from host filesystem to ensure we are reading all the logs. // First get the logs files to check if we need to read from disk or not + debugLogs("getting logFiles for:", podName); const logFiles = await this.gzippedLogFiles(podName); debugLogs("logFiles", logFiles); let logs = "";