From 4f4e47992a76dbeaf5203d62048574ef6d615d58 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Thu, 17 Sep 2026 13:57:06 +0300 Subject: [PATCH] kcidb-rest: report deferred submissions as retrying The ingester moves a submission to pending_retry/ when the failure was not the submission's fault, so the status endpoint answered notfound for a file that is still on its way in. Signed-off-by: Denys Fedoryshchenko --- kcidb-restd-rs/src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kcidb-restd-rs/src/main.rs b/kcidb-restd-rs/src/main.rs index 8503c40..f1ae700 100644 --- a/kcidb-restd-rs/src/main.rs +++ b/kcidb-restd-rs/src/main.rs @@ -675,6 +675,13 @@ async fn submission_status( return (StatusCode::OK, jsanswer); } + submission_file = format!("{}/pending_retry/submission-{}.json", state.directory, id); + // check if the submission was deferred after a transient failure + if Path::new(&submission_file).exists() { + let jsanswer = generate_answer("retrying", id.as_str(), Some("File deferred after a transient failure, waiting for retry".to_string())); + return (StatusCode::OK, jsanswer); + } + submission_file = format!("{}/failed/submission-{}.json", state.directory, id); // check if the failed file exists if Path::new(&submission_file).exists() {