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

fix: cached common bootstrap Revert (#21018) #21419

Merged
merged 1 commit into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions superset/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
SupersetException,
SupersetSecurityException,
)
from superset.extensions import cache_manager
from superset.models.helpers import ImportExportMixin
from superset.reports.models import ReportRecipientType
from superset.superset_typing import FlaskResponse
Expand Down Expand Up @@ -355,13 +354,8 @@ def menu_data() -> Dict[str, Any]:
}


@cache_manager.cache.memoize(timeout=60)
def common_bootstrap_payload() -> Dict[str, Any]:
"""Common data always sent to the client
The function is memoized as the return value only changes based
on configuration and feature flag values.
"""
"""Common data always sent to the client"""
messages = get_flashed_messages(with_categories=True)
locale = str(get_locale())

Expand Down
4 changes: 1 addition & 3 deletions tests/integration_tests/core_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
from superset.db_engine_specs.base import BaseEngineSpec
from superset.db_engine_specs.mssql import MssqlEngineSpec
from superset.exceptions import SupersetException
from superset.extensions import async_query_manager, cache_manager
from superset.extensions import async_query_manager
from superset.models import core as models
from superset.models.annotations import Annotation, AnnotationLayer
from superset.models.dashboard import Dashboard
Expand Down Expand Up @@ -1455,8 +1455,6 @@ def test_feature_flag_serialization(self):
"""
Functions in feature flags don't break bootstrap data serialization.
"""
# feature flags are cached
cache_manager.cache.clear()
self.login()

encoded = json.dumps(
Expand Down