You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2026/06/15 23:51:07 UTC

(superset) 01/01: fix(reports): commit permalink before Playwright navigates to tab URL

This is an automated email from the ASF dual-hosted git repository.

eschutho pushed a commit to branch fix-report-tab-permalink-commit
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 9058b49971eea1ca9e8203ece5ebb770b0e8e278
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Mon Jun 15 23:50:30 2026 +0000

    fix(reports): commit permalink before Playwright navigates to tab URL
    
    CreateDashboardPermalinkCommand only flushes the INSERT when invoked
    inside an outer @transaction() (the nesting guard skips the commit).
    The row is therefore not visible to Playwright's separate DB connection,
    causing dashboard_permalink to return a 404, the <body class="standalone">
    element to never appear, and the screenshot to time out after 600s.
    
    Commit immediately after CreateDashboardPermalinkCommand.run() returns,
    matching the pattern already used by create_log() in the same class.
    
    Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
 superset/commands/report/execute.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/superset/commands/report/execute.py b/superset/commands/report/execute.py
index fa5fb9422bd..64372f446c7 100644
--- a/superset/commands/report/execute.py
+++ b/superset/commands/report/execute.py
@@ -358,6 +358,11 @@ class BaseReportState:
             dashboard_id=str(self._report_schedule.dashboard.uuid),
             state=dashboard_state,
         ).run()
+        # Commit the permalink immediately so Playwright's separate DB connection
+        # can resolve the URL. CreateDashboardPermalinkCommand only flushes when
+        # called inside an outer @transaction(), leaving the row invisible to
+        # other connections until we explicitly commit here.
+        db.session.commit()  # pylint: disable=consider-using-transaction
 
         return get_url_path(
             "Superset.dashboard_permalink",