Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add protocol to cache warmup #8721

Merged
merged 5 commits into from
Dec 3, 2019
Merged

Add protocol to cache warmup #8721

merged 5 commits into from
Dec 3, 2019

Conversation

betodealmeida
Copy link
Member

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

We have two variables in config.py that are used exclusively for the cache warmup celery task:

SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"
SUPERSET_WEBSERVER_PORT = 8088

The change from requests to urllib broke the task, since urllib requires a protocol in addition to the host and port.

I fixed it by adding a new variable to config.py:

SUPERSET_WEBSERVER_PROTOCOL = "http"

And using that variable when composing the URL.

TEST PLAN

Updated unit tests.

ADDITIONAL INFORMATION

  • Has associated issue: Cache warmup does not work #8461
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

This PR fixes #8461.

REVIEWERS

@willbarrett

@@ -60,7 +60,7 @@ import {
LineMultiChartPlugin,
PieChartPlugin,
TimePivotChartPlugin,
} from '@superset-ui/legacy-preset-chart-nvd3/lib';
} from '@superset-ui/legacy-preset-chart-nvd3/src';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revert this.

@willbarrett
Copy link
Member

We probably want to add a note to UPDATING.md - I'm hoping that most people are running Superset over HTTPS in production.

@betodealmeida
Copy link
Member Author

We probably want to add a note to UPDATING.md - I'm hoping that most people are running Superset over HTTPS in production.

I'll do that. Here I'm assuming that if they didn't change config.py (or if they don't have a superset_config.py) they're probably running in development mode under HTTP.

@codecov-io
Copy link

codecov-io commented Dec 3, 2019

Codecov Report

Merging #8721 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8721      +/-   ##
==========================================
- Coverage   65.55%   65.54%   -0.02%     
==========================================
  Files         482      482              
  Lines       24083    24096      +13     
  Branches     2763     2763              
==========================================
+ Hits        15788    15793       +5     
- Misses       8115     8123       +8     
  Partials      180      180
Impacted Files Coverage Δ
superset/config.py 89.9% <100%> (+0.04%) ⬆️
superset/tasks/cache.py 73.68% <100%> (ø) ⬆️
superset/db_engine_specs/postgres.py 55.55% <0%> (-27.78%) ⬇️
superset/jinja_context.py 74.73% <0%> (-1.97%) ⬇️
superset/models/core.py 83.04% <0%> (-0.17%) ⬇️
...uperset/assets/src/SqlLab/components/SqlEditor.jsx 51.63% <0%> (ø) ⬆️
superset/__init__.py 100% <0%> (ø) ⬆️
superset/app.py 80.53% <0%> (+0.39%) ⬆️
superset/connectors/druid/models.py 82.31% <0%> (+0.47%) ⬆️
superset/extensions.py 94.87% <0%> (+0.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bca2b91...ce1ad4c. Read the comment docs.

@betodealmeida betodealmeida merged commit f8e15e1 into apache:master Dec 3, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache warmup does not work
4 participants