diff --git a/backend/src/main.rs b/backend/src/main.rs index 87285e2ae1..29bea050ed 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -258,6 +258,15 @@ pub fn main() -> anyhow::Result<()> { } async fn cache_hub_scripts(file_path: Option) -> anyhow::Result<()> { + // The `cache` CLI mode never connects to the DB, so HUB_BASE_URL keeps its + // compiled default. Allow overriding it via env so the prebuild cache step can + // be pointed at a private/staging hub (e.g. a local proxy for testing). + if let Ok(hub_base_url) = std::env::var("HUB_BASE_URL") { + if !hub_base_url.is_empty() { + tracing::info!("Overriding hub base url from env: {hub_base_url}"); + windmill_common::HUB_BASE_URL.store(std::sync::Arc::new(hub_base_url)); + } + } let file_path = file_path.unwrap_or("./hubPaths.json".to_string()); let mut file = File::open(&file_path) .await @@ -567,6 +576,7 @@ fn print_help() { println!(" RUN_UPDATE_CA_CERTIFICATE_AT_START = false Run system CA update at startup"); println!(" RUN_UPDATE_CA_CERTIFICATE_PATH = /usr/sbin/update-ca-certificates Path to CA update tool"); println!(" SYNC_CACHED_RT = false Sync cached resource types to admins workspace on server start"); + println!(" HUB_BASE_URL = https://hub.windmill.dev Hub to fetch scripts from in `cache` mode (server/worker use the DB setting instead)"); println!(); println!("Notes:"); println!("- Advanced and less commonly used settings are managed via the database and are omitted here."); diff --git a/frontend/src/lib/hubPaths.json b/frontend/src/lib/hubPaths.json index 902a90c9d1..2ae15d931b 100644 --- a/frontend/src/lib/hubPaths.json +++ b/frontend/src/lib/hubPaths.json @@ -1,16 +1,16 @@ { "gitSyncTest": "hub/28184/git-repo-test-read-write-windmill", - "gitInitRepo": "hub/28219/git-sync%3A-init-repository-windmill", - "slackErrorHandler": "hub/19741/workspace-or-schedule-error-handler-slack", + "gitInitRepo": "hub/28229/git-sync%3A-init-repository-windmill", + "slackErrorHandler": "hub/28241/workspace-or-schedule-error-handler-slack", "emailErrorHandler": "hub/19795/workspace-or-error-handler-email", - "slackRecoveryHandler": "hub/9080/slack/schedule-recovery-handler-slack", - "slackSuccessHandler": "hub/28220/slack/schedule-success-handler-slack", + "slackRecoveryHandler": "hub/28239/slack/schedule-recovery-handler-slack", + "slackSuccessHandler": "hub/28240/slack/schedule-success-handler-slack", "teamsErrorHandler": "hub/19742/workspace-or-schedule-error-handler-teams", "teamsRecoveryHandler": "hub/11593/schedule-recovery-handler-teams", "teamsSuccessHandler": "hub/11596/schedule-success-handler-teams", "slackReport": "hub/9084/slack", "discordReport": "hub/9085/discord", - "smtpReport": "hub/9086/smtp", - "appReport": "hub/28076/app-report", + "smtpReport": "hub/28242/smtp", + "appReport": "hub/28243/app-report", "cloneRepoToS3forGitRepoViewer": "hub/28216/clone_repo_and_upload_to_instance_storage" }