Add Run id as a parameter to the artifacts table (#2799)

Co-authored-by: Suchintan Singh <suchintansingh@gmail.com>
This commit is contained in:
Shuchang Zheng
2025-06-27 00:27:48 +09:00
committed by GitHub
parent a549e19f61
commit 43cab04454
12 changed files with 69 additions and 15 deletions

View File

@@ -2544,6 +2544,8 @@ class TaskV2Block(Block):
browser_session_id=browser_session_id,
)
finally:
context: skyvern_context.SkyvernContext | None = skyvern_context.current()
current_run_id = context.run_id if context and context.run_id else workflow_run_id
skyvern_context.set(
skyvern_context.SkyvernContext(
organization_id=organization_id,
@@ -2551,6 +2553,7 @@ class TaskV2Block(Block):
workflow_id=workflow_run.workflow_id,
workflow_permanent_id=workflow_run.workflow_permanent_id,
workflow_run_id=workflow_run_id,
run_id=current_run_id,
browser_session_id=browser_session_id,
max_screenshot_scrolling_times=workflow_run.max_screenshot_scrolling_times,
)

View File

@@ -177,6 +177,8 @@ class WorkflowService:
webhook_callback_url=workflow_request.webhook_callback_url,
max_screenshot_scrolling_times=workflow_request.max_screenshot_scrolling_times,
)
context: skyvern_context.SkyvernContext | None = skyvern_context.current()
current_run_id = context.run_id if context and context.run_id else workflow_run.workflow_run_id
skyvern_context.set(
SkyvernContext(
organization_id=organization.organization_id,
@@ -184,6 +186,8 @@ class WorkflowService:
request_id=request_id,
workflow_id=workflow_id,
workflow_run_id=workflow_run.workflow_run_id,
run_id=current_run_id,
workflow_permanent_id=workflow_run.workflow_permanent_id,
max_steps_override=max_steps_override,
max_screenshot_scrolling_times=workflow_request.max_screenshot_scrolling_times,
)