From 774fa00d06265783e32b2e9db42276ef6abaa383 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 4 Feb 2023 01:52:13 +0000 Subject: [PATCH 1/3] Bump tokio from 1.23.1 to 1.24.2 Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.1 to 1.24.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/commits) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- backchannel/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c22bf6eaf..89cb24031 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1079,9 +1079,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.23.1" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a54aca0c15d014013256222ba0ebed095673f89345dd79119d912eb561b7a8" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg", "bytes", diff --git a/backchannel/Cargo.toml b/backchannel/Cargo.toml index 44999e74d..beba74e80 100644 --- a/backchannel/Cargo.toml +++ b/backchannel/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] axum = { version = "0.3.0", features = ["ws"] } -tokio = { version = "1.23", features = ["full"] } +tokio = { version = "1.24", features = ["full"] } tracing = "0.1" tracing-subscriber = { version="0.3", features = ["env-filter"] } tower = { version = "0.4", features = ["util", "timeout", "load-shed", "limit"] } From e5b259cee6e27e8474f33f7f8469860c257602d4 Mon Sep 17 00:00:00 2001 From: Nikos Kontakis Date: Tue, 21 Feb 2023 15:06:24 +0200 Subject: [PATCH 2/3] Add ZNDSL as mandatory extension (#745) Co-authored-by: Javier Viola --- javascript/packages/cli/src/cli.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/javascript/packages/cli/src/cli.ts b/javascript/packages/cli/src/cli.ts index 0f1673031..325d411d2 100644 --- a/javascript/packages/cli/src/cli.ts +++ b/javascript/packages/cli/src/cli.ts @@ -482,6 +482,17 @@ async function test( _opts: any, ) { const opts = program.opts(); + + let extension = testFile.slice(testFile.lastIndexOf(".") + 1); + + if (extension !== "zndsl") { + console.log( + `\n ${decorators.red( + "Error:", + )} File extension is not correct. Extension for tests should be '.zndsl'.\n`, + ); + } + process.env.DEBUG = "zombie"; const inCI = process.env.RUN_IN_CONTAINER === "1"; // use `k8s` as default From 954a2510fbf933cbebf025d0597cfec7fd530603 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 21 Feb 2023 16:51:58 -0300 Subject: [PATCH 3/3] fix cleanup k8s (#747) * fix cleanup k8s * check if podMonitor is available --- .../src/providers/k8s/kubeClient.ts | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts index d637f2448..0fa1f3365 100644 --- a/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts +++ b/javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts @@ -354,6 +354,7 @@ export class KubeClient extends Client { async updateResource( filename: string, + scopeNamespace?: string, replacements: ReplaceMapping = {}, ): Promise { const filePath = resolve(__dirname, `../../../static-configs/${filename}`); @@ -368,8 +369,10 @@ export class KubeClient extends Client { replacements[replaceKey], ); } - - await this.runCommand(["apply", "-f", "-"], { resourceDef, scoped: false }); + const cmd = scopeNamespace + ? ["-n", scopeNamespace, "apply", "-f", "-"] + : ["apply", "-f", "-"]; + await this.runCommand(cmd, { resourceDef, scoped: false }); } async copyFileToPod( @@ -439,6 +442,15 @@ export class KubeClient extends Client { } async destroyNamespace() { + if (this.podMonitorAvailable) { + await this.runCommand( + ["delete", "podmonitor", this.namespace, "-n", "monitoring"], + { + scoped: false, + }, + ); + } + await this.runCommand(["delete", "namespace", this.namespace], { scoped: false, }); @@ -534,13 +546,17 @@ export class KubeClient extends Client { if (this.podMonitorAvailable) { const [hr, min] = addMinutes(minutes, now); let schedule = `${min} ${hr} * * *`; - await this.updateResource("job-delete-podmonitor.yaml", { schedule }); + await this.updateResource( + "job-delete-podmonitor.yaml", + this.namespace, + { schedule }, + ); } minutes += 1; const [hr, min] = addMinutes(minutes, now); const nsSchedule = `${min} ${hr} * * *`; - await this.updateResource("job-delete-namespace.yaml", { + await this.updateResource("job-delete-namespace.yaml", this.namespace, { schedule: nsSchedule, }); }