Cerberus112 opened a new issue, #27160: URL: https://github.com/apache/superset/issues/27160
### Bug description Cache warm-up is not functioning when configured using the latest version (3.1.1rc1) and the previous one (3.1.0) in kubernetes enviroment (with Helm chart version 0.2.15 or earlier). When the task is triggered, logs of superset worker throws the following error: ``` [2024-02-19 14:26:00,227: INFO/ForkPoolWorker-1] fetch_url[ecc6c59f-1a81-472c-bb3c-25daf1ccb203]: Fetching http://url.of.my.site/superset/warm_up_cache/ with payload {"chart_id": 43} [2024-02-19` 14:22:00,263: ERROR/ForkPoolWorker-3] fetch_url[ecc6c59f-1a81-472c-bb3c-25daf1ccb203]: Error warming up cache! Traceback (most recent call last): File "/app/superset/tasks/cache.py", line 242, in fetch_url response = request.urlopen( # pylint: disable=consider-using-with File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python3.9/urllib/request.py", line 523, in open response = meth(req, response) File "/usr/local/lib/python3.9/urllib/request.py", line 632, in http_response response = self.parent.error( File "/usr/local/lib/python3.9/urllib/request.py", line 561, in error return self._call_chain(*args) File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain result = func(*args) File "/usr/local/lib/python3.9/urllib/request.py", line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 308: Permanent Redirect ``` Note: Reports are working correctly in the same worker. ### How to reproduce the bug 1. Apply cache warm-up config in kubernetes enviroment 2. Review the logs of superset worker ### Screenshots/recordings _No response_ ### Superset version master / latest-dev ### Python version 3.9 ### Node version 16 ### Browser Chrome ### Additional context The values.yalm (cache warm-up configs): ``` celery_conf: | from celery.schedules import crontab class CeleryConfig: broker_url = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" imports = ( "superset.sql_lab", "superset.tasks.cache", "superset.tasks.scheduler", ) result_backend = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" task_annotations = { "sql_lab.get_sql_results": { "rate_limit": "100/s", }, } beat_schedule = { "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="*/2", hour="*"), ## for testing "kwargs": { "strategy_name": "dummy" }, } } CELERY_CONFIG = CeleryConfig THUMBNAIL_SELENIUM_USER = "admin" ``` ### Checklist - [X] I have searched Superset docs and Slack and didn't find a solution to my problem. - [X] I have searched the GitHub issue tracker and didn't find a similar bug report. - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- 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]
