diff --git a/UPDATING.md b/UPDATING.md index 27fc3428b9ee..d40de71e2b83 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -24,7 +24,12 @@ assists people when migrating to a new version. ## Next -### Granular Export Controls +### Feature Flag Changes + +#### `TAGGING_SYSTEM` +The default value of **TAGGING_SYSTEM** was flipped from `False` to `True`. + +#### `GRANULAR_EXPORT_CONTROLS` A new feature flag `GRANULAR_EXPORT_CONTROLS` introduces three fine-grained permissions that replace the legacy `can_csv` permission: diff --git a/docs/static/feature-flags.json b/docs/static/feature-flags.json index 516115ac0aeb..f80c74096846 100644 --- a/docs/static/feature-flags.json +++ b/docs/static/feature-flags.json @@ -86,12 +86,6 @@ "default": false, "lifecycle": "development", "description": "Enable Table V2 time comparison feature" - }, - { - "name": "TAGGING_SYSTEM", - "default": false, - "lifecycle": "development", - "description": "Enables the tagging system for organizing assets" } ], "testing": [ @@ -208,6 +202,12 @@ "description": "Allow users to enable SSH tunneling when creating a DB connection. DB engine must support SSH Tunnels.", "docs": "https://superset.apache.org/docs/configuration/setup-ssh-tunneling" }, + { + "name": "TAGGING_SYSTEM", + "default": true, + "lifecycle": "testing", + "description": "Enables the tagging system for organizing assets" + }, { "name": "USE_ANALOGOUS_COLORS", "default": false, diff --git a/superset/config.py b/superset/config.py index 858344a9b897..cf66f2930a1b 100644 --- a/superset/config.py +++ b/superset/config.py @@ -592,9 +592,6 @@ class D3TimeFormat(TypedDict, total=False): # Enable Table V2 time comparison feature # @lifecycle: development "TABLE_V2_TIME_COMPARISON_ENABLED": False, - # Enables the tagging system for organizing assets - # @lifecycle: development - "TAGGING_SYSTEM": False, # ================================================================= # IN TESTING # ================================================================= @@ -667,6 +664,9 @@ class D3TimeFormat(TypedDict, total=False): # @lifecycle: testing # @docs: https://superset.apache.org/docs/configuration/setup-ssh-tunneling "SSH_TUNNELING": False, + # Enables the tagging system for organizing assets + # @lifecycle: testing + "TAGGING_SYSTEM": True, # Enable AWS IAM authentication for database connections (Aurora, Redshift). # Allows cross-account role assumption via STS AssumeRole. # Security note: When enabled, ensure Superset's IAM role has restricted diff --git a/tests/integration_tests/fixtures/tags.py b/tests/integration_tests/fixtures/tags.py index 8fb427015093..493497ce4da7 100644 --- a/tests/integration_tests/fixtures/tags.py +++ b/tests/integration_tests/fixtures/tags.py @@ -16,23 +16,36 @@ # under the License. import pytest +import sqlalchemy as sqla from superset import db +from superset.models.slice import Slice from superset.tags.core import clear_sqla_event_listeners, register_sqla_event_listeners -from superset.tags.models import Tag +from superset.tags.models import ChartUpdater, Tag from tests.integration_tests.test_app import app @pytest.fixture def with_tagging_system_feature(): is_enabled = app.config["DEFAULT_FEATURE_FLAGS"]["TAGGING_SYSTEM"] + listeners_registered = sqla.event.contains( + Slice, "after_insert", ChartUpdater.after_insert + ) + if not is_enabled: app.config["DEFAULT_FEATURE_FLAGS"]["TAGGING_SYSTEM"] = True + + if not listeners_registered: register_sqla_event_listeners() - yield - app.config["DEFAULT_FEATURE_FLAGS"]["TAGGING_SYSTEM"] = False + + yield + + if not listeners_registered: clear_sqla_event_listeners() + if not is_enabled: + app.config["DEFAULT_FEATURE_FLAGS"]["TAGGING_SYSTEM"] = False + @pytest.fixture def create_custom_tags():