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

[init] Setting up cache before registering blueprints #7992

Merged
merged 2 commits into from
Aug 6, 2019

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Aug 6, 2019

CATEGORY

Choose one

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

SUMMARY

Having all the registration logic in superset/__init__.py results in some complex cyclical logic (not I really like the model that the cookiecutter-flask package uses where the cache etc. are registered as extensions and available prior to the instantiation of the app) though this may be a limitation of using Flask-AppBuilder.

It't not apparent what order we should register certain logic but we've run into an issue using Blueprints where we wanted to reference the cache which need to be defined prior to the registration of the blueprints.

TEST PLAN

CI.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

to: @etr2460 @graceguo-supercat @michellethomas @mistercrunch

Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

seems legit to me.

maybe add a comment about why this needs to be first so that no one else moves it back down?

@john-bodley john-bodley merged commit c6867d2 into master Aug 6, 2019
john-bodley added a commit to airbnb/superset-fork that referenced this pull request Aug 7, 2019
* [init] Setting up cache before registering blueprints

* Update __init__.py

(cherry picked from commit c6867d2)
john-bodley added a commit that referenced this pull request Aug 7, 2019
graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this pull request Aug 14, 2019
john-bodley added a commit that referenced this pull request Oct 6, 2019
serenajiang pushed a commit to airbnb/superset-fork that referenced this pull request Oct 9, 2019
@amitmiran137 amitmiran137 deleted the john-bodley--setting-cache-prior-to-blueprints branch March 29, 2021 18:09
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 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.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants