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/08/25 01:50:07 UTC

(superset) branch feat/excel-export-gcs-support updated: refactor(dashboard): rename backend local variable to storage_backend

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

eschutho pushed a commit to branch feat/excel-export-gcs-support
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/feat/excel-export-gcs-support by this push:
     new e4ca7329791 refactor(dashboard): rename backend local variable to storage_backend
e4ca7329791 is described below

commit e4ca7329791ac6cbf186547c2249acd2af681880
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Tue Aug 25 01:49:46 2026 +0000

    refactor(dashboard): rename backend local variable to storage_backend
    
    Plain "backend" reads ambiguously next to the dict key of the same name;
    storage_backend matches what it actually holds.
---
 superset/dashboards/api.py               | 6 +++---
 superset/tasks/export_dashboard_excel.py | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py
index fc7d88ed269..e147c53679d 100644
--- a/superset/dashboards/api.py
+++ b/superset/dashboards/api.py
@@ -1944,9 +1944,9 @@ class DashboardRestApi(
         if resolved is None:
             return self.response(410, message="This download link has expired.")
         bucket, key = resolved
-        backend = current_app.config["EXCEL_EXPORT_STORAGE"].get("backend")
-        if backend is not None:
-            download_url = backend.generate_download_url(
+        storage_backend = current_app.config["EXCEL_EXPORT_STORAGE"].get("backend")
+        if storage_backend is not None:
+            download_url = storage_backend.generate_download_url(
                 bucket, key, PRESIGNED_URL_TTL_SECONDS
             )
         else:
diff --git a/superset/tasks/export_dashboard_excel.py b/superset/tasks/export_dashboard_excel.py
index 9a6fc4cca2f..3a98acbc5ee 100644
--- a/superset/tasks/export_dashboard_excel.py
+++ b/superset/tasks/export_dashboard_excel.py
@@ -453,9 +453,9 @@ def _upload_export_file(tmp_path: str, bucket: str, key: str) -> None:
     """Upload the generated workbook via EXCEL_EXPORT_STORAGE's "backend" if
     configured (e.g. a GCS backend for a deployment whose bucket isn't S3),
     else the built-in boto3/S3 helper."""
-    backend = current_app.config["EXCEL_EXPORT_STORAGE"].get("backend")
-    if backend is not None:
-        backend.upload_file(tmp_path, bucket, key)
+    storage_backend = current_app.config["EXCEL_EXPORT_STORAGE"].get("backend")
+    if storage_backend is not None:
+        storage_backend.upload_file(tmp_path, bucket, key)
     else:
         s3.upload_file_to_s3(tmp_path, bucket, key)