From 15573836ce8147aeca7ac0c9f8911b5a37ae2249 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Sat, 14 Jun 2025 01:44:39 -0700 Subject: [PATCH] use run_id for fullpage screenshot flag (#2717) --- skyvern/forge/agent.py | 6 ++++-- skyvern/forge/sdk/workflow/models/block.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/skyvern/forge/agent.py b/skyvern/forge/agent.py index 73ffd6fe..cb8ce0ef 100644 --- a/skyvern/forge/agent.py +++ b/skyvern/forge/agent.py @@ -1666,7 +1666,8 @@ class ForgeAgent: scrolling_number=scrolling_number, use_playwright_fullpage=app.EXPERIMENTATION_PROVIDER.is_feature_enabled_cached( "ENABLE_PLAYWRIGHT_FULLPAGE", - str(task.organization_id), + task.workflow_run_id or task.task_id, + properties={"organization_id": task.organization_id}, ), ) await app.ARTIFACT_MANAGER.create_artifact( @@ -2151,7 +2152,8 @@ class ForgeAgent: screenshot = await browser_state.take_fullpage_screenshot( use_playwright_fullpage=app.EXPERIMENTATION_PROVIDER.is_feature_enabled_cached( "ENABLE_PLAYWRIGHT_FULLPAGE", - str(task.organization_id), + task.workflow_run_id or task.task_id, + properties={"organization_id": task.organization_id}, ) ) await app.ARTIFACT_MANAGER.create_artifact( diff --git a/skyvern/forge/sdk/workflow/models/block.py b/skyvern/forge/sdk/workflow/models/block.py index ed16d452..f3684a61 100644 --- a/skyvern/forge/sdk/workflow/models/block.py +++ b/skyvern/forge/sdk/workflow/models/block.py @@ -310,7 +310,8 @@ class Block(BaseModel, abc.ABC): screenshot = await browser_state.take_fullpage_screenshot( use_playwright_fullpage=app.EXPERIMENTATION_PROVIDER.is_feature_enabled_cached( "ENABLE_PLAYWRIGHT_FULLPAGE", - str(organization_id), + workflow_run_id, + properties={"organization_id": str(organization_id)}, ) ) if screenshot: @@ -580,7 +581,8 @@ class BaseTaskBlock(Block): screenshot = await browser_state.take_fullpage_screenshot( use_playwright_fullpage=app.EXPERIMENTATION_PROVIDER.is_feature_enabled_cached( "ENABLE_PLAYWRIGHT_FULLPAGE", - str(organization_id), + workflow_run_id, + properties={"organization_id": str(organization_id)}, ) ) if screenshot: