From 23a00c55e95054ecebbcbb829499f5a1d622efd5 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 9 Jul 2024 00:01:52 +0200 Subject: [PATCH] fix: fix previous_result not always working for failure steps --- backend/windmill-worker/src/worker_flow.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 7b9561cc07..64d37748c7 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -545,7 +545,7 @@ pub async fn update_flow_status_after_job_completion_internal< .map(|x| serde_json::from_value::(x).ok()) .flatten() .unwrap_or_default(); - tracing::error!("UPDATE FLOW STATUS 2: {retry:#?} "); + tracing::info!("update flow status on rety: {retry:#?} "); next_retry(&retry, &old_status.retry).is_none() } else { false @@ -1717,7 +1717,7 @@ async fn push_next_flow_job .with_context(|| format!("no module at index {}", status.step))?; let current_id = &module.id; - let previous_id = if i >= 1 { + let mut previous_id = if i >= 1 { flow.modules.get(i - 1).map(|m| m.id.clone()).unwrap() } else { String::new() @@ -1835,7 +1835,7 @@ async fn push_next_flow_job * In that case, `i` will index past `flow.modules`. The above should handle that and * re-run the failure module. */ i = flow.modules.len(); - + previous_id = current_id.clone(); module = flow .failure_module .as_ref()