fix: global cache now cache symlinks

This commit is contained in:
Ruben Fiszel
2023-07-14 11:25:45 +02:00
parent 8b40001f2a
commit 387d56e2eb
2 changed files with 19 additions and 9 deletions

View File

@@ -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",

View File

@@ -267,9 +267,7 @@
<Tab value="retries">Retries</Tab>
{#if !$selectedId.includes('failure')}
<Tab value="cache">Cache</Tab>
{#if flowModule.value.type == 'rawscript'}
<Tab value="concurrency">Concurrency</Tab>
{/if}
<Tab value="concurrency">Concurrency</Tab>
<Tab value="early-stop">Early Stop/Break</Tab>
<Tab value="suspend">Suspend/Approval</Tab>
<Tab value="sleep">Sleep</Tab>
@@ -299,13 +297,13 @@
<FlowModuleMock bind:flowModule />
</div>
{:else if advancedSelected === 'concurrency'}
<div>
<h2 class="pb-4">
Concurrency Limits
<Tooltip>Allowed concurrency within a given timeframe</Tooltip>
</h2>
</div>
{#if flowModule.value.type == 'rawscript'}
<div>
<h2 class="pb-4">
Concurrency Limits
<Tooltip>Allowed concurrency within a given timeframe</Tooltip>
</h2>
</div>
<div>
<div class="text-xs font-bold !mt-2"
>Max number of executions within the time window</div
@@ -326,6 +324,9 @@
<div class="text-xs font-bold !mt-2">Time window in seconds</div>
<SecondsInput bind:seconds={flowModule.value.concurrency_time_window_s} />
</div>
{: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'}
<div>