From fee5b9ba1c93e5ce596a6500753a871aba2cdc26 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Mon, 8 Jan 2024 17:46:39 -0300 Subject: [PATCH] fix cleaner, use status as lowercase (#1654) --- crates/k8s-cleaner/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/k8s-cleaner/src/main.rs b/crates/k8s-cleaner/src/main.rs index 576005eee..437ceb71c 100644 --- a/crates/k8s-cleaner/src/main.rs +++ b/crates/k8s-cleaner/src/main.rs @@ -135,7 +135,7 @@ async fn needs_to_delete( .text() .await?; let res_json: serde_json::Value = serde_json::from_str(res.as_str())?; - let status = res_json["status"]["text"].as_str().unwrap_or_default(); + let status = res_json["status"]["text"].as_str().unwrap_or_default().to_lowercase(); let needs = status.contains("failed") || status.contains("canceled"); println!("jobid: {job_id} - status: {status} - will delete: {needs}"); Ok(needs)