mikebridge commented on code in PR #43493:
URL: https://github.com/apache/superset/pull/43493#discussion_r3855444697
##########
docs/docs/using-superset/version-history.mdx:
##########
@@ -15,29 +15,29 @@ description of what changed — "Chart renamed to Q3
Revenue", "Added filter on
'Region'" — rather than a raw diff. You can search the history and filter it
down to changes on the entity itself or on the things it depends on.
-## Enabling it
-
-Two switches are involved, and both matter.
+## Enabling and disabling it
| Setting | Type | Effect |
| --- | --- | --- |
| `VERSION_HISTORY` | Feature flag | Shows the version history UI |
| `ENABLE_VERSIONING_CAPTURE` | Config value | Records versions as entities
are saved |
+Both default to on. To turn the feature off:
+
```python
# superset_config.py
-FEATURE_FLAGS = {"VERSION_HISTORY": True}
-ENABLE_VERSIONING_CAPTURE = True
+FEATURE_FLAGS = {"VERSION_HISTORY": False}
Review Comment:
Thanks for flagging the risk, but `FEATURE_FLAGS.update(...)` is not valid
as a standalone `superset_config.py` example: that file is imported as its own
module, so `FEATURE_FLAGS` is not defined there unless the operator explicitly
imports or defines it first. The assignment shown here is the documented
Superset override pattern (`superset/config.py` gives the same `FEATURE_FLAGS =
{...}` example). It also does not discard Superset defaults:
`FeatureFlagManager.init_app()` starts with `DEFAULT_FEATURE_FLAGS` and then
updates that mapping with `app.config["FEATURE_FLAGS"]`, so unrelated default
flags remain intact. An operator who already has custom overrides should add
`"VERSION_HISTORY": False` to their existing `FEATURE_FLAGS` mapping, rather
than paste a second assignment. For those reasons I am keeping the executable
assignment form rather than changing it to an `update()` call that would raise
`NameError` in the documented context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]