attempt to allow nested blocks in the debugger (#3060)
Some checks are pending
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run

This commit is contained in:
Jonathan Dobson 2025-07-30 08:37:45 -04:00 committed by GitHub
parent 0adc3078ed
commit 815fb28141
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 3 deletions

View file

@ -63,6 +63,7 @@ from skyvern.forge.sdk.workflow.models.block import (
UrlBlock,
ValidationBlock,
WaitBlock,
get_all_blocks,
)
from skyvern.forge.sdk.workflow.models.parameter import (
PARAMETER_TYPE,
@ -330,12 +331,12 @@ class WorkflowService:
)
return workflow_run
all_blocks = workflow.workflow_definition.blocks
top_level_blocks = workflow.workflow_definition.blocks
all_blocks = get_all_blocks(top_level_blocks)
if block_labels and len(block_labels):
blocks: list[BlockTypeVar] = []
all_labels = {block.label: block for block in all_blocks}
for label in block_labels:
if label not in all_labels:
raise BlockNotFound(block_label=label)
@ -350,7 +351,7 @@ class WorkflowService:
)
else:
blocks = all_blocks
blocks = top_level_blocks
if not blocks:
raise SkyvernException(f"No blocks found for the given block labels: {block_labels}")