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

chore: Deprecates the KV_STORE feature flag #26450

Merged
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
2 changes: 1 addition & 1 deletion RESOURCES/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -96,5 +95,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
2 changes: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

### Potential Downtime
Expand Down
2 changes: 1 addition & 1 deletion superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class D3Format(TypedDict, total=False):
# 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.
Expand Down
4 changes: 3 additions & 1 deletion superset/views/key_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
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):
Expand All @@ -44,6 +44,7 @@ def ensure_enabled(self) -> None:
@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")
Expand All @@ -57,6 +58,7 @@ def store(self) -> FlaskResponse:
@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()
Expand Down
Loading