From 6d15ab85a23835b1aef838bb0fdc94e1641c30db Mon Sep 17 00:00:00 2001 From: Anmol Date: Sat, 19 Oct 2024 00:09:35 +0530 Subject: [PATCH] remove pods from checking status, if they are no longer found, update default chart version (#570) --- clients/js/packages/client/src/client.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clients/js/packages/client/src/client.ts b/clients/js/packages/client/src/client.ts index f8a72155c..cc59bb37d 100644 --- a/clients/js/packages/client/src/client.ts +++ b/clients/js/packages/client/src/client.ts @@ -49,7 +49,7 @@ export interface PodPorts { } const defaultName: string = 'starship'; -const defaultVersion: string = 'v0.2.14'; +const defaultVersion: string = 'v0.2.19'; // TODO talk to Anmol about moving these into yaml, if not already possible? const defaultPorts: PodPorts = { @@ -558,6 +558,13 @@ export class StarshipClient implements StarshipClientI { public async waitForPods(): Promise { const podNames = this.getPodNames(); + // Remove pods that are no longer active from the podStatuses map + this.podStatuses.forEach((_value, podName) => { + if (!podNames.includes(podName)) { + this.podStatuses.delete(podName); + } + }); + // Check the status of each pod retrieved podNames.forEach((podName) => { this.checkPodStatus(podName); @@ -658,7 +665,6 @@ export class StarshipClient implements StarshipClientI { const eventLines = eventsSection .split('\n') .filter((line) => line.trim() !== ''); - this.log(`event lints: ${eventLines.join('\n')}`); return eventLines; }