From 8bb6b6331b74d43b1ecfa08d3393254f54a94f87 Mon Sep 17 00:00:00 2001 From: wendrul <53628737+wendrul@users.noreply.github.com> Date: Thu, 29 Jan 2026 12:43:26 +0100 Subject: [PATCH] fix: do not quit indexer when receiving handoff during pull (#7659) * fix: do not quit indexer when receiving handoff during pull * update * Add correct return type * update ee-repo-ref [CI only] * chore: update ee-repo-ref to c05572e93739e2697ab310d87efe2744cd0e1aaf This commit updates the EE repository reference after PR #394 was merged in windmill-ee-private. Previous ee-repo-ref: 4358aa9c5b3b38ba74d7ea52cafd49899d338a07 New ee-repo-ref: c05572e93739e2697ab310d87efe2744cd0e1aaf Automated by sync-ee-ref workflow. --------- Co-authored-by: Ruben Fiszel Co-authored-by: windmill-internal-app[bot] --- backend/ee-repo-ref.txt | 2 +- backend/src/main.rs | 16 ++++++++++------ .../windmill-indexer/src/completed_runs_oss.rs | 2 +- backend/windmill-indexer/src/service_logs_oss.rs | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 14c33389f7..2e6878b034 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -5d841b358dd32130c9f34b54f59b96b5c322f213 +c05572e93739e2697ab310d87efe2744cd0e1aaf diff --git a/backend/src/main.rs b/backend/src/main.rs index 70ea4fb15d..89e43e4930 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -909,9 +909,11 @@ Windmill Community Edition {GIT_VERSION} tracing::info!("Received killpill, aborting index initialization"); }, res = windmill_indexer::completed_runs_oss::init_index(&db) => { - let res = res?; - reader = Some(res.0); - writer = Some(res.1); + let res = res?; + if let Some(r) = res { + reader = Some(r.0); + writer = Some(r.1); + } } } @@ -953,9 +955,11 @@ Windmill Community Edition {GIT_VERSION} tracing::info!("Received killpill, aborting index initialization"); }, res = windmill_indexer::service_logs_oss::init_index(&db, killpill_tx.clone()) => { - let res = res?; - reader = Some(res.0); - writer = Some(res.1); + let res = res?; + if let Some(r) = res { + reader = Some(r.0); + writer = Some(r.1); + } } } diff --git a/backend/windmill-indexer/src/completed_runs_oss.rs b/backend/windmill-indexer/src/completed_runs_oss.rs index 083f8744fa..99e3d59cd8 100644 --- a/backend/windmill-indexer/src/completed_runs_oss.rs +++ b/backend/windmill-indexer/src/completed_runs_oss.rs @@ -18,7 +18,7 @@ pub struct IndexReader; pub struct IndexWriter; #[cfg(not(feature = "private"))] -pub async fn init_index(_db: &Pool) -> Result<(IndexReader, IndexWriter), Error> { +pub async fn init_index(_db: &Pool) -> Result, Error> { Err(anyhow!("Cannot initialize index: not in EE").into()) } diff --git a/backend/windmill-indexer/src/service_logs_oss.rs b/backend/windmill-indexer/src/service_logs_oss.rs index b6e9017f88..3ea95599a3 100644 --- a/backend/windmill-indexer/src/service_logs_oss.rs +++ b/backend/windmill-indexer/src/service_logs_oss.rs @@ -22,7 +22,7 @@ pub struct ServiceLogIndexWriter; pub async fn init_index( _db: &Pool, mut _killpill_tx: KillpillSender, -) -> Result<(ServiceLogIndexReader, ServiceLogIndexWriter), Error> { +) -> Result, Error> { Err(anyhow!("Cannot initialize index: not in EE").into()) }