Skip to content

Commit

Permalink
improve test this step for flow tag overide
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Oct 29, 2024
1 parent 65551fc commit 94cf018
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
1 change: 0 additions & 1 deletion backend/windmill-worker/src/worker_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3761,7 +3761,6 @@ async fn script_to_payload(
module: &FlowModule,
tag_override: &Option<String>,
) -> Result<JobPayloadWithTag, Error> {
tracing::error!("{tag_override:?}");
let (payload, tag, delete_after_use, script_timeout) = if script_hash.is_none() {
let (jp, tag, delete_after_use, script_timeout) =
script_path_to_payload(script_path, db, &flow_job.workspace_id, Some(true)).await?;
Expand Down
21 changes: 12 additions & 9 deletions frontend/src/lib/components/ModulePreview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
getContext<FlowEditorContext>('FlowEditorContext')
// Test
let scriptProgress = undefined;
let scriptProgress = undefined
let testJobLoader: TestJobLoader
let testIsLoading = false
let testJob: Job | undefined = undefined
Expand All @@ -54,7 +54,7 @@
export async function runTest(args: any) {
// Not defined if JobProgressBar not loaded
if (jobProgressReset) jobProgressReset();
if (jobProgressReset) jobProgressReset()
const val = mod.value
// let jobId: string | undefined = undefined
Expand All @@ -75,7 +75,7 @@
script.content,
script.language,
args,
$flowStore?.tag ?? script.tag
$flowStore?.tag ?? val.tag_override ?? script.tag
)
} else if (val.type == 'flow') {
await testJobLoader?.abstractRun(() =>
Expand Down Expand Up @@ -103,8 +103,6 @@
let forceJson = false
</script>



<TestJobLoader
toastError={noEditor}
on:done={() => jobDone()}
Expand Down Expand Up @@ -158,9 +156,14 @@
/>
</Pane>
<Pane size={50} minSize={10} class="text-sm text-tertiary">
{#if scriptProgress}
<JobProgressBar job={testJob} bind:scriptProgress bind:reset={jobProgressReset} compact={true} />
{/if}
{#if scriptProgress}
<JobProgressBar
job={testJob}
bind:scriptProgress
bind:reset={jobProgressReset}
compact={true}
/>
{/if}
{#if testJob != undefined && 'result' in testJob && testJob.result != undefined}
<div class="break-words relative h-full p-2">
<DisplayResult
Expand All @@ -186,7 +189,7 @@
<div class="p-2">
{#if testIsLoading}
{#if !scriptProgress}
<Loader2 class="animate-spin" />
<Loader2 class="animate-spin" />
{/if}
{:else}
Test to see the result here
Expand Down

0 comments on commit 94cf018

Please sign in to comment.