From 387d56e2ebdab085259e648f3077ec27c1d27da4 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Jul 2023 11:25:45 +0200 Subject: [PATCH] fix: global cache now cache symlinks --- backend/windmill-worker/src/global_cache.rs | 9 +++++++++ .../flows/content/FlowModuleComponent.svelte | 19 ++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/backend/windmill-worker/src/global_cache.rs b/backend/windmill-worker/src/global_cache.rs index 34493739d1..d9ee6278cc 100644 --- a/backend/windmill-worker/src/global_cache.rs +++ b/backend/windmill-worker/src/global_cache.rs @@ -50,6 +50,7 @@ pub async fn build_tar_and_push(bucket: &str, folder: String) -> error::Result<( &tar_path, &format!(":s3,env_auth=true:{bucket}/tar/pip/{folder_name}.tar"), "-v", + "--links", "--size-only", "--fast-list", "--s3-no-check-bucket", @@ -87,6 +88,7 @@ pub async fn pull_from_tar(bucket: &str, folder: String) -> error::Result<()> { &format!(":s3,env_auth=true:{bucket}/{tar_path}"), &target, "-v", + "--links", "--size-only", "--fast-list", ], @@ -146,6 +148,7 @@ pub async fn copy_cache_from_bucket(bucket: &str, tx: Sender<()>) -> error::Resu "copy", &format!(":s3,env_auth=true:{bucket}"), &ROOT_TMP_CACHE_DIR, + "--links", "--size-only", "--fast-list", "--filter", @@ -190,6 +193,7 @@ pub async fn copy_cache_to_bucket(bucket: &str) -> error::Result<()> { "copy", &ROOT_TMP_CACHE_DIR, &format!(":s3,env_auth=true:{bucket}"), + "--links", "--size-only", "--fast-list", "--filter", @@ -253,6 +257,7 @@ pub async fn copy_cache_to_bucket_as_tar(bucket: &str) { "copyto", &format!("{ROOT_TMP_CACHE_DIR}{TAR_CACHE_FILENAME}"), &format!(":s3,env_auth=true:{bucket}/{TAR_CACHE_FILENAME}"), + "--links", "-v", "--size-only", "--fast-list", @@ -293,6 +298,7 @@ pub async fn copy_denogo_cache_from_bucket_as_tar(bucket: &str) { "copyto", &format!(":s3,env_auth=true:{bucket}/{TAR_CACHE_FILENAME}"), &format!("{ROOT_TMP_CACHE_DIR}{TAR_CACHE_FILENAME}"), + "--links", "-v", "--size-only", "--fast-list", @@ -349,6 +355,7 @@ pub async fn copy_all_piptars_from_bucket(bucket: &str) { "copy", &format!(":s3,env_auth=true:{bucket}/tar/pip/"), &TAR_PIP_TMP_CACHE_DIR, + "--links", "-v", "--size-only", "--fast-list", @@ -390,6 +397,7 @@ pub async fn copy_tmp_cache_to_cache() -> error::Result<()> { "sync", ROOT_TMP_CACHE_DIR, ROOT_CACHE_DIR, + "--links", "--filter", "- deno/gen/file/**", "--filter", @@ -482,6 +490,7 @@ pub async fn copy_cache_to_tmp_cache() -> error::Result<()> { "sync", ROOT_CACHE_DIR, ROOT_TMP_CACHE_DIR, + "--links", "--filter", "- deno/gen/file/**", "--filter", diff --git a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte index b1423df518..aebe82f0c5 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte @@ -267,9 +267,7 @@ Retries {#if !$selectedId.includes('failure')} Cache - {#if flowModule.value.type == 'rawscript'} - Concurrency - {/if} + Concurrency Early Stop/Break Suspend/Approval Sleep @@ -299,13 +297,13 @@ {:else if advancedSelected === 'concurrency'} +
+

+ Concurrency Limits + Allowed concurrency within a given timeframe +

+
{#if flowModule.value.type == 'rawscript'} -
-

- Concurrency Limits - Allowed concurrency within a given timeframe -

-
Max number of executions within the time window
Time window in seconds
+ {:else} + The concurrency limit of a workspace script is only settable in the script + metadata itself. For hub scripts, this feature is non available yet. {/if} {:else if advancedSelected === 'same_worker'}