diff --git a/UPDATING.md b/UPDATING.md index 83909708f55f5..2c8ce25a17c4b 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -21,13 +21,19 @@ under the License. This file documents any backwards-incompatible changes in Superset and assists people when migrating to a new version. +## Next + +* [8721](https://github.com/apache/incubator-superset/pull/8721): When using the cache +warmup Celery task you should now specify the `SUPERSET_WEBSERVER_PROTOCOL` variable +in your configuration (probably either "http" or "https"). This defaults to "http". + ## 0.35.0 * [8512](https://github.com/apache/incubator-superset/pull/8512): `DRUID_IS_ACTIVE` now defaults to False. To enable Druid-API-based functionality, override the `DRUID_IS_ACTIVE` configuration variable by setting it to `True` for your deployment. -* [8450](https://github.com/apache/incubator-superset/pull/8450): The time ranger picker +* [8450](https://github.com/apache/incubator-superset/pull/8450): The time range picker now uses UTC for the tooltips and default placeholder timestamps (sans timezone). * [8370](https://github.com/apache/incubator-superset/pull/8370): Deprecates diff --git a/superset/config.py b/superset/config.py index 7391e284e98fc..5b339acd26b9b 100644 --- a/superset/config.py +++ b/superset/config.py @@ -93,6 +93,7 @@ def _try_json_readsha(filepath): SUPERSET_WORKERS = 2 # deprecated SUPERSET_CELERY_WORKERS = 32 # deprecated +SUPERSET_WEBSERVER_PROTOCOL = "http" SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0" SUPERSET_WEBSERVER_PORT = 8088 diff --git a/superset/tasks/cache.py b/superset/tasks/cache.py index 09cd1f344427c..2d2eee9eab463 100644 --- a/superset/tasks/cache.py +++ b/superset/tasks/cache.py @@ -75,8 +75,10 @@ def get_form_data(chart_id, dashboard=None): def get_url(chart): """Return external URL for warming up a given chart/table cache.""" with app.test_request_context(): - baseurl = "{SUPERSET_WEBSERVER_ADDRESS}:{SUPERSET_WEBSERVER_PORT}".format( - **app.config + baseurl = ( + "{SUPERSET_WEBSERVER_PROTOCOL}://" + "{SUPERSET_WEBSERVER_ADDRESS}:" + "{SUPERSET_WEBSERVER_PORT}".format(**app.config) ) return f"{baseurl}{chart.url}" diff --git a/tests/strategy_tests.py b/tests/strategy_tests.py index 3a0dc62c28228..31a6bdfb3c6e7 100644 --- a/tests/strategy_tests.py +++ b/tests/strategy_tests.py @@ -29,7 +29,7 @@ from .base_tests import SupersetTestCase -URL_PREFIX = "0.0.0.0:8081" +URL_PREFIX = "http://0.0.0.0:8081" class CacheWarmUpTests(SupersetTestCase):