gabotorresruiz commented on code in PR #43805:
URL: https://github.com/apache/superset/pull/43805#discussion_r3926714540


##########
superset/dashboards/api.py:
##########
@@ -1807,7 +1838,12 @@ def export_xlsx(self, pk: int) -> WerkzeugResponse:
         # otherwise) so the guard works across the web server and workers and 
is
         # not a no-op under the default cache. The task releases it when it
         # settles; the TTL is the backstop if that release is ever lost.
-        lock_params = export_lock_params(g.user.id, dashboard.id)
+        # A guest/embedded requester has no DB-backed user id (GuestUser 
carries
+        # no ``id`` attribute at all), so all guests share lock slot 0 for the
+        # dashboard; the task reconstructs the guest (with the token's RLS 
rules
+        # and resource claims) from the token payload passed alongside.
+        user_id = get_user_id()
+        lock_params = export_lock_params(user_id or 0, dashboard.id)

Review Comment:
   Fixed in 7bb2ce6f40: the lock slot is now derived from the guest token 
identity (username plus resources fingerprint, guest_lock_slot in the task 
module), computed identically at acquire and release, so concurrent guests 
throttle independently. Anonymous sessions still share slot 0 since they carry 
no identity to distinguish. Covered by unit and integration tests.



##########
docs/docs/using-superset/exporting-dashboard-data.mdx:
##########
@@ -9,16 +9,18 @@ version: 1
 
 Superset can export every chart on a dashboard to a single Excel workbook, with
 each chart's underlying data rendered as its own worksheet. The export reflects
-the dashboard's currently applied filters and runs asynchronously: when it
-finishes, the requesting user receives an email with a time-limited download
-link.
+the dashboard's currently applied filters and runs asynchronously: the page
+polls for completion and downloads the workbook automatically, and a logged-in
+user with an email address also receives a time-limited download link by email.
+Sessions with no email on file — embedded guest-token sessions and anonymous

Review Comment:
   Fixed in 7bb2ce6f40: the workbook itself now carries the Export Summary 
sheet listing skipped charts whenever any were skipped, not only when 
everything failed, so the information reaches every session regardless of 
email. Covered by test_partial_failure_appends_summary_sheet.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to