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.
This commit is contained in:
Lucas Abel
2024-11-25 08:08:16 +01:00
committed by GitHub
parent 6768e5bbbd
commit 39b902c118
+1 -3
View File
@@ -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