You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Dhruvin4530 (via GitHub)" <gi...@apache.org> on 2026/05/12 14:55:31 UTC

[D] Issue while downloading superset dashboard as image [superset]

GitHub user Dhruvin4530 created a discussion: Issue while downloading superset dashboard as image

Issues while trying to download a dashboard as image on SS, I click on Download as image and this message keeps triggering but doesn't download it ever, I've tried refreshing the dashboard, loading again, and hasn't work yet. (Not working from anyone from SOC )
```
The screenshot is being generated. Please, do not leave the page.
```
<img width="544" height="66" alt="image" src="https://github.com/user-attachments/assets/29e6beef-751b-4608-9abb-5b6c2ffa8c76" />

@dosu Please help 

GitHub link: https://github.com/apache/superset/discussions/40066

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "Dhruvin4530 (via GitHub)" <gi...@apache.org>.
GitHub user Dhruvin4530 added a comment to the discussion: Issue while downloading superset dashboard as image

@dosu 

```
[dhruvinsoni@Dhruvins-MacBook-Pro ~ (⎈|dev-use2-acgpk8seks-cluster:N/A)]$ k get pods -n superset-blue
                   NAME                                   READY   STATUS    RESTARTS   AGE
superset-7959c5784b-sbrjw              1/1     Running   0          3m23s
superset-celerybeat-77f7c85d9d-ngjz9   1/1     Running   0          3m53s
superset-worker-9586494d-9d9wc         1/1     Running   0          36m
superset-worker-9586494d-hwg94         1/1     Running   0          33m
superset-worker-9586494d-lv6jr         1/1     Running   0          168m
superset-worker-9586494d-sfk2f         1/1     Running   0          5m26s
superset-worker-9586494d-zjq56         1/1     Running   0          17m
superset-worker-9586494d-zkwtp         1/1     Running   0          3m53s
[dhruvinsoni@Dhruvins-MacBook-Pro ~ (⎈|dev-use2-acgpk8seks-cluster:N/A)]$                    
```

```

# Enables endpoints to cache and retrieve dashboard screenshots via webdriver.
--
"ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": True,
# Generate screenshots (PDF/JPG) of dashboards using web driver.
"ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": True,
```

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894002

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Issue while downloading superset dashboard as image

<!-- Answer -->
This is a commonly reported issue with the dashboard screenshot/image download feature. The message stays indefinitely because the backend screenshot generation is failing silently. Here are the most likely causes and fixes:

**1. Celery worker not running or misconfigured**

The screenshot feature works asynchronously — a Celery task captures the screenshot using a headless browser. If Celery isn't running or isn't properly connected to Redis, the task never completes [[1]](https://github.com/apache/superset/issues/37491).

Make sure you have:

```python
# superset_config.py
class CeleryConfig:
    broker_url = "redis://127.0.0.1:6379/0"
    result_backend = "redis://127.0.0.1:6379/1"

THUMBNAIL_CACHE_CONFIG = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_REDIS_URL": "redis://127.0.0.1:6379/0",
    "CACHE_DEFAULT_TIMEOUT": 604800,
}
```

**2. Required feature flags not enabled**

Ensure these are set [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L481-L489):

```python
DEFAULT_FEATURE_FLAGS = {
    "THUMBNAILS": True,
    "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": True,
    "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": True,
}
```

**3. Authentication failure in the headless browser**

The WebDriver authenticates as a configured user (usually "admin"). If that account is inactive or doesn't have access to the dashboard, the screenshot silently fails [[3]](https://github.com/apache/superset/discussions/36161). Verify that `THUMBNAIL_SELENIUM_USER` is set to an active user with proper permissions.

**4. Timeout — dashboard too heavy**

If your dashboard has many charts, the headless browser may time out before everything loads. Try increasing timeouts [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L754-L777):

```python
SCREENSHOT_LOCATE_WAIT = 100
SCREENSHOT_LOAD_WAIT = 600
```

**5. Control characters in dashboard title**

If your dashboard title was copy-pasted from an external source, it may contain hidden control characters that crash the headless browser [[5]](https://github.com/apache/superset/pull/39294). Try manually retyping the title.

**Troubleshooting steps:**

1. Check your Superset logs for any WebDriver/Selenium/Playwright errors
2. Confirm your Celery worker is running (`celery -A superset.tasks.celery_app:app worker`)
3. Confirm Redis is reachable
4. Test with a simple dashboard (1-2 charts) to isolate whether it's a configuration or dashboard-specific issue

Which version of Superset are you running, and are you using Docker or a custom deployment? That would help narrow things down further.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=28bb9314-09c3-42e1-ae49-0a8e98ea626f) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Im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gwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16893947

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Issue while downloading superset dashboard as image

<!-- Answer -->
I can see the issue — your `THUMBNAIL_CACHE_CONFIG` is **commented out**:

```python
# THUMBNAIL_CACHE_CONFIG = {
#     "CACHE_TYPE": "redis",
#     "CACHE_DEFAULT_TIMEOUT": 24 * 60 * 60 * 30,
#     "CACHE_KEY_PREFIX": "thumbnail_",
#     "CACHE_NO_NULL_WARNING": True,
#     "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
# }
```

Without `THUMBNAIL_CACHE_CONFIG`, the screenshot result has nowhere to be stored/retrieved from, so the frontend polls indefinitely and never gets the image back.

**Uncomment and enable it:**

```python
THUMBNAIL_CACHE_CONFIG = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_DEFAULT_TIMEOUT": 24 * 60 * 60 * 30,
    "CACHE_KEY_PREFIX": "thumbnail_",
    "CACHE_NO_NULL_WARNING": True,
    "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
}
```

Also make sure the `THUMBNAILS` feature flag is enabled in your `DEFAULT_FEATURE_FLAGS` (I don't see it in the config you shared):

```python
DEFAULT_FEATURE_FLAGS = {
    "THUMBNAILS": True,
    "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": True,
    "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": True,
}
```

One other thing to verify — your `THUMBNAIL_SELENIUM_USER` is set to `"Admin"`. Make sure this exact username (case-sensitive) exists and is active in your Superset instance. If your admin user is lowercase `"admin"`, you'll need to update it accordingly.

After making these changes, redeploy and try the download again. If it still hangs, check the worker logs (`kubectl logs -f <worker-pod> -n superset-blue`) for any Selenium/Chrome errors — for example, if Chromium isn't installed in the worker container image, the task will fail silently.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=71f844f0-7a4b-4a9b-b6cd-4d09f11c6f50) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuNTY2TDE5LjYyOTYgNzEuNzg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5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894024

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "Dhruvin4530 (via GitHub)" <gi...@apache.org>.
GitHub user Dhruvin4530 added a comment to the discussion: Issue while downloading superset dashboard as image

@dosu What if I am downloading the dashboard for the first time?

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894089

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Issue while downloading superset dashboard as image

<!-- Answer -->
You've reached the anonymous usage limit of `10` interactions per month. Your usage will reset on `2026-06-01`. If you'd like to use Dosu before then, please [register](https://app.dosu.dev/login?referrer=from-anonymous-rate-limit) to increase your limit to `100` interactions per month for free.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=ee147f1f-c15a-4ad6-9dfd-d961442d2600) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgM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IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894090

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Issue while downloading superset dashboard as image

<!-- Answer -->
Good — your Celery workers and celerybeat are running, and the feature flags look correct. Since the infrastructure is up, the issue is likely happening *during* the screenshot generation itself. Here's what to check next:

**1. Check the worker logs for errors**

The screenshot task runs on one of those `superset-worker` pods. Check their logs when you trigger the download:

```bash
kubectl logs -f superset-worker-9586494d-9d9wc -n superset-blue
```

Look for errors related to Selenium/Playwright, timeouts, or authentication failures.

**2. Verify `THUMBNAIL_CACHE_CONFIG` uses Redis (not NullCache)**

If the cache backend is `NullCache` or SQLite, the screenshot will be generated but never stored/retrieved, causing the frontend to poll forever. Make sure it's pointing to Redis:

```python
THUMBNAIL_CACHE_CONFIG = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_REDIS_URL": "redis://<your-redis-host>:6379/0",
    "CACHE_DEFAULT_TIMEOUT": 604800,
}
```

**3. Verify the WebDriver/Playwright setup**

The worker pods need access to a headless browser (Chromium/Firefox). If the browser binary isn't installed in the worker container image, the task will fail silently. Check that:

- If using Selenium: `geckodriver` (Firefox) or `chromedriver` (Chrome) is installed in the worker image
- If using Playwright: `playwright install chromium` has been run in the image, and `PLAYWRIGHT_REPORTS_AND_THUMBNAILS = True` is set

**4. Confirm `THUMBNAIL_SELENIUM_USER`**

Make sure this is set to an active Superset user that has access to the dashboard being exported. If the headless browser can't authenticate, the screenshot hangs and times out.

The worker logs should reveal the root cause — could you share any errors you see there?


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=5706c1ca-9d67-42b6-9ef8-824d6b179a83) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhla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TlWNy42MTUzMlpNNDIuNTgwNSA3LjYxNTMySDQ3LjgwMTNWLTYuNTc5MTlINDIuNTgwNVY3LjYxNTMyWk00MC43MDQgNy42MTUzMkg0Mi41ODA1Vi02LjU3OTE5SDQwLjcwNFY3LjYxNTMyWiIgZmlsbD0iYmxhY2siIG1hc2s9InVybCgjZG9zdS1kLWN1dG91dCkiLz48cGF0aCBkPSJNNjguOTIxNSAzNi4wMTM1QzY4LjkyMTUgMzYuMDEzNSA2NS43MzY5IDQ5LjQ3MzggNTEuNDIzMSA0OS40NzM4QzM3LjEwOTMgNDkuNDczOCAzMi41Nzg3IDM3LjM1OTYgMzIuNTc4NyAzNi4wMTM1IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjcuNjkxNjEi
 IHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894012

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "Dhruvin4530 (via GitHub)" <gi...@apache.org>.
GitHub user Dhruvin4530 added a comment to the discussion: Issue while downloading superset dashboard as image

@dosu What if I am downloading the dashboard for the first time?

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894059

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Issue while downloading superset dashboard as image

<!-- Answer -->
This configuration tells Superset **where and how to store generated dashboard screenshots/thumbnails**. Here's what each key does:

- **`CACHE_TYPE: "RedisCache"`** — Use Redis as the storage backend for thumbnails.
- **`CACHE_DEFAULT_TIMEOUT: 24 * 60 * 60 * 30`** — Cached screenshots expire after 30 days (2,592,000 seconds).
- **`CACHE_KEY_PREFIX: "thumbnail_"`** — All thumbnail cache keys in Redis will be prefixed with `thumbnail_` to avoid collisions with other cached data.
- **`CACHE_NO_NULL_WARNING: True`** — Suppresses warnings when a cache lookup returns `None` (i.e., no cached thumbnail found yet).
- **`CACHE_REDIS_URL: redis_url(REDIS_RESULTS_DB)`** — Points to your Redis instance using the connection URL built from your environment variables.

**Why it matters for your issue:** When you click "Download as image," the Celery worker generates the screenshot and stores it in this cache. The frontend then polls to retrieve it. Without this config enabled, the screenshot has nowhere to be saved, so the frontend polls forever and never gets the image — which is exactly the behavior you're seeing.

Uncomment this block in your config, redeploy, and the download should work (assuming Chrome is installed in the worker container).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=3989505c-bce6-4157-b120-d89adb752fde) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIg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MjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894049

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Issue while downloading superset dashboard as image

<!-- Answer -->
You've reached the anonymous usage limit of `10` interactions per month. Your usage will reset on `2026-06-01`. If you'd like to use Dosu before then, please [register](https://app.dosu.dev/login?referrer=from-anonymous-rate-limit) to increase your limit to `100` interactions per month for free.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=5b6d4a15-19e8-4838-82be-cb1e41772f0d) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC45ODU2MyA4NS4zNjUyIDUuODQ3MDUg
 ODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjQyODQ0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48bWFzayBpZD0iZG9zdS1kLWN1dG91dCIgZmlsbD0id2hpdGUiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2Rk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ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894068

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "Dhruvin4530 (via GitHub)" <gi...@apache.org>.
GitHub user Dhruvin4530 added a comment to the discussion: Issue while downloading superset dashboard as image

@dosu 

```
"""This file contains Superset specific config
https://github.com/apache/superset/blob/master/superset/config.py
"""

import os
import re
import logging
from typing import (
    Callable,
    List,
    Union,
)
from datetime import timedelta
import flask_login
from cachelib.redis import RedisCache
from superset.superset_typing import CacheConfig
from celery.schedules import crontab
from flask import g

logger = logging.getLogger()


def get_env_variable(var_name, default=None):
    """Get the environment variable or raise exception."""
    try:
        return os.environ[var_name]
    except KeyError:
        if default is not None:
            return default
        else:
            error_msg = "The environment variable {} was missing, abort...".format(
                var_name
            )
            raise EnvironmentError(error_msg)


def redis_url(db: int = 0) -> str:
    """Returns correct redis url string based from python environment variables"""
    if REDIS_PASSWORD:
        if REDIS_TLS_ENABLED:
            # AWS ElastiCache for Redis uses TLS when using a password to access the cluster
            return f"rediss://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/{db}?ssl_cert_reqs=none"
        else:
            # For password access to k8s Redis pod
            return f"redis://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/{db}"
    return f"redis://{REDIS_HOST}:{REDIS_PORT}/{db}"


# If enabled, it can be used to store the results of long-running queries
# in SQL Lab by using the "Run Async" button/feature
REDIS_PORT = get_env_variable("REDIS_PORT")
REDIS_RESULTS_DB = get_env_variable("REDIS_RESULTS_DB")
REDIS_CELERY_DB = get_env_variable("REDIS_CELERY_DB")
REDIS_HOST = get_env_variable("REDIS_HOST")
REDIS_PASSWORD = get_env_variable("REDIS_PASSWORD", None)
REDIS_TLS_ENABLED = get_env_variable("REDIS_TLS_ENABLED", False)

# For backward compatibility with existing deployments, keep as 'md5'
HASH_ALGORITHM = "md5"

# data-squad-requests
SLACK_APP_DATA_REQUESTS_URL = (
    "https://arkoselabs.slack.com/app_redirect?channel=C025WAM95NU"
)
SUPERSET_USER_GUIDE_URL = "https://arkoselabs.atlassian.net/wiki/spaces/DATA/pages/2062025541/Superset+User+Guide"
# The link to a page containing common errors and their resolutions
# It will be appended at the bottom of sql_lab errors.
TROUBLESHOOTING_LINK = get_env_variable(
    "TROUBLESHOOTING_LINK",
    "https://arkoselabs.atlassian.net/wiki/spaces/DATA/pages/1987674206/Discover+Data",
)
# This link should lead to a page with instructions on how to gain access to a
# Datasource. It will be placed at the bottom of permissions errors.
PERMISSION_INSTRUCTIONS_LINK = get_env_variable(
    "PERMISSION_INSTRUCTIONS_LINK", SLACK_APP_DATA_REQUESTS_URL
)
# Send user to a link where they can report bugs
BUG_REPORT_URL = get_env_variable("BUG_REPORT_URL", SUPERSET_USER_GUIDE_URL)

WEB_SERVER_HOST_URL = get_env_variable("WEB_SERVER_HOST_URL", "localhost:8088")
WEB_SERVER_FQDN = get_env_variable("WEB_SERVER_FQDN", "localhost:8088")
HOST_DOMAIN_NAME = get_env_variable("HOST_DOMAIN_NAME")

IMAGE_TAG = get_env_variable("IMAGE_TAG", "DEV")
ROW_LIMIT = get_env_variable("ROW_LIMIT", 5000)
FILTER_SELECT_ROW_LIMIT = get_env_variable("FILTER_SELECT_ROW_LIMIT", 1000)
SAMPLES_ROW_LIMIT = get_env_variable("SAMPLES_ROW_LIMIT", 20)

# Set this to `False` as it was causing issues with async redis task queue reads?
WTF_CSRF_ENABLED = False
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []
# A CSRF token that expires in 1 year
WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365

SUPERSET_DB_USER = get_env_variable("SUPERSET_DB_USER")
SUPERSET_DB_PASS = get_env_variable("SUPERSET_DB_PASS")
SUPERSET_DB_HOST = get_env_variable("SUPERSET_DB_HOST")
SUPERSET_DB_NAME = get_env_variable("SUPERSET_DB_NAME")
ENVIRONMENT = get_env_variable("ENVIRONMENT", "docker")

SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{SUPERSET_DB_USER}:{SUPERSET_DB_PASS}@{SUPERSET_DB_HOST}/{SUPERSET_DB_NAME}"
FLASK_ENV = ENVIRONMENT

SUPERSET_WEBSERVER_TIMEOUT = 300
DEFAULT_RELATIVE_START_TIME = "now"
DEFAULT_RELATIVE_END_TIME = "now"

# Use all X-Forwarded headers when ENABLE_PROXY_FIX is True.
ENABLE_PROXY_FIX = True
# When proxying to a different port, set "x_port" to 0 to avoid downstream issues.
PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 0}

# Configuration for scheduling queries from SQL Lab.
# SCHEDULED_QUERIES: Dict[str, Any] = {}

# ------------------------------
# GLOBALS FOR APP Builder
# ------------------------------
APP_NAME = f"Superset-{ENVIRONMENT[0].capitalize()}{ENVIRONMENT[1:]}-{IMAGE_TAG}"

# Specify the App icon
# `String with relative app icon location`
APP_ICON = "/static/assets/images/superset-logo-horiz-arkose2.png"

# Specify where clicking the logo would take the user
# e.g. setting it to '/' would take the user to '/superset/welcome/'
LOGO_TARGET_PATH = None

# Specify tooltip that should appear when hovering over the App Icon/Logo
LOGO_TOOLTIP = APP_NAME


def get_logo_right_text() -> str:
    not_interesting_roles = ["sql_lab", "Gamma", "Alpha", "granter"]
    role_text = ""
    if flask_login.current_user.is_authenticated:
        for role in g.user.roles:
            if str(role) in not_interesting_roles:
                continue
            role_text = str(role)
            break
    return role_text


# Specify any text that should appear to the right of the logo
LOGO_RIGHT_TEXT: Union[Callable[[], str], str] = get_logo_right_text

# Enables SWAGGER UI for superset openapi spec
# ex: http://localhost:8080/swagger/v1
FAB_API_SWAGGER_UI = True

# THEME_OVERRIDES is used for adding custom theme to superset
# example code for "My theme" custom scheme
# THEME_OVERRIDES = {
#     "borderRadius": 4,
#     "colors": {
#         "primary": {
#             "base": "50b95d",  # Arkose Green
#         },
#         "secondary": {
#             "base": "663db9",  # Purple
#         },
#         "grayscale": {
#             "base": "647a8b",  # Grey
#         },
#     },
# }

# Console Log Settings
LOG_FORMAT = "%(asctime)s:%(levelname)s:%(name)s:%(message)s"
# LOG_LEVEL = DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL = get_env_variable("LOG_LEVEL", "INFO")

# Custom logger for auditing queries. This can be used to send ran queries to a
# structured immutable store for auditing purposes. The function is called for
# every query ran, in both SQL Lab and charts/dashboards.
# def QUERY_LOGGER(
#     database,
#     query,
#     schema=None,
#     user=None,  # TODO(john-bodley): Deprecate in 3.0.
#     client=None,
#     security_manager=None,
#     log_params=None,
# ):
#     pass
QUERY_LOGGER = None

# Timeout duration for SQL Lab synchronous queries
SQLLAB_TIMEOUT = int(timedelta(seconds=3600).total_seconds())

# Timeout duration for SQL Lab query validation
SQLLAB_VALIDATION_TIMEOUT = int(timedelta(seconds=10).total_seconds())

# SQLLAB_DEFAULT_DBID
SQLLAB_DEFAULT_DBID = get_env_variable("SQLLAB_DEFAULT_DBID", 1)

# The MAX duration a query can run for before being killed by celery.
SQLLAB_ASYNC_TIME_LIMIT_SEC = int(timedelta(seconds=3600).total_seconds())

# https://redis.readthedocs.io/en/stable/examples/ssl_connection_examples.html#SSL-Connection-Examples
RESULTS_BACKEND = RedisCache(
    host=REDIS_HOST,
    port=REDIS_PORT,
    db=REDIS_RESULTS_DB,
    key_prefix="async_results",
    password=REDIS_PASSWORD,
    ssl=REDIS_TLS_ENABLED,
    ssl_cert_reqs="none",
)

# Default celery config is to use SQLA as a broker, in a production setting
# you'll want to use a proper broker as specified here:
# http://docs.celeryproject.org/en/latest/getting-started/brokers/index.html


class CeleryConfig:
    broker_url = redis_url(REDIS_CELERY_DB)
    imports = (
        "superset.sql_lab",
        "superset.tasks",
    )
    result_backend = redis_url(REDIS_RESULTS_DB)
    worker_log_level = LOG_LEVEL
    worker_prefetch_multiplier = 5
    worker_max_tasks_per_child = 5
    worker_max_memory_per_child = 24000  # 24MB
    task_send_sent_event = True
    task_acks_late = True
    task_annotations = {
        "sql_lab.get_sql_results": {
            "rate_limit": "100/s",
        },
        "email_reports.send": {
            "rate_limit": "1/s",
            "time_limit": 120,
            "soft_time_limit": 150,
            "ignore_result": True,
        },
    }
    beat_schedule = {
        # Enable Alerts
        "reports.scheduler": {
            "task": "reports.scheduler",
            "schedule": crontab(minute="*", hour="*"),
        },
        "reports.prune_log": {
            "task": "reports.prune_log",
            "schedule": crontab(minute=0, hour=0),
        },
        "cache-warmup-hourly": {
            "task": "cache-warmup",
            "schedule": crontab(minute=1, hour="*"),  # @hourly
            "kwargs": {
                "strategy_name": "dashboard_tags",
                "tags": ["core", "warmup"],
            },
        },
    }


CELERY_CONFIG = CeleryConfig
# Set celery config to None to disable all the above configuration
# CELERY_CONFIG = None


# THUMBNAIL_CACHE_CONFIG = {
#     "CACHE_TYPE": "redis",
#     "CACHE_DEFAULT_TIMEOUT": 24 * 60 * 60 * 30,
#     "CACHE_KEY_PREFIX": "thumbnail_",
#     "CACHE_NO_NULL_WARNING": True,
#     "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
# }
# Async selenium thumbnail task will use the following user
THUMBNAIL_SELENIUM_USER = "Admin"


SCREENSHOT_LOCATE_WAIT = 100
SCREENSHOT_LOAD_WAIT = 600

# Slack configuration
# SLACK_API_TOKEN = "xoxb-"

# # Email configuration
SMTP_HOST = "smtp.sendgrid.net"
SMTP_STARTTLS = True
SMTP_SSL_SERVER_AUTH = True
SMTP_SSL = False
SMTP_USER = "apikey"
SMTP_PORT = 587
SMTP_PASSWORD = get_env_variable("SENDGRID_API_KEY")
SMTP_MAIL_FROM = "reports@em8126.arkoselabs.com"
EMAIL_REPORTS_SUBJECT_PREFIX = "[Superset] "

# WebDriver configuration
# If you use Firefox, you can stick with default values
# If you use Chrome, then add the following WEBDRIVER_TYPE and WEBDRIVER_OPTION_ARGS
ALERT_REPORTS_NOTIFICATION_DRY_RUN = False
WEBDRIVER_TYPE = "chrome"
WEBDRIVER_OPTION_ARGS = [
    "--force-device-scale-factor=2.0",
    "--high-dpi-support=2.0",
    "--headless",
    "--disable-gpu",
    "--disable-dev-shm-usage",
    "--no-sandbox",
    "--disable-setuid-sandbox",
    "--disable-extensions",
]

# Window size - this will impact the rendering of the data
WEBDRIVER_WINDOW = {
    "dashboard": (1600, 2000),
    "slice": (3000, 1200),
    "pixel_density": 1,
}

# Enabling tiled screenshot feature
SCREENSHOT_TILED_ENABLED = True
SCREENSHOT_TILED_HEIGHT_THRESHOLD = 5000
SCREENSHOT_TILED_VIEWPORT_HEIGHT = 2000

# This is for internal use, you can keep http
WEBDRIVER_BASEURL = "http://superset:8088"
# This is the link sent to the recipient, change to your domain eg. https://superset.mydomain.com
WEBDRIVER_BASEURL_USER_FRIENDLY = WEB_SERVER_HOST_URL

# def auth_driver(driver: WebDriver, user: "User") -> WebDriver:
#     pass

# WEBDRIVER_AUTH_FUNC = auth_driver

# The id of a template dashboard that should be copied to every new user
DASHBOARD_TEMPLATE_ID = None

# Configure which SQL validator to use for each engine
SQL_VALIDATORS_BY_ENGINE = {}

PREFERRED_DATABASES: List[str] = [
    "Amazon Athena",
    "ClickHouse",
    "PostgreSQL",
]

# Global async query config options.
# Requires GLOBAL_ASYNC_QUERIES feature flag to be enabled.
# https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries
GLOBAL_ASYNC_QUERIES_CACHE_BACKEND = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_REDIS_HOST": REDIS_HOST,
    "CACHE_REDIS_PORT": int(REDIS_PORT),
    "CACHE_REDIS_PASSWORD": REDIS_PASSWORD,
    "CACHE_REDIS_DB": int(REDIS_CELERY_DB),
    "CACHE_DEFAULT_TIMEOUT": 300,
    # TLS for AWS ElastiCache
    "CACHE_REDIS_SSL": REDIS_TLS_ENABLED,
    "CACHE_REDIS_SSL_CERT_REQS": "none",
}

GLOBAL_ASYNC_QUERIES_REDIS_STREAM_PREFIX = get_env_variable(
    "GLOBAL_ASYNC_QUERIES_REDIS_STREAM_PREFIX", "async-events-"
)
GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT = 1000
GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT_FIREHOSE = 1000000
GLOBAL_ASYNC_QUERIES_JWT_COOKIE_NAME = get_env_variable(
    "GLOBAL_ASYNC_QUERIES_JWT_COOKIE_NAME", "async-token"
)
GLOBAL_ASYNC_QUERIES_JWT_COOKIE_SECURE = get_env_variable(
    "GLOBAL_ASYNC_QUERIES_JWT_COOKIE_SECURE", True
)
GLOBAL_ASYNC_QUERIES_JWT_COOKIE_DOMAIN = f".{HOST_DOMAIN_NAME}.com"
GLOBAL_ASYNC_QUERIES_TRANSPORT = get_env_variable(
    "GLOBAL_ASYNC_QUERIES_TRANSPORT", "polling"
)
GLOBAL_ASYNC_QUERIES_POLLING_DELAY = int(
    timedelta(milliseconds=500).total_seconds() * 1000
)
# f"{re.sub('^https','ws', WEB_SERVER_FQDN)}/ws")
GLOBAL_ASYNC_QUERIES_WEBSOCKET_URL = f"{re.sub('^https','ws', WEB_SERVER_FQDN)}"

# Default cache timeout, applies to all cache backends unless specifically overridden in
# each cache config.
CACHE_DEFAULT_TIMEOUT = int(timedelta(hours=24).total_seconds())

# Default cache for Superset objects
# required by: GLOBAL_ASYNC_QUERIES
CACHE_CONFIG = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_DEFAULT_TIMEOUT": 60 * 60 * 8,  # 60 seconds * 60 minutes * 8 hours
    "CACHE_KEY_PREFIX": "default_cache_",
    "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
}

# Cache for datasource metadata and query results
# required by: GLOBAL_ASYNC_QUERIES
DATA_CACHE_CONFIG: CacheConfig = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_DEFAULT_TIMEOUT": 60 * 60 * 8,  # 60 seconds * 60 minutes * 8 hours
    "CACHE_KEY_PREFIX": "data_cache_",
    "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
}

# Cache for dashboard filter state (`CACHE_TYPE` defaults to `SimpleCache` when
#  running in debug mode unless overridden)
FILTER_STATE_CACHE_CONFIG = {
    "CACHE_KEY_PREFIX": "filter_state_",
    "CACHE_TYPE": "RedisCache",
    "CACHE_DEFAULT_TIMEOUT": int(timedelta(days=30).total_seconds()),
    "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
    # should the timeout be reset when retrieving a cached value
    "REFRESH_TIMEOUT_ON_RETRIEVAL": True,
}

# Cache for explore form data state (`CACHE_TYPE` defaults to `SimpleCache` when
#  running in debug mode unless overridden)
EXPLORE_FORM_DATA_CACHE_CONFIG = {
    "CACHE_KEY_PREFIX": "explore_form_",
    "CACHE_TYPE": "RedisCache",
    "CACHE_DEFAULT_TIMEOUT": int(timedelta(hours=6).total_seconds()),
    # should the timeout be reset when retrieving a cached value
    "REFRESH_TIMEOUT_ON_RETRIEVAL": True,
    "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
}

# store cache keys by datasource UID (via CacheKey) for custom processing/invalidation
STORE_CACHE_KEYS_IN_METADATA_DB = True

ENVIRONMENT_TAG_CONFIG = {
    "variable": "FLASK_ENV",
    "values": {
        "development": {
            "color": "error.base",
            "text": f"Development:{IMAGE_TAG}",
        },
        "staging": {
            "color": "error.base",
            "text": f"Staging:{IMAGE_TAG}",
        },
        "production": {
            "color": "",
            "text": f"Production:${IMAGE_TAG}",
        },
    },
}


from superset.utils.log import AbstractEventLogger
import json


class JSONStdOutEventLogger(AbstractEventLogger):
    def log(self, user_id, action, *args, **kwargs):
        records = kwargs.get("records", list())
        dashboard_id = kwargs.get("dashboard_id")
        slice_id = kwargs.get("slice_id")
        duration_ms = kwargs.get("duration_ms")
        referrer = kwargs.get("referrer")

        for record in records:
            log = dict(
                action=action,
                json=record,
                dashboard_id=dashboard_id,
                slice_id=slice_id,
                duration_ms=duration_ms,
                referrer=referrer,
                user_id=user_id,
            )
            print(json.dumps(log))


# EVENT_LOGGER = JSONStdOutEventLogger()

# from superset.stats_logger import StatsdStatsLogger

# STATSD_PORT = get_env_variable("STATSD_PORT")
# STATSD_LOGGER_HOST = get_env_variable("STATSD_LOGGER_HOST", "superset-statsd")

# STATS_LOGGER = StatsdStatsLogger(
#     host=STATSD_LOGGER_HOST, port=STATSD_PORT, prefix="ark_superset"
# )
```

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894020

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Issue while downloading superset dashboard as image [superset]

Posted by "Dhruvin4530 (via GitHub)" <gi...@apache.org>.
GitHub user Dhruvin4530 added a comment to the discussion: Issue while downloading superset dashboard as image

@dosu 

What does this mean?
```
THUMBNAIL_CACHE_CONFIG = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_DEFAULT_TIMEOUT": 24 * 60 * 60 * 30,
    "CACHE_KEY_PREFIX": "thumbnail_",
    "CACHE_NO_NULL_WARNING": True,
    "CACHE_REDIS_URL": redis_url(REDIS_RESULTS_DB),
}
```

GitHub link: https://github.com/apache/superset/discussions/40066#discussioncomment-16894047

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org