From f00545f1691c5107d1103f89bf68fdc3915ddd82 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 13 Aug 2024 18:00:50 +0200 Subject: [PATCH] fix: add an option to disable bundling globally --- backend/windmill-common/src/worker.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/windmill-common/src/worker.rs b/backend/windmill-common/src/worker.rs index 4e6e7d7d50..292a4aef2e 100644 --- a/backend/windmill-common/src/worker.rs +++ b/backend/windmill-common/src/worker.rs @@ -78,6 +78,11 @@ lazy_static::lazy_static! { static ref CUSTOM_TAG_REGEX: Regex = Regex::new(r"^(\w+)\(((?:\w+)\+?)+\)$").unwrap(); + pub static ref DISABLE_BUNDLING: bool = std::env::var("DISABLE_BUNDLING") + .ok() + .and_then(|x| x.parse::().ok()) + .unwrap_or(false); + } pub async fn make_suspended_pull_query(wc: &WorkerConfig) { @@ -232,7 +237,8 @@ pub fn get_annotation(inner_content: &str) -> Annotations { let native_mode: bool = annotations.contains(&"native".to_string()); //TODO: remove || npm_mode when bun build is more powerful - let nobundling: bool = annotations.contains(&"nobundling".to_string()) || nodejs_mode; + let nobundling: bool = + annotations.contains(&"nobundling".to_string()) || nodejs_mode || *DISABLE_BUNDLING; Annotations { npm_mode, nodejs_mode, native_mode, nobundling } }