Skip to content

Commit 44c5972

Browse files
committed
fix: align for snakedispatch endpoint
1 parent a0fe0f9 commit 44c5972

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

frontend/app/src/routes/runs/[id]/+page.svelte

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,10 @@
311311
<Skeleton class="h-96 w-full rounded-lg" />
312312
{:else if run}
313313
<!-- Run header -->
314-
<div class="bg-card rounded-lg border border-border {run.status === 'FAILED' || run.status === 'ERROR' ? 'border-b-2 border-b-destructive' : ''} p-6 mb-4">
314+
<div class="bg-card rounded-lg border border-border p-6 mb-4">
315315
<!-- Row 1: Identity & Actions -->
316316
<div class="flex items-center gap-3 mb-3">
317317
<StatusCell {run} />
318-
{#if run.exit_code !== null && run.exit_code !== undefined && run.exit_code !== 0}
319-
<span class="inline-flex items-center rounded-md bg-destructive/10 px-2 py-0.5 text-xs font-medium text-destructive ring-1 ring-inset ring-destructive/20">
320-
exit {run.exit_code}
321-
</span>
322-
{/if}
323318
<div class="min-w-0">
324319
{#if configDisplay && workflowDisplay}
325320
<p class="text-xs text-muted-foreground truncate">{workflowDisplay}</p>

src/pypsa_app/backend/api/routes/runs.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ def create_run(
123123
if client is None:
124124
raise HTTPException(503, "Backend is not available")
125125

126-
payload = body.model_dump(exclude_none=True, exclude={"backend_id"})
126+
payload = body.model_dump(
127+
exclude_none=True,
128+
exclude={"backend_id", "import_networks", "cache"},
129+
)
130+
if body.cache:
131+
payload["cache_key"] = body.cache.key
132+
payload["cache_dirs"] = body.cache.dirs
127133
result = client.submit_job(payload)
128134

129135
run = Run(

src/pypsa_app/backend/schemas/run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class RunCreate(BaseModel):
3939
"""POST /runs request body."""
4040

4141
workflow: str
42+
git_ref: str | None = None
4243
configfile: str | None = None
4344
snakemake_args: list[str] | None = None
4445
extra_files: dict[str, str] | None = None

0 commit comments

Comments
 (0)