bito-code-review[bot] commented on code in PR #36756:
URL: https://github.com/apache/superset/pull/36756#discussion_r2633224447
##########
docs/versioned_docs/version-6.0.0/configuration/configuring-superset.mdx:
##########
@@ -441,4 +441,4 @@ FEATURE_FLAGS = {
}
```
-A current list of feature flags can be found in
[RESOURCES/FEATURE_FLAGS.md](https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md).
+A current list of feature flags can be found in the [Feature
Flags](/docs/configuration/feature-flags) documentation.
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Versioned Docs Link Mismatch</b></div>
<div id="fix">
The link in this versioned documentation should point to the 6.0.0-specific
feature flags list on GitHub, as the current internal link shows the latest
feature flags which may not match the 6.0.0 release and could confuse users
reading versioned docs.
</div>
</div>
<small><i>Code Review Run #b7602e</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
superset/config.py:
##########
@@ -519,142 +519,264 @@ class D3TimeFormat(TypedDict, total=False):
# ---------------------------------------------------
# Feature flags
# ---------------------------------------------------
-# Feature flags that are set by default go here. Their values can be
-# overwritten by those specified under FEATURE_FLAGS in superset_config.py
-# For example, DEFAULT_FEATURE_FLAGS = { 'FOO': True, 'BAR': False } here
-# and FEATURE_FLAGS = { 'BAR': True, 'BAZ': True } in superset_config.py
-# will result in combined feature flags of { 'FOO': True, 'BAR': True, 'BAZ':
True }
+# Feature flags control optional functionality in Superset. They can be set in
+# superset_config.py to override the defaults below.
+#
+# Example: FEATURE_FLAGS = { 'ALERT_REPORTS': True }
+#
+# Each flag is annotated with:
+# @lifecycle: development | testing | stable | deprecated
+# @docs: URL to documentation (optional)
+# @category: runtime_config | path_to_deprecation (for stable flags)
+#
+# Lifecycle meanings:
+# - development: Unfinished, for dev environments only
+# - testing: Complete but being validated, may have bugs
+# - stable: Production-ready, tested and supported
+# - deprecated: Will be removed in a future major release
+
DEFAULT_FEATURE_FLAGS: dict[str, bool] = {
- # When using a recent version of Druid that supports JOINs turn this on
- "DRUID_JOINS": False,
- "DYNAMIC_PLUGINS": False,
- "ENABLE_TEMPLATE_PROCESSING": False,
- # Allow for javascript controls components
- # this enables programmers to customize certain charts (like the
- # geospatial ones) by inputting javascript in controls. This exposes
- # an XSS security vulnerability
- "ENABLE_JAVASCRIPT_CONTROLS": False, # deprecated
+ # =================================================================
+ # IN DEVELOPMENT
+ # =================================================================
+ # These features are considered unfinished and should only be used
+ # on development environments.
+ # -----------------------------------------------------------------
+ # Enables Table V2 (AG Grid) viz plugin
+ # @lifecycle: development
+ "AG_GRID_TABLE_ENABLED": False,
+ # Enables experimental tabs UI for Alerts and Reports
+ # @lifecycle: development
+ "ALERT_REPORT_TABS": False,
+ # Enables experimental chart plugins
+ # @lifecycle: development
+ "CHART_PLUGINS_EXPERIMENTAL": False,
# Experimental PyArrow engine for CSV parsing (may have issues with
dates/nulls)
+ # @lifecycle: development
"CSV_UPLOAD_PYARROW_ENGINE": False,
- # 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.
+ # Allow metrics and columns to be grouped into folders in the chart builder
+ # @lifecycle: development
+ "DATASET_FOLDERS": False,
+ # Enable support for date range timeshifts (e.g., "2015-01-03 :
2015-01-04")
+ # in addition to relative timeshifts (e.g., "1 day ago")
+ # @lifecycle: development
+ "DATE_RANGE_TIMESHIFTS_ENABLED": False,
+ # Enables advanced data type support
+ # @lifecycle: development
+ "ENABLE_ADVANCED_DATA_TYPES": False,
+ # Enable Superset extensions for custom functionality without modifying
core
+ # @lifecycle: development
+ "ENABLE_EXTENSIONS": False,
+ # Enable Matrixify feature for matrix-style chart layouts
+ # @lifecycle: development
+ "MATRIXIFY": False,
+ # Try to optimize SQL queries — for now only predicate pushdown is
supported
+ # @lifecycle: development
+ "OPTIMIZE_SQL": False,
+ # Expand nested types in Presto into extra columns/arrays. Experimental,
+ # doesn't work with all nested types.
+ # @lifecycle: development
"PRESTO_EXPAND_DATA": False,
- # Exposes API endpoint to compute thumbnails
- "THUMBNAILS": False,
- # Enables the endpoints to cache and retrieve dashboard screenshots via
webdriver.
- # Requires configuring Celery and a cache using THUMBNAIL_CACHE_CONFIG.
- "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": False,
- # Generate screenshots (PDF or JPG) of dashboards using the web driver.
- # When disabled, screenshots are generated on the fly by the browser.
- # This feature flag is used by the download feature in the dashboard view.
- # It is dependent on ENABLE_DASHBOARD_SCREENSHOT_ENDPOINT being enabled.
- "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": 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,
- "SQLLAB_BACKEND_PERSISTENCE": True,
- "LISTVIEWS_DEFAULT_CARD_VIEW": False,
- # When True, this escapes HTML (rather than rendering it) in Markdown
components
- "ESCAPE_MARKDOWN_HTML": False,
- "DASHBOARD_VIRTUALIZATION": True,
- # This feature flag is stil in beta and is not recommended for production
use.
- "GLOBAL_ASYNC_QUERIES": False,
- "EMBEDDED_SUPERSET": False,
- # Enables Alerts and reports new implementation
- "ALERT_REPORTS": False,
- "ALERT_REPORT_TABS": False,
+ # =================================================================
+ # IN TESTING
+ # =================================================================
+ # These features are finished but currently being tested.
+ # They are usable, but may still contain some bugs.
+ # -----------------------------------------------------------------
+ # Enables filter functionality in Alerts and Reports
+ # @lifecycle: testing
"ALERT_REPORTS_FILTER": False,
+ # Enables Alerts and Reports functionality
+ # @lifecycle: testing
+ # @docs: https://superset.apache.org/docs/configuration/alerts-reports
+ "ALERT_REPORTS": False,
+ # Enables Slack V2 integration for Alerts and Reports
+ # @lifecycle: testing
"ALERT_REPORT_SLACK_V2": False,
- "DASHBOARD_RBAC": False,
- "ENABLE_ADVANCED_DATA_TYPES": False,
- # Enabling ALERTS_ATTACH_REPORTS, the system sends email and slack message
- # with screenshot and link
- # Disables ALERTS_ATTACH_REPORTS, the system DOES NOT generate screenshot
- # for report with type 'alert' and sends email and slack message with only
link;
- # for report with type 'report' still send with email and slack message
with
- # screenshot and link
- "ALERTS_ATTACH_REPORTS": True,
# Allow users to export full CSV of table viz type.
- # This could cause the server to run out of memory or compute.
+ # Warning: Could cause server memory/compute issues with large datasets.
+ # @lifecycle: testing
"ALLOW_FULL_CSV_EXPORT": False,
- "ALLOW_ADHOC_SUBQUERY": False,
- "USE_ANALOGOUS_COLORS": False,
- # Apply RLS rules to SQL Lab queries. This requires parsing and
manipulating the
- # query, and might break queries and/or allow users to bypass RLS. Use
with care!
- "RLS_IN_SQLLAB": False,
- # Try to optimize SQL queries — for now only predicate pushdown is
supported.
- "OPTIMIZE_SQL": False,
- # When impersonating a user, use the email prefix instead of the username
- "IMPERSONATE_WITH_EMAIL_PREFIX": False,
- # Enable caching per impersonation key (e.g username) in a datasource
where user
- # impersonation is enabled
+ # Enable caching per impersonation key in datasources with user
impersonation
+ # @lifecycle: testing
"CACHE_IMPERSONATION": False,
- # Enable caching per user key for Superset cache (not database cache
impersonation)
+ # Allow users to optionally specify date formats in email subjects
+ # @lifecycle: testing
+ # @docs: https://superset.apache.org/docs/configuration/alerts-reports
+ "DATE_FORMAT_IN_EMAIL_SUBJECT": False,
+ # Enable dynamic plugin loading
+ # @lifecycle: testing
+ "DYNAMIC_PLUGINS": False,
+ # Enables endpoints to cache and retrieve dashboard screenshots via
webdriver.
+ # Requires Celery and THUMBNAIL_CACHE_CONFIG.
+ # @lifecycle: testing
+ "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": False,
+ # Generate screenshots (PDF/JPG) of dashboards using web driver.
+ # Depends on ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS.
+ # @lifecycle: testing
+ "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": False,
+ # Allows users to add a superset:// DB that can query across databases.
+ # Experimental with potential security/performance risks. See
SUPERSET_META_DB_LIMIT.
+ # @lifecycle: testing
+ # @docs:
https://superset.apache.org/docs/configuration/databases/#querying-across-databases
+ "ENABLE_SUPERSET_META_DB": False,
+ # Enable query cost estimation. Supported in Presto, Postgres, and
BigQuery.
+ # Requires `cost_estimate_enabled: true` in database `extra` attribute.
+ # @lifecycle: testing
+ "ESTIMATE_QUERY_COST": False,
+ # Enable async queries for dashboards and Explore via WebSocket.
+ # Requires Redis 5.0+ and Celery workers.
+ # @lifecycle: testing
+ # @docs:
https://superset.apache.org/docs/contributing/misc#async-chart-queries
+ "GLOBAL_ASYNC_QUERIES": False,
+ # When impersonating a user, use the email prefix instead of username
+ # @lifecycle: testing
+ "IMPERSONATE_WITH_EMAIL_PREFIX": False,
+ # Replace Selenium with Playwright for reports and thumbnails.
+ # Supports deck.gl visualizations. Requires playwright pip package.
+ # @lifecycle: testing
+ "PLAYWRIGHT_REPORTS_AND_THUMBNAILS": False,
+ # Apply RLS rules to SQL Lab queries. Requires query parsing/manipulation.
+ # May break queries or allow RLS bypass. Use with care!
+ # @lifecycle: testing
+ "RLS_IN_SQLLAB": False,
+ # Allow users to enable SSH tunneling when creating a DB connection.
+ # DB engine must support SSH Tunnels.
+ # @lifecycle: testing
+ # @docs: https://superset.apache.org/docs/configuration/setup-ssh-tunneling
+ "SSH_TUNNELING": False,
+ # Use analogous colors in charts
+ # @lifecycle: testing
+ "USE_ANALOGOUS_COLORS": False,
+ # =================================================================
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Removes Used Feature Flags</b></div>
<div id="fix">
Removing these feature flags breaks existing functionality, as they are
actively used in code (e.g., `is_feature_enabled("SLACK_ENABLE_AVATARS")` in
`superset/views/users/api.py`). This will disable features like Slack avatars,
CSS templates, dataset folders, and others, causing user-visible issues.
Consider restoring them or refactoring the code to not depend on them.
</div>
</div>
<small><i>Code Review Run #b7602e</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]