From 39b902c118b1e4e0529002118659193f835da4e3 Mon Sep 17 00:00:00 2001 From: Lucas Abel <22837557+uael@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:08:16 +0100 Subject: [PATCH] backend: keep tracking minimal worker version (#4786) Be sure to also track the min version of workers that have been started after the min version variable has been set. e.g. All workers are up to date and `MIN_VERSION_IS_AT_LEAST_1_427` is set to true, a worker is then powered on with an anterior version, leading to a false positive value. This commit fix that. --- backend/windmill-common/src/worker.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/windmill-common/src/worker.rs b/backend/windmill-common/src/worker.rs index d94151f75b..5b5b93f425 100644 --- a/backend/windmill-common/src/worker.rs +++ b/backend/windmill-common/src/worker.rs @@ -592,9 +592,7 @@ pub async fn update_min_version<'c, E: sqlx::Executor<'c, Database = sqlx::Postg tracing::info!("Minimal worker version: {min_version}"); } - if min_version >= Version::new(1, 427, 0) { - *MIN_VERSION_IS_AT_LEAST_1_427.write().await = true; - } + *MIN_VERSION_IS_AT_LEAST_1_427.write().await = min_version >= Version::new(1, 427, 0); *MIN_VERSION.write().await = min_version.clone(); min_version >= cur_version