EnxDev commented on code in PR #44082:
URL: https://github.com/apache/superset/pull/44082#discussion_r4110664924


##########
superset/dashboards/api.py:
##########
@@ -1854,14 +1874,10 @@ def export_xlsx(self, pk: int) -> WerkzeugResponse:
               $ref: '#/components/responses/404'
             500:
               $ref: '#/components/responses/500'
-            501:
-              description: Excel export is not configured on this server
         """
-        storage_config = current_app.config["EXPORT_STORAGE"]
-        if not storage_config.get("bucket") or storage_config.get("backend") 
is None:
-            return self.response(
-                501, message="Excel export is not configured on this server."
-            )
+        # Keep the request guards and two delivery paths together.
+        # Resolve the path once so its checks and delivery cannot diverge.
+        queued = is_export_storage_configured()

Review Comment:
   Good catch. With `CELERY_CONFIG = None`, we could still queue the export 
even though no worker was running. I changed the check so background export now 
requires both storage and Celery; otherwise it falls back to direct download. 
The bootstrap flag uses the same check, and tests cover both cases.
   
   I didn't add a live worker check because `control.ping()` would add a broker 
round trip/timeout on every export and page load, and it still wouldn't 
guarantee a worker is consuming. This matches how SQL Lab async, thumbnails, 
and reports behave today. I also updated the docs and `UPDATING`.
   



-- 
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