chore: Deprecates the KV_STORE feature flag (#26450)

This commit is contained in:
Michael S. Molina 2024-01-16 10:49:14 -03:00 committed by GitHub
parent 6063f4ff04
commit 7ca6d8c880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,6 @@ These features are considered **unfinished** and should only be used on developm
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"
- ENABLE_ADVANCED_DATA_TYPES
- KV_STORE
- PRESTO_EXPAND_DATA
- SHARE_QUERIES_VIA_KV_STORE
- TAGGING_SYSTEM
@ -94,5 +93,6 @@ These features flags currently default to True and **will be removed in a future
- ENABLE_EXPLORE_JSON_CSRF_PROTECTION
- ENABLE_TEMPLATE_REMOVE_FILTERS
- GENERIC_CHART_AXES
- KV_STORE
- REMOVE_SLICE_LEVEL_LABEL_COLORS
- VERSIONED_EXPORT

View File

@ -27,6 +27,8 @@ assists people when migrating to a new version.
- [26034](https://github.com/apache/superset/issues/26034): Fixes a problem where numeric x-axes were being treated as categorical values. As a consequence of that, the way labels are displayed might change given that ECharts has a different treatment for numerical and categorical values. To revert to the old behavior, users need to manually convert numerical columns to text so that they are treated as categories. Check https://github.com/apache/superset/issues/26159 for more details.
- [24657](https://github.com/apache/superset/pull/24657): Bumps the cryptography package to augment the OpenSSL security vulnerability.
- [26450](https://github.com/apache/superset/pull/26450): Deprecates the `KV_STORE` feature flag and its related assets such as the API endpoint and `keyvalue` table. The main dependency of this feature is the `SHARE_QUERIES_VIA_KV_STORE` feature flag which allows sharing SQL Lab queries without the necessity of saving the query. Our intention is to use the permalink feature to implement this use case before 5.0 and that's why we are deprecating the feature flag now.
### Breaking Changes
- [26343](https://github.com/apache/superset/issues/26343): Removes the deprecated `ENABLE_EXPLORE_DRAG_AND_DROP` feature flag. The previous value of the feature flag was `True` and now the feature is permanently enabled.

View File

@ -426,7 +426,7 @@ DEFAULT_FEATURE_FLAGS: dict[str, bool] = {
# geospatial ones) by inputting javascript in controls. This exposes
# an XSS security vulnerability
"ENABLE_JAVASCRIPT_CONTROLS": False,
"KV_STORE": False,
"KV_STORE": False, # deprecated
# When this feature is enabled, nested types in Presto will be
# expanded into extra columns and/or arrays. This is experimental,
# and doesn't work with all nested types.

View File

@ -25,7 +25,7 @@ from superset import db, event_logger, is_feature_enabled
from superset.models import core as models
from superset.superset_typing import FlaskResponse
from superset.utils import core as utils
from superset.views.base import BaseSupersetView, json_error_response
from superset.views.base import BaseSupersetView, deprecated, json_error_response
class KV(BaseSupersetView):
@ -44,6 +44,7 @@ class KV(BaseSupersetView):
@event_logger.log_this
@has_access_api
@expose("/store/", methods=("POST",))
@deprecated(eol_version="4.0.0")
def store(self) -> FlaskResponse:
try:
value = request.form.get("data")
@ -57,6 +58,7 @@ class KV(BaseSupersetView):
@event_logger.log_this
@has_access_api
@expose("/<int:key_id>/", methods=("GET",))
@deprecated(eol_version="4.0.0")
def get_value(self, key_id: int) -> FlaskResponse:
try:
kv = db.session.query(models.KeyValue).filter_by(id=key_id).scalar()