mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-07-09 16:09:13 +00:00
Fix infinite script regeneration loop for traditional caching workflows (#4951)
This commit is contained in:
parent
2dd86a5c0b
commit
b952468fd7
1 changed files with 6 additions and 0 deletions
|
|
@ -2036,6 +2036,12 @@ class WorkflowService:
|
|||
and block.label not in script_blocks_by_label
|
||||
and workflow_run_block_result.status in cacheable_statuses
|
||||
and block.block_type in BLOCK_TYPES_THAT_SHOULD_BE_CACHED
|
||||
# For traditional caching (adaptive_caching=False), only track blocks
|
||||
# for regeneration when actually running with code. Agent-mode runs
|
||||
# should not trigger regeneration — doing so creates an infinite loop
|
||||
# where every run deletes and regenerates the script because blocks
|
||||
# always execute via agent and are never in script_blocks_by_label.
|
||||
and (workflow.adaptive_caching or is_script_run)
|
||||
):
|
||||
blocks_to_update.add(block.label)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue