mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 08:01:35 +00:00
re-enable s3 on agent workers + add DISABLE_S3_STORE env variable
This commit is contained in:
+19
-4
@@ -374,6 +374,11 @@ async fn windmill_main() -> anyhow::Result<()> {
|
||||
|
||||
let is_agent = mode == Mode::Agent;
|
||||
|
||||
#[cfg(feature = "parquet")]
|
||||
let disable_s3_store = std::env::var("DISABLE_S3_STORE")
|
||||
.ok()
|
||||
.is_some_and(|x| x == "1" || x == "true");
|
||||
|
||||
if !is_agent {
|
||||
let skip_migration = std::env::var("SKIP_MIGRATION")
|
||||
.map(|val| val == "true")
|
||||
@@ -474,7 +479,15 @@ Windmill Community Edition {GIT_VERSION}
|
||||
default_base_internal_url.clone()
|
||||
};
|
||||
|
||||
initial_load(&db, killpill_tx.clone(), worker_mode, server_mode, is_agent).await;
|
||||
initial_load(
|
||||
&db,
|
||||
killpill_tx.clone(),
|
||||
worker_mode,
|
||||
server_mode,
|
||||
#[cfg(feature = "parquet")]
|
||||
disable_s3_store,
|
||||
)
|
||||
.await;
|
||||
|
||||
monitor_db(
|
||||
&db,
|
||||
@@ -635,7 +648,7 @@ Windmill Community Edition {GIT_VERSION}
|
||||
killpill_tx.clone(),
|
||||
num_workers,
|
||||
base_internal_url.clone(),
|
||||
mode.clone() == Mode::Agent,
|
||||
is_agent,
|
||||
hostname.clone(),
|
||||
)
|
||||
.await?;
|
||||
@@ -757,8 +770,10 @@ Windmill Community Edition {GIT_VERSION}
|
||||
reload_job_default_timeout_setting(&db).await
|
||||
},
|
||||
#[cfg(feature = "parquet")]
|
||||
OBJECT_STORE_CACHE_CONFIG_SETTING if !is_agent => {
|
||||
reload_s3_cache_setting(&db).await
|
||||
OBJECT_STORE_CACHE_CONFIG_SETTING => {
|
||||
if !disable_s3_store {
|
||||
reload_s3_cache_setting(&db).await
|
||||
}
|
||||
},
|
||||
SCIM_TOKEN_SETTING => {
|
||||
reload_scim_token_setting(&db).await
|
||||
|
||||
@@ -136,7 +136,7 @@ pub async fn initial_load(
|
||||
tx: tokio::sync::broadcast::Sender<()>,
|
||||
worker_mode: bool,
|
||||
server_mode: bool,
|
||||
_is_agent: bool,
|
||||
#[cfg(feature = "parquet")] disable_s3_store: bool,
|
||||
) {
|
||||
if let Err(e) = load_metrics_enabled(db).await {
|
||||
tracing::error!("Error loading expose metrics: {e:#}");
|
||||
@@ -180,7 +180,7 @@ pub async fn initial_load(
|
||||
}
|
||||
|
||||
#[cfg(feature = "parquet")]
|
||||
if !_is_agent {
|
||||
if !disable_s3_store {
|
||||
reload_s3_cache_setting(&db).await;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ pub const JWT_SECRET_SETTING: &str = "jwt_secret";
|
||||
pub const EMAIL_DOMAIN_SETTING: &str = "email_domain";
|
||||
pub const OTEL_SETTING: &str = "otel";
|
||||
|
||||
pub const ENV_SETTINGS: [&str; 55] = [
|
||||
pub const ENV_SETTINGS: [&str; 56] = [
|
||||
"DISABLE_NSJAIL",
|
||||
"MODE",
|
||||
"NUM_WORKERS",
|
||||
@@ -96,11 +96,12 @@ pub const ENV_SETTINGS: [&str; 55] = [
|
||||
"OTEL_METRICS",
|
||||
"OTEL_TRACING",
|
||||
"OTEL_LOGS",
|
||||
"DISABLE_S3_STORE",
|
||||
];
|
||||
|
||||
use crate::error;
|
||||
use sqlx::Pool;
|
||||
use sqlx::postgres::Postgres;
|
||||
use sqlx::Pool;
|
||||
|
||||
pub async fn load_value_from_global_settings(
|
||||
db: &Pool<Postgres>,
|
||||
@@ -114,4 +115,4 @@ pub async fn load_value_from_global_settings(
|
||||
.await?
|
||||
.map(|x| x.value);
|
||||
Ok(r)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user