docs: federate scattered markdown files into centralized docs (#36756)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-01-21 13:00:54 -08:00
committed by GitHub
parent 17d6f4ebc4
commit d2907b2577
35 changed files with 1244 additions and 815 deletions

View File

@@ -69,7 +69,7 @@ jobs:
`❗ @${pull.user.login} Your base branch \`${currentBranch}\` has ` +
'also updated `superset/migrations`.\n' +
'\n' +
'**Please consider rebasing your branch and [resolving potential db migration conflicts](https://github.com/apache/superset/blob/master/CONTRIBUTING.md#merging-db-migrations).**',
'**Please consider rebasing your branch and [resolving potential db migration conflicts](https://superset.apache.org/docs/contributing/development#merging-db-migrations).**',
});
}
}

View File

@@ -149,3 +149,11 @@ repos:
files: ^superset/db_engine_specs/.*\.py$
exclude: ^superset/db_engine_specs/(base|lib|lint_metadata|__init__)\.py$
pass_filenames: false
- repo: local
hooks:
- id: feature-flags-sync
name: feature flags documentation sync
entry: bash -c 'python scripts/extract_feature_flags.py > docs/static/feature-flags.json.tmp && if ! diff -q docs/static/feature-flags.json docs/static/feature-flags.json.tmp > /dev/null 2>&1; then mv docs/static/feature-flags.json.tmp docs/static/feature-flags.json && echo "Updated docs/static/feature-flags.json" && exit 1; else rm docs/static/feature-flags.json.tmp; fi'
language: system
files: ^superset/config\.py$
pass_filenames: false

View File

@@ -16,8 +16,20 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# INSTALL / BUILD instructions for Apache Superset
# Installing Apache Superset
At this time, the docker file at RELEASING/Dockerfile.from_local_tarball
constitutes the recipe on how to get to a working release from a source
release tarball.
For comprehensive installation instructions, please see the Apache Superset documentation:
**[📚 Installation Guide →](https://superset.apache.org/docs/installation/installation-methods)**
The documentation covers:
- [Docker Compose](https://superset.apache.org/docs/installation/docker-compose) (recommended for development)
- [Kubernetes / Helm](https://superset.apache.org/docs/installation/kubernetes)
- [PyPI](https://superset.apache.org/docs/installation/pypi)
- [Docker Builds](https://superset.apache.org/docs/installation/docker-builds)
- [Architecture Overview](https://superset.apache.org/docs/installation/architecture)
## Building from Source
For building from a source release tarball, see the Dockerfile at:
`RELEASING/Dockerfile.from_local_tarball`

View File

@@ -1,121 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Superset Frontend Linting Architecture
## Overview
We use a hybrid linting approach combining OXC (fast, standard rules) with custom AST-based checks for Superset-specific patterns.
## Components
### 1. Primary Linter: OXC
- **What**: Oxidation Compiler's linter (oxlint)
- **Handles**: 95% of linting rules (standard ESLint rules, TypeScript, React, etc.)
- **Speed**: ~50-100x faster than ESLint
- **Config**: `oxlint.json`
### 2. Custom Rule Checker
- **What**: Node.js AST-based script
- **Handles**: Superset-specific rules:
- No literal colors (use theme)
- No FontAwesome icons (use Icons component)
- No template vars in i18n
- **Speed**: Fast enough for pre-commit
- **Script**: `scripts/check-custom-rules.js`
## Developer Workflow
### Local Development
```bash
# Fast linting (OXC only)
npm run lint
# Full linting (OXC + custom rules)
npm run lint:full
# Auto-fix what's possible
npm run lint-fix
```
### Pre-commit
1. OXC runs first (via `scripts/oxlint.sh`)
2. Custom rules check runs second (lightweight, AST-based)
3. Both must pass for commit to succeed
### CI Pipeline
```yaml
- name: Lint with OXC
run: npm run lint
- name: Check custom rules
run: npm run check:custom-rules
```
## Why This Architecture?
### ✅ Pros
1. **No binary distribution issues** - ASF compatible
2. **Fast performance** - OXC for bulk, lightweight script for custom
3. **Maintainable** - Custom rules in JavaScript, not Rust
4. **Flexible** - Can evolve as OXC adds plugin support
5. **Cacheable** - Both OXC and Node.js are standard tools
### ❌ Cons
1. **Two tools** - Slightly more complex than single linter
2. **Duplicate parsing** - Files parsed twice (once by each tool)
### 🔄 Migration Path
When OXC supports JavaScript plugins:
1. Convert `check-custom-rules.js` to OXC plugin format
2. Consolidate back to single tool
3. Keep same rules and developer experience
## Implementation Checklist
- [x] OXC for standard linting
- [x] Pre-commit integration
- [ ] Custom rules script
- [ ] Combine in npm scripts
- [ ] Update CI pipeline
- [ ] Developer documentation
## Performance Targets
| Operation | Target Time | Current |
|-----------|------------|---------|
| Pre-commit (changed files) | <2s | ✅ 1.5s |
| Full lint (all files) | <10s | ✅ 8s |
| Custom rules check | <5s | 🔄 TBD |
## Caching Strategy
### Local Development
- OXC: Built-in incremental checking
- Custom rules: Use file hash cache (similar to pytest cache)
### CI
- Cache `node_modules` (includes oxlint binary)
- Cache custom rules results by commit hash
- Skip unchanged files using git diff
## Future Improvements
1. **When OXC adds plugin support**: Migrate custom rules to OXC plugins
2. **Consider Biome**: Another Rust-based linter with plugin support
3. **AST sharing**: Investigate sharing AST between tools to avoid double parsing

View File

@@ -168,14 +168,14 @@ Try out Superset's [quickstart](https://superset.apache.org/docs/quickstart/) gu
## Contributor Guide
Interested in contributing? Check out our
[CONTRIBUTING.md](https://github.com/apache/superset/blob/master/CONTRIBUTING.md)
[Developer Portal](https://superset.apache.org/developer_portal/)
to find resources around contributing along with a detailed guide on
how to set up a development environment.
## Resources
- [Superset "In the Wild"](https://superset.apache.org/inTheWild) - see who's using Superset, and [add your organization](https://github.com/apache/superset/edit/master/RESOURCES/INTHEWILD.yaml) to the list!
- [Feature Flags](https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md) - the status of Superset's Feature Flags.
- [Feature Flags](https://superset.apache.org/docs/configuration/feature-flags) - the status of Superset's Feature Flags.
- [Standard Roles](https://github.com/apache/superset/blob/master/RESOURCES/STANDARD_ROLES.md) - How RBAC permissions map to roles.
- [Superset Wiki](https://github.com/apache/superset/wiki) - Tons of additional community resources: best practices, community content and other information.
- [Superset SIPs](https://github.com/orgs/apache/projects/170) - The status of Superset's SIPs (Superset Improvement Proposals) for both consensus and implementation status.

View File

@@ -92,7 +92,7 @@ Some of the new features in this release are disabled by default. Each has a fea
| Feature | Feature Flag | Dependencies | Documentation
| --- | --- | --- | --- |
| Global Async Queries | `GLOBAL_ASYNC_QUERIES: True` | Redis 5.0+, celery workers configured and running | [Extra documentation](https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries )
| Global Async Queries | `GLOBAL_ASYNC_QUERIES: True` | Redis 5.0+, celery workers configured and running | [Extra documentation](https://superset.apache.org/docs/contributing/misc#async-chart-queries)
| Dashboard Native Filters | `DASHBOARD_NATIVE_FILTERS: True` | |
| Alerts & Reporting | `ALERT_REPORTS: True` | [Celery workers configured & celery beat process](https://superset.apache.org/docs/installation/async-queries-celery) |
| Homescreen Thumbnails | `THUMBNAILS: TRUE, THUMBNAIL_CACHE_CONFIG: CacheConfig = { "CACHE_TYPE": "null", "CACHE_NO_NULL_WARNING": True}`| selenium, pillow 7, celery |

View File

@@ -1,103 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Superset Feature Flags
This is a list of the current Superset optional features. See config.py for default values. These features can be turned on/off by setting your preferred values in superset_config.py to True/False respectively
## In Development
These features are considered **unfinished** and should only be used on development environments.
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"
- ALERT_REPORT_TABS
- DATE_RANGE_TIMESHIFTS_ENABLED
- ENABLE_ADVANCED_DATA_TYPES
- PRESTO_EXPAND_DATA
- SHARE_QUERIES_VIA_KV_STORE
- TAGGING_SYSTEM
- CHART_PLUGINS_EXPERIMENTAL
## In Testing
These features are **finished** but currently being tested. They are usable, but may still contain some bugs.
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"
- ALERT_REPORTS: [(docs)](https://superset.apache.org/docs/configuration/alerts-reports)
- ALLOW_FULL_CSV_EXPORT
- CACHE_IMPERSONATION
- CONFIRM_DASHBOARD_DIFF
- DYNAMIC_PLUGINS
- DATE_FORMAT_IN_EMAIL_SUBJECT: [(docs)](https://superset.apache.org/docs/configuration/alerts-reports#commons)
- ENABLE_SUPERSET_META_DB: [(docs)](https://superset.apache.org/docs/configuration/databases/#querying-across-databases)
- ESTIMATE_QUERY_COST
- GLOBAL_ASYNC_QUERIES [(docs)](https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries)
- IMPERSONATE_WITH_EMAIL_PREFIX
- PLAYWRIGHT_REPORTS_AND_THUMBNAILS
- RLS_IN_SQLLAB
- SSH_TUNNELING [(docs)](https://superset.apache.org/docs/configuration/setup-ssh-tunneling)
- USE_ANALAGOUS_COLORS
## Stable
These features flags are **safe for production**. They have been tested and will be supported for the at least the current major version cycle.
[//]: # "PLEASE KEEP THESE LISTS SORTED ALPHABETICALLY"
### Flags on the path to feature launch and flag deprecation/removal
- DASHBOARD_VIRTUALIZATION
### Flags retained for runtime configuration
Currently some of our feature flags act as dynamic configurations that can change
on the fly. This acts in contradiction with the typical ephemeral feature flag use case,
where the flag is used to mature a feature, and eventually deprecated once the feature is
solid. Eventually we'll likely refactor these under a more formal "dynamic configurations" managed
independently. This new framework will also allow for non-boolean configurations.
- ALERTS_ATTACH_REPORTS
- ALLOW_ADHOC_SUBQUERY
- DASHBOARD_RBAC [(docs)](https://superset.apache.org/docs/using-superset/creating-your-first-dashboard#manage-access-to-dashboards)
- DATAPANEL_CLOSED_BY_DEFAULT
- DRILL_BY
- DRUID_JOINS
- EMBEDDABLE_CHARTS
- EMBEDDED_SUPERSET
- ENABLE_TEMPLATE_PROCESSING
- ESCAPE_MARKDOWN_HTML
- LISTVIEWS_DEFAULT_CARD_VIEW
- SCHEDULED_QUERIES [(docs)](https://superset.apache.org/docs/configuration/alerts-reports)
- SLACK_ENABLE_AVATARS (see `superset/config.py` for more information)
- SQLLAB_BACKEND_PERSISTENCE
- SQL_VALIDATORS_BY_ENGINE [(docs)](https://superset.apache.org/docs/configuration/sql-templating)
- THUMBNAILS [(docs)](https://superset.apache.org/docs/configuration/cache)
## Deprecated Flags
These features flags currently default to True and **will be removed in a future major release**. For this current release you can turn them off by setting your config to False, but it is advised to remove or set these flags in your local configuration to **True** so that you do not experience any unexpected changes in a future release.
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"
- AVOID_COLORS_COLLISION
- DRILL_TO_DETAIL
- ENABLE_JAVASCRIPT_CONTROLS
- KV_STORE

View File

@@ -416,7 +416,7 @@ If versions don't appear in dropdown:
- [Docusaurus Documentation](https://docusaurus.io/docs)
- [MDX Documentation](https://mdxjs.com/)
- [Superset Contributing Guide](../CONTRIBUTING.md)
- [Superset Developer Portal](https://superset.apache.org/developer_portal/)
- [Main Superset Documentation](https://superset.apache.org/docs/intro)
## 📖 Real Examples and Patterns

View File

@@ -18,9 +18,9 @@ under the License.
-->
This is the public documentation site for Superset, built using
[Docusaurus 3](https://docusaurus.io/). See
[CONTRIBUTING.md](../CONTRIBUTING.md#documentation) for documentation on
contributing to documentation.
[Docusaurus 3](https://docusaurus.io/). See the
[Developer Portal](https://superset.apache.org/developer_portal/contributing/development-setup#documentation)
for documentation on contributing to documentation.
## Version Management

View File

@@ -653,7 +653,7 @@ export enum FeatureFlag {
those specified under FEATURE_FLAGS in `superset_config.py`. For example, `DEFAULT_FEATURE_FLAGS = { 'FOO': True, 'BAR': False }` in `superset/config.py` and `FEATURE_FLAGS = { 'BAR': True, 'BAZ': True }` in `superset_config.py` will result
in combined feature flags of `{ 'FOO': True, 'BAR': True, 'BAZ': True }`.
The current status of the usability of each flag (stable vs testing, etc) can be found in `RESOURCES/FEATURE_FLAGS.md`.
The current status of the usability of each flag (stable vs testing, etc) can be found in the [Feature Flags](/docs/configuration/feature-flags) documentation.
## Git Hooks

View File

@@ -342,26 +342,79 @@ ruff check --fix .
Pre-commit hooks run automatically on `git commit` if installed.
### TypeScript
### TypeScript / JavaScript
We use ESLint and Prettier for TypeScript:
We use a hybrid linting approach combining OXC (Oxidation Compiler) for standard rules and a custom AST-based checker for Superset-specific patterns.
#### Quick Commands
```bash
cd superset-frontend
# Run eslint checks
# Run both OXC and custom rules
npm run lint:full
# Run OXC linter only (faster for most checks)
npm run lint
# Fix auto-fixable issues with OXC
npm run lint-fix
# Run custom rules checker only
npm run check:custom-rules
# Run tsc (typescript) checks
npm run type
# Fix lint issues
npm run lint-fix
# Format with Prettier
npm run prettier
```
#### Architecture
The linting system consists of two components:
1. **OXC Linter** (`oxlint`) - A Rust-based linter that's 50-100x faster than ESLint
- Handles all standard JavaScript/TypeScript rules
- Configured via `oxlint.json`
- Runs via `npm run lint` or `npm run lint-fix`
2. **Custom Rules Checker** - A Node.js AST-based checker for Superset-specific patterns
- Enforces no literal colors (use theme colors)
- Prevents FontAwesome usage (use @superset-ui/core Icons)
- Validates i18n template usage (no template variables)
- Runs via `npm run check:custom-rules`
#### Why This Approach?
- **50-100x faster linting** compared to ESLint for standard rules via OXC
- **Apache-compatible** - No custom binaries, ASF-friendly
- **Maintainable** - Custom rules in JavaScript, not Rust
- **Flexible** - Can evolve as OXC adds plugin support
#### Troubleshooting
**"Plugin 'basic-custom-plugin' not found" Error**
Ensure you're using the explicit config:
```bash
npx oxlint --config oxlint.json
```
**Custom Rules Not Running**
Verify the AST parsing dependencies are installed:
```bash
npm ls @babel/parser @babel/traverse glob
```
#### Adding New Custom Rules
1. Edit `scripts/check-custom-rules.js`
2. Add a new check function following the AST visitor pattern
3. Call the function in `processFile()`
4. Test with `npm run check:custom-rules`
## GitHub Ephemeral Environments
For every PR, an ephemeral environment is automatically deployed for testing.

View File

@@ -43,8 +43,9 @@ This is a list of statements that describe how we do frontend development in Sup
- We organize our repo so similar files live near each other, and tests are co-located with the files they test.
- See: [SIP-61](https://github.com/apache/superset/issues/12098)
- We prefer small, easily testable files and components.
- We use ESLint and Prettier to automatically fix lint errors and format the code.
- We use OXC (oxlint) and Prettier to automatically fix lint errors and format the code.
- We do not debate code formatting style in PRs, instead relying on automated tooling to enforce it.
- If there's not a linting rule, we don't have a rule!
- See: [Linting How-Tos](../contributing/howtos#typescript--javascript)
- We use [React Storybook](https://storybook.js.org/) and [Applitools](https://applitools.com/) to help preview/test and stabilize our components
- A public Storybook with components from the `master` branch is available [here](https://apache-superset.github.io/superset-ui/?path=/story/*)

View File

@@ -86,7 +86,6 @@ Everything you need to contribute to the Apache Superset project. This section i
- **[Configuration Guide](https://superset.apache.org/docs/configuration/configuring-superset)** - Setup and configuration
### Important Files
- **[CONTRIBUTING.md](https://github.com/apache/superset/blob/master/CONTRIBUTING.md)** - Contribution guidelines
- **[CLAUDE.md](https://github.com/apache/superset/blob/master/CLAUDE.md)** - LLM development guide
- **[UPDATING.md](https://github.com/apache/superset/blob/master/UPDATING.md)** - Breaking changes log

View File

@@ -24,57 +24,204 @@ under the License.
# End-to-End Testing
🚧 **Coming Soon** 🚧
Apache Superset uses Playwright for end-to-end testing, migrating from the legacy Cypress tests.
Guide for writing and running end-to-end tests using Playwright and Cypress.
## Topics to be covered:
## Running Tests
### Playwright (Recommended)
- Setting up Playwright environment
- Writing reliable E2E tests
- Page Object Model pattern
- Handling async operations
- Cross-browser testing
- Visual regression testing
- Debugging with Playwright Inspector
- CI/CD integration
### Cypress (Deprecated)
- Legacy Cypress test maintenance
- Migration to Playwright
- Running existing Cypress tests
## Quick Commands
### Playwright
```bash
# Run all Playwright tests
npm run playwright:test
cd superset-frontend
# Run in headed mode (see browser)
npm run playwright:headed
# Run all tests
npm run playwright:test
# or: npx playwright test
# Run specific test file
npx playwright test tests/auth/login.spec.ts
# Debug specific test
npm run playwright:debug tests/auth/login.spec.ts
# Open Playwright UI
# Run with UI mode for debugging
npm run playwright:ui
# or: npx playwright test --ui
# Run in headed mode (see browser)
npm run playwright:headed
# or: npx playwright test --headed
# Debug specific test file
npm run playwright:debug tests/auth/login.spec.ts
# or: npx playwright test --debug tests/auth/login.spec.ts
```
### Cypress (Deprecated)
```bash
# Run Cypress tests
cd superset-frontend/cypress-base
npm run cypress-run-chrome
# Open Cypress UI
npm run cypress-debug
Cypress tests are being migrated to Playwright. For legacy tests:
```bash
cd superset-frontend/cypress-base
npm run cypress-run-chrome # Headless
npm run cypress-debug # Interactive UI
```
---
## Project Architecture
*This documentation is under active development. Check back soon for updates!*
```
superset-frontend/playwright/
├── components/core/ # Reusable UI components
├── pages/ # Page Object Models
├── tests/ # Test files organized by feature
├── utils/ # Shared constants and utilities
└── playwright.config.ts
```
## Design Principles
We follow **YAGNI** (You Aren't Gonna Need It), **DRY** (Don't Repeat Yourself), and **KISS** (Keep It Simple, Stupid) principles:
- Build only what's needed now
- Reuse existing patterns and components
- Keep solutions simple and maintainable
## Page Object Pattern
Each page object encapsulates:
- **Actions**: What you can do on the page
- **Queries**: Information you can get from the page
- **Selectors**: Centralized in private static SELECTORS constant
- **NO Assertions**: Keep assertions in test files
**Example Page Object:**
```typescript
export class AuthPage {
// Selectors centralized in the page object
private static readonly SELECTORS = {
LOGIN_FORM: '[data-test="login-form"]',
USERNAME_INPUT: '[data-test="username-input"]',
} as const;
// Actions - what you can do
async loginWithCredentials(username: string, password: string) {}
// Queries - information you can get
async getCurrentUrl(): Promise<string> {}
// NO assertions - those belong in tests
}
```
**Example Test:**
```typescript
import { test, expect } from '@playwright/test';
import { AuthPage } from '../../pages/AuthPage';
import { LOGIN } from '../../utils/urls';
test('should login with correct credentials', async ({ page }) => {
const authPage = new AuthPage(page);
await authPage.goto();
await authPage.loginWithCredentials('admin', 'general');
// Assertions belong in tests, not page objects
expect(await authPage.getCurrentUrl()).not.toContain(LOGIN);
});
```
## Core Components
Reusable UI interaction classes for common elements (`components/core/`):
- **Form**: Container with properly scoped child element access
- **Input**: Supports `fill()`, `type()`, and `pressSequentially()` methods
- **Button**: Standard click, hover, focus interactions
**Usage Example:**
```typescript
import { Form } from '../components/core';
const loginForm = new Form(page, '[data-test="login-form"]');
const usernameInput = loginForm.getInput('[data-test="username-input"]');
await usernameInput.fill('admin');
```
## Test Reports
Playwright generates multiple reports for better visibility:
```bash
# View interactive HTML report (opens automatically on failure)
npm run playwright:report
# or: npx playwright show-report
# View test trace for debugging failures
npx playwright show-trace test-results/[test-name]/trace.zip
```
### Report Types
- **List Reporter**: Shows progress and summary table in terminal
- **HTML Report**: Interactive web interface with screenshots, videos, and traces
- **JSON Report**: Machine-readable format in `test-results/results.json`
- **GitHub Actions**: Annotations in CI for failed tests
### Debugging Failed Tests
When tests fail, Playwright automatically captures:
- **Screenshots** at the point of failure
- **Videos** of the entire test run
- **Traces** with timeline and network activity
- **Error context** with detailed debugging information
All debugging artifacts are available in the HTML report for easy analysis.
## Configuration
- **Config**: `playwright.config.ts` - matches Cypress settings
- **Base URL**: `http://localhost:8088` (assumes Superset running)
- **Browsers**: Chrome only for Phase 1 (YAGNI)
- **Retries**: 2 in CI, 0 locally (matches Cypress)
## Contributing Guidelines
### Adding New Tests
1. **Check existing components** before creating new ones
2. **Use page objects** for page interactions
3. **Keep assertions in tests**, not page objects
4. **Follow naming conventions**: `feature.spec.ts`
### Adding New Components
1. **Follow YAGNI**: Only build what's immediately needed
2. **Use Locator-based scoping** for proper element isolation
3. **Support both string selectors and Locator objects** via constructor overloads
4. **Add to `components/core/index.ts`** for easy importing
### Adding New Page Objects
1. **Centralize selectors** in private static SELECTORS constant
2. **Import shared constants** from `utils/urls.ts`
3. **Actions and queries only** - no assertions
4. **Use existing components** for DOM interactions
## Migration from Cypress
When porting Cypress tests:
1. **Port the logic**, not the implementation
2. **Use page objects** instead of inline selectors
3. **Replace `cy.intercept/cy.wait`** with `page.waitForRequest()`
4. **Use shared constants** from `utils/urls.ts`
5. **Follow the established patterns** shown in `tests/auth/login.spec.ts`
## Best Practices
- **Centralize selectors** in page objects
- **Centralize URLs** in `utils/urls.ts`
- **Use meaningful test descriptions**
- **Keep page objects action-focused**
- **Put assertions in tests, not page objects**
- **Follow the existing patterns** for consistency

View File

@@ -441,7 +441,7 @@ 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.
:::resources
- [Blog: Feature Flags in Apache Superset](https://preset.io/blog/feature-flags-in-apache-superset-and-preset/)

View File

@@ -0,0 +1,107 @@
---
title: Feature Flags
hide_title: true
sidebar_position: 2
version: 1
---
import featureFlags from '@site/static/feature-flags.json';
export const FlagTable = ({flags}) => (
<table>
<thead>
<tr>
<th>Flag</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{flags.map((flag) => (
<tr key={flag.name}>
<td><code>{flag.name}</code></td>
<td><code>{flag.default ? 'True' : 'False'}</code></td>
<td>
{flag.description}
{flag.docs && (
<> (<a href={flag.docs}>docs</a>)</>
)}
</td>
</tr>
))}
</tbody>
</table>
);
# Feature Flags
Superset uses feature flags to control the availability of features. Feature flags allow
gradual rollout of new functionality and provide a way to enable experimental features.
To enable a feature flag, add it to your `superset_config.py`:
```python
FEATURE_FLAGS = {
"ENABLE_TEMPLATE_PROCESSING": True,
}
```
## Lifecycle
Feature flags progress through lifecycle stages:
| Stage | Description |
|-------|-------------|
| **Development** | Experimental features under active development. May be incomplete or unstable. |
| **Testing** | Feature complete but undergoing testing. Usable but may contain bugs. |
| **Stable** | Production-ready features. Safe for all deployments. |
| **Deprecated** | Features scheduled for removal. Migrate away from these. |
---
## Development
These features are experimental and under active development. Use only in development environments.
<FlagTable flags={featureFlags.flags.development} />
---
## Testing
These features are complete but still being tested. They are usable but may have bugs.
<FlagTable flags={featureFlags.flags.testing} />
---
## Stable
These features are production-ready and safe to enable.
<FlagTable flags={featureFlags.flags.stable} />
---
## Deprecated
These features are scheduled for removal. Plan to migrate away from them.
<FlagTable flags={featureFlags.flags.deprecated} />
---
## Adding New Feature Flags
When adding a new feature flag to `superset/config.py`, include the following annotations:
```python
# Description of what the feature does
# @lifecycle: development | testing | stable | deprecated
# @docs: https://superset.apache.org/docs/... (optional)
# @category: runtime_config | path_to_deprecation (optional, for stable flags)
"MY_NEW_FEATURE": False,
```
This documentation is auto-generated from the annotations in
[config.py](https://github.com/apache/superset/blob/master/superset/config.py).

View File

@@ -60,7 +60,7 @@ There are two approaches to making dashboards publicly accessible:
**Option 2: Dashboard-level access (selective control)**
1. Set `PUBLIC_ROLE_LIKE = "Public"` in `superset_config.py`
2. Add the `'DASHBOARD_RBAC': True` [Feature Flag](https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md)
2. Add the `'DASHBOARD_RBAC': True` [Feature Flag](/docs/configuration/feature-flags)
3. Edit each dashboard's properties and add the "Public" role
4. Only dashboards with the Public role explicitly assigned are visible to anonymous users

View File

@@ -605,7 +605,7 @@ export enum FeatureFlag {
those specified under FEATURE_FLAGS in `superset_config.py`. For example, `DEFAULT_FEATURE_FLAGS = { 'FOO': True, 'BAR': False }` in `superset/config.py` and `FEATURE_FLAGS = { 'BAR': True, 'BAZ': True }` in `superset_config.py` will result
in combined feature flags of `{ 'FOO': True, 'BAR': True, 'BAZ': True }`.
The current status of the usability of each flag (stable vs testing, etc) can be found in `RESOURCES/FEATURE_FLAGS.md`.
The current status of the usability of each flag (stable vs testing, etc) can be found in the [Feature Flags](/docs/configuration/feature-flags) documentation.
## Git Hooks

View File

@@ -47,3 +47,15 @@ superset init
While upgrading superset should not delete your charts and dashboards, we recommend following best
practices and to backup your metadata database before upgrading. Before upgrading production, we
recommend upgrading in a staging environment and upgrading production finally during off-peak usage.
## Breaking Changes
For a detailed list of breaking changes and migration notes for each version, see
[UPDATING.md](https://github.com/apache/superset/blob/master/UPDATING.md).
This file documents backwards-incompatible changes and provides guidance for migrating between
major versions, including:
- Configuration changes
- API changes
- Database migrations
- Deprecated features

379
docs/static/feature-flags.json vendored Normal file
View File

@@ -0,0 +1,379 @@
{
"generated": true,
"source": "superset/config.py",
"flags": {
"development": [
{
"name": "AG_GRID_TABLE_ENABLED",
"default": false,
"lifecycle": "development",
"description": "Enables Table V2 (AG Grid) viz plugin"
},
{
"name": "ALERT_REPORT_TABS",
"default": false,
"lifecycle": "development",
"description": "Enables experimental tabs UI for Alerts and Reports"
},
{
"name": "CHART_PLUGINS_EXPERIMENTAL",
"default": false,
"lifecycle": "development",
"description": "Enables experimental chart plugins"
},
{
"name": "CSV_UPLOAD_PYARROW_ENGINE",
"default": false,
"lifecycle": "development",
"description": "Experimental PyArrow engine for CSV parsing (may have issues with dates/nulls)"
},
{
"name": "DATASET_FOLDERS",
"default": false,
"lifecycle": "development",
"description": "Allow metrics and columns to be grouped into folders in the chart builder"
},
{
"name": "DATE_RANGE_TIMESHIFTS_ENABLED",
"default": false,
"lifecycle": "development",
"description": "Enable support for date range timeshifts (e.g., \"2015-01-03 : 2015-01-04\") in addition to relative timeshifts (e.g., \"1 day ago\")"
},
{
"name": "ENABLE_ADVANCED_DATA_TYPES",
"default": false,
"lifecycle": "development",
"description": "Enables advanced data type support"
},
{
"name": "ENABLE_EXTENSIONS",
"default": false,
"lifecycle": "development",
"description": "Enable Superset extensions for custom functionality without modifying core"
},
{
"name": "MATRIXIFY",
"default": false,
"lifecycle": "development",
"description": "Enable Matrixify feature for matrix-style chart layouts"
},
{
"name": "OPTIMIZE_SQL",
"default": false,
"lifecycle": "development",
"description": "Try to optimize SQL queries \u2014 for now only predicate pushdown is supported"
},
{
"name": "PRESTO_EXPAND_DATA",
"default": false,
"lifecycle": "development",
"description": "Expand nested types in Presto into extra columns/arrays. Experimental, doesn't work with all nested types."
},
{
"name": "TABLE_V2_TIME_COMPARISON_ENABLED",
"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": [
{
"name": "ALERT_REPORTS",
"default": false,
"lifecycle": "testing",
"description": "Enables Alerts and Reports functionality",
"docs": "https://superset.apache.org/docs/configuration/alerts-reports"
},
{
"name": "ALERT_REPORTS_FILTER",
"default": false,
"lifecycle": "testing",
"description": "Enables filter functionality in Alerts and Reports"
},
{
"name": "ALERT_REPORT_SLACK_V2",
"default": false,
"lifecycle": "testing",
"description": "Enables Slack V2 integration for Alerts and Reports"
},
{
"name": "ALERT_REPORT_WEBHOOK",
"default": false,
"lifecycle": "testing",
"description": "Enables webhook integration for Alerts and Reports"
},
{
"name": "ALLOW_FULL_CSV_EXPORT",
"default": false,
"lifecycle": "testing",
"description": "Allow users to export full CSV of table viz type. Warning: Could cause server memory/compute issues with large datasets."
},
{
"name": "CACHE_IMPERSONATION",
"default": false,
"lifecycle": "testing",
"description": "Enable caching per impersonation key in datasources with user impersonation"
},
{
"name": "DATE_FORMAT_IN_EMAIL_SUBJECT",
"default": false,
"lifecycle": "testing",
"description": "Allow users to optionally specify date formats in email subjects",
"docs": "https://superset.apache.org/docs/configuration/alerts-reports"
},
{
"name": "DYNAMIC_PLUGINS",
"default": false,
"lifecycle": "testing",
"description": "Enable dynamic plugin loading"
},
{
"name": "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT",
"default": false,
"lifecycle": "testing",
"description": "Generate screenshots (PDF/JPG) of dashboards using web driver. Depends on ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS."
},
{
"name": "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS",
"default": false,
"lifecycle": "testing",
"description": "Enables endpoints to cache and retrieve dashboard screenshots via webdriver. Requires Celery and THUMBNAIL_CACHE_CONFIG."
},
{
"name": "ENABLE_SUPERSET_META_DB",
"default": false,
"lifecycle": "testing",
"description": "Allows users to add a superset:// DB that can query across databases. Experimental with potential security/performance risks. See SUPERSET_META_DB_LIMIT.",
"docs": "https://superset.apache.org/docs/configuration/databases/#querying-across-databases"
},
{
"name": "ESTIMATE_QUERY_COST",
"default": false,
"lifecycle": "testing",
"description": "Enable query cost estimation. Supported in Presto, Postgres, and BigQuery. Requires `cost_estimate_enabled: true` in database `extra` attribute."
},
{
"name": "GLOBAL_ASYNC_QUERIES",
"default": false,
"lifecycle": "testing",
"description": "Enable async queries for dashboards and Explore via WebSocket. Requires Redis 5.0+ and Celery workers.",
"docs": "https://superset.apache.org/docs/contributing/misc#async-chart-queries"
},
{
"name": "IMPERSONATE_WITH_EMAIL_PREFIX",
"default": false,
"lifecycle": "testing",
"description": "When impersonating a user, use the email prefix instead of username"
},
{
"name": "PLAYWRIGHT_REPORTS_AND_THUMBNAILS",
"default": false,
"lifecycle": "testing",
"description": "Replace Selenium with Playwright for reports and thumbnails. Supports deck.gl visualizations. Requires playwright pip package."
},
{
"name": "RLS_IN_SQLLAB",
"default": false,
"lifecycle": "testing",
"description": "Apply RLS rules to SQL Lab queries. Requires query parsing/manipulation. May break queries or allow RLS bypass. Use with care!"
},
{
"name": "SSH_TUNNELING",
"default": false,
"lifecycle": "testing",
"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": "USE_ANALOGOUS_COLORS",
"default": false,
"lifecycle": "testing",
"description": "Use analogous colors in charts"
}
],
"stable": [
{
"name": "ALERTS_ATTACH_REPORTS",
"default": true,
"lifecycle": "stable",
"description": "When enabled, alerts send email/slack with screenshot AND link. When disabled, alerts send only link; reports still send screenshot.",
"category": "runtime_config"
},
{
"name": "ALLOW_ADHOC_SUBQUERY",
"default": false,
"lifecycle": "stable",
"description": "Allow ad-hoc subqueries in SQL Lab",
"category": "runtime_config"
},
{
"name": "CACHE_QUERY_BY_USER",
"default": false,
"lifecycle": "stable",
"description": "Enable caching per user key for Superset cache",
"category": "runtime_config"
},
{
"name": "CSS_TEMPLATES",
"default": true,
"lifecycle": "stable",
"description": "Enables CSS Templates in Settings menu and dashboard forms",
"category": "runtime_config"
},
{
"name": "DASHBOARD_RBAC",
"default": false,
"lifecycle": "stable",
"description": "Role-based access control for dashboards",
"docs": "https://superset.apache.org/docs/using-superset/creating-your-first-dashboard",
"category": "runtime_config"
},
{
"name": "DASHBOARD_VIRTUALIZATION",
"default": true,
"lifecycle": "stable",
"description": "Enables dashboard virtualization for improved performance",
"category": "path_to_deprecation"
},
{
"name": "DATAPANEL_CLOSED_BY_DEFAULT",
"default": false,
"lifecycle": "stable",
"description": "Data panel closed by default in chart builder",
"category": "runtime_config"
},
{
"name": "DRILL_BY",
"default": true,
"lifecycle": "stable",
"description": "Enable drill-by functionality in charts",
"category": "runtime_config"
},
{
"name": "DRUID_JOINS",
"default": false,
"lifecycle": "stable",
"description": "Enable Druid JOINs (requires Druid version with JOIN support)",
"category": "runtime_config"
},
{
"name": "EMBEDDABLE_CHARTS",
"default": true,
"lifecycle": "stable",
"description": "Enable sharing charts with embedding",
"category": "runtime_config"
},
{
"name": "EMBEDDED_SUPERSET",
"default": false,
"lifecycle": "stable",
"description": "Enable embedded Superset functionality",
"category": "runtime_config"
},
{
"name": "ENABLE_FACTORY_RESET_COMMAND",
"default": false,
"lifecycle": "stable",
"description": "Enable factory reset CLI command",
"category": "internal"
},
{
"name": "ENABLE_TEMPLATE_PROCESSING",
"default": false,
"lifecycle": "stable",
"description": "Enable Jinja templating in SQL queries",
"category": "runtime_config"
},
{
"name": "ESCAPE_MARKDOWN_HTML",
"default": false,
"lifecycle": "stable",
"description": "Escape HTML in Markdown components (rather than rendering it)",
"category": "runtime_config"
},
{
"name": "FILTERBAR_CLOSED_BY_DEFAULT",
"default": false,
"lifecycle": "stable",
"description": "Filter bar closed by default when opening dashboard",
"category": "runtime_config"
},
{
"name": "FORCE_GARBAGE_COLLECTION_AFTER_EVERY_REQUEST",
"default": false,
"lifecycle": "stable",
"description": "Force garbage collection after every request",
"category": "runtime_config"
},
{
"name": "LISTVIEWS_DEFAULT_CARD_VIEW",
"default": false,
"lifecycle": "stable",
"description": "Use card view as default in list views",
"category": "runtime_config"
},
{
"name": "MENU_HIDE_USER_INFO",
"default": false,
"lifecycle": "stable",
"description": "Hide user info in the navigation menu",
"category": "runtime_config"
},
{
"name": "SLACK_ENABLE_AVATARS",
"default": false,
"lifecycle": "stable",
"description": "Use Slack avatars for users. Requires adding slack-edge.com to TALISMAN_CONFIG.",
"category": "runtime_config"
},
{
"name": "SQLLAB_BACKEND_PERSISTENCE",
"default": true,
"lifecycle": "stable",
"description": "Enable SQL Lab backend persistence for query state",
"category": "runtime_config"
},
{
"name": "SQLLAB_FORCE_RUN_ASYNC",
"default": false,
"lifecycle": "stable",
"description": "Force SQL Lab to run async via Celery regardless of database settings",
"category": "runtime_config"
},
{
"name": "THUMBNAILS",
"default": false,
"lifecycle": "stable",
"description": "Exposes API endpoint to compute thumbnails",
"docs": "https://superset.apache.org/docs/configuration/cache",
"category": "runtime_config"
}
],
"deprecated": [
{
"name": "AVOID_COLORS_COLLISION",
"default": true,
"lifecycle": "deprecated",
"description": "Avoid color collisions in charts by using distinct colors"
},
{
"name": "DRILL_TO_DETAIL",
"default": true,
"lifecycle": "deprecated",
"description": "Enable drill-to-detail functionality in charts"
},
{
"name": "ENABLE_JAVASCRIPT_CONTROLS",
"default": false,
"lifecycle": "deprecated",
"description": "Allow JavaScript in chart controls. WARNING: XSS security vulnerability!"
}
]
}
}

View File

@@ -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.

View File

@@ -51,7 +51,7 @@ Restart Superset for this configuration change to take effect.
#### Making a Dashboard Public
1. Add the `'DASHBOARD_RBAC': True` [Feature Flag](https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md) to `superset_config.py`
1. Add the `'DASHBOARD_RBAC': True` [Feature Flag](/docs/configuration/feature-flags) to `superset_config.py`
2. Add the `Public` role to your dashboard as described [here](https://superset.apache.org/docs/using-superset/creating-your-first-dashboard/#manage-access-to-dashboards)
#### Embedding a Public Dashboard

View File

@@ -599,7 +599,7 @@ export enum FeatureFlag {
those specified under FEATURE_FLAGS in `superset_config.py`. For example, `DEFAULT_FEATURE_FLAGS = { 'FOO': True, 'BAR': False }` in `superset/config.py` and `FEATURE_FLAGS = { 'BAR': True, 'BAZ': True }` in `superset_config.py` will result
in combined feature flags of `{ 'FOO': True, 'BAR': True, 'BAZ': True }`.
The current status of the usability of each flag (stable vs testing, etc) can be found in `RESOURCES/FEATURE_FLAGS.md`.
The current status of the usability of each flag (stable vs testing, etc) can be found in the [Feature Flags](/docs/configuration/feature-flags) documentation.
## Git Hooks

View File

@@ -165,14 +165,14 @@ Try out Superset's [quickstart](https://superset.apache.org/docs/quickstart/) gu
## Contributor Guide
Interested in contributing? Check out our
[CONTRIBUTING.md](https://github.com/apache/superset/blob/master/CONTRIBUTING.md)
[Developer Portal](https://superset.apache.org/developer_portal/)
to find resources around contributing along with a detailed guide on
how to set up a development environment.
## Resources
- [Superset "In the Wild"](https://github.com/apache/superset/blob/master/RESOURCES/INTHEWILD.md) - open a PR to add your org to the list!
- [Feature Flags](https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md) - the status of Superset's Feature Flags.
- [Feature Flags](/docs/configuration/feature-flags) - the status of Superset's Feature Flags.
- [Standard Roles](https://github.com/apache/superset/blob/master/RESOURCES/STANDARD_ROLES.md) - How RBAC permissions map to roles.
- [Superset Wiki](https://github.com/apache/superset/wiki) - Tons of additional community resources: best practices, community content and other information.
- [Superset SIPs](https://github.com/orgs/apache/projects/170) - The status of Superset's SIPs (Superset Improvement Proposals) for both consensus and implementation status.

View File

@@ -29,7 +29,7 @@ maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
version: 0.15.1 # See [README](https://github.com/apache/superset/blob/master/helm/superset/README.md#versioning) for version details.
version: 0.15.2 # See [README](https://github.com/apache/superset/blob/master/helm/superset/README.md#versioning) for version details.
dependencies:
- name: postgresql
version: 13.4.4

View File

@@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs
# superset
![Version: 0.15.1](https://img.shields.io/badge/Version-0.15.1-informational?style=flat-square)
![Version: 0.15.2](https://img.shields.io/badge/Version-0.15.2-informational?style=flat-square)
Apache Superset is a modern, enterprise-ready business intelligence web application
@@ -257,7 +257,7 @@ On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverri
| supersetWebsockets.config | object | see `values.yaml` | The config.json to pass to the server, see https://github.com/apache/superset/tree/master/superset-websocket Note that the configuration can also read from environment variables (which will have priority), see https://github.com/apache/superset/blob/master/superset-websocket/src/config.ts for a list of supported variables |
| supersetWebsockets.containerSecurityContext | object | `{}` | |
| supersetWebsockets.deploymentAnnotations | object | `{}` | |
| supersetWebsockets.enabled | bool | `false` | This is only required if you intend to use `GLOBAL_ASYNC_QUERIES` in `ws` mode see https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries |
| supersetWebsockets.enabled | bool | `false` | This is only required if you intend to use `GLOBAL_ASYNC_QUERIES` in `ws` mode see https://superset.apache.org/docs/contributing/misc#async-chart-queries |
| supersetWebsockets.extraContainers | list | `[]` | Launch additional containers into supersetWebsockets pods |
| supersetWebsockets.image.pullPolicy | string | `"IfNotPresent"` | |
| supersetWebsockets.image.repository | string | `"oneacrefund/superset-websocket"` | There is no official image (yet), this one is community-supported |

View File

@@ -612,7 +612,7 @@ supersetCeleryFlower:
supersetWebsockets:
# -- This is only required if you intend to use `GLOBAL_ASYNC_QUERIES` in `ws` mode
# see https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries
# see https://superset.apache.org/docs/contributing/misc#async-chart-queries
enabled: false
replicaCount: 1
# -- Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetWebsockets pods

View File

@@ -0,0 +1,200 @@
#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""
Extract feature flag metadata from superset/config.py.
This script parses the annotated feature flags in config.py and outputs
a JSON file that can be consumed by the documentation site to generate
dynamic feature flag tables.
Usage:
python scripts/extract_feature_flags.py > docs/static/feature-flags.json
Annotations supported:
@lifecycle: development | testing | stable | deprecated
@docs: URL to documentation
@category: runtime_config | path_to_deprecation | internal (for stable flags)
"""
import json
import re
import sys
from pathlib import Path
from typing import TypedDict
class FeatureFlag(TypedDict, total=False):
name: str
default: bool
lifecycle: str
description: str
docs: str | None
category: str | None
def extract_feature_flags(config_path: Path) -> list[FeatureFlag]:
"""
Parse config.py and extract feature flag metadata from comments.
Each flag should have a comment block above it with:
- Description (first line(s) before @annotations)
- @lifecycle: development | testing | stable | deprecated
- @docs: URL (optional)
- @category: runtime_config | path_to_deprecation | internal (optional)
"""
content = config_path.read_text()
# Find the DEFAULT_FEATURE_FLAGS dict (type annotation is optional)
match = re.search(
r"DEFAULT_FEATURE_FLAGS(?:\s*:\s*[^=]+)?\s*=\s*\{(.+?)\n\}",
content,
re.DOTALL,
)
if not match:
print(
"ERROR: Could not find DEFAULT_FEATURE_FLAGS in config.py", file=sys.stderr
)
sys.exit(1)
flags_content = match.group(1)
flags: list[FeatureFlag] = []
# Split content into lines for easier processing
lines = flags_content.split("\n")
current_comments: list[str] = []
for line in lines:
stripped = line.strip()
# Skip section headers and dividers
if "====" in stripped or "----" in stripped:
current_comments = []
continue
# Collect comment lines
if stripped.startswith("#"):
comment_text = stripped[1:].strip()
# Skip section description comments
if comment_text.startswith("These features") or comment_text.startswith(
"These flags"
):
current_comments = []
continue
current_comments.append(comment_text)
continue
# Check for flag definition
flag_match = re.match(r'"([A-Z0-9_]+)":\s*(True|False),?', stripped)
if flag_match:
if current_comments:
flag_name = flag_match.group(1)
default_value = flag_match.group(2) == "True"
flag = parse_comment_lines(current_comments, flag_name, default_value)
if flag:
flags.append(flag)
current_comments = [] # Always reset after a flag definition
return flags
def parse_comment_lines(
comment_lines: list[str], flag_name: str, default: bool
) -> FeatureFlag | None:
"""Parse comment lines to extract flag metadata."""
if not comment_lines:
return None
lifecycle = None
docs = None
category = None
description_lines = []
for line in comment_lines:
if line.startswith("@lifecycle:"):
lifecycle = line.split(":", 1)[1].strip()
elif line.startswith("@docs:"):
docs = line.split(":", 1)[1].strip()
elif line.startswith("@category:"):
category = line.split(":", 1)[1].strip()
elif line and not line.startswith("@"):
description_lines.append(line)
if not lifecycle:
# Skip flags without lifecycle annotation
return None
description = " ".join(description_lines)
flag: FeatureFlag = {
"name": flag_name,
"default": default,
"lifecycle": lifecycle,
"description": description,
}
if docs:
flag["docs"] = docs
if category:
flag["category"] = category
return flag
def main() -> None:
# Find config.py relative to this script
script_dir = Path(__file__).parent
repo_root = script_dir.parent
config_path = repo_root / "superset" / "config.py"
if not config_path.exists():
print(f"ERROR: Could not find {config_path}", file=sys.stderr)
sys.exit(1)
flags = extract_feature_flags(config_path)
# Group by lifecycle
grouped: dict[str, list[FeatureFlag]] = {
"development": [],
"testing": [],
"stable": [],
"deprecated": [],
}
for flag in flags:
lifecycle = flag.get("lifecycle", "stable")
if lifecycle in grouped:
grouped[lifecycle].append(flag)
# Sort each group alphabetically by name
for lifecycle in grouped:
grouped[lifecycle].sort(key=lambda f: f["name"])
output = {
"generated": True,
"source": "superset/config.py",
"flags": grouped,
}
print(json.dumps(output, indent=2))
if __name__ == "__main__":
main()

View File

@@ -94,7 +94,7 @@ rest_api.add_extension_api(DatasetReferencesAPI)
## 🤝 Contributing
We welcome contributions! Please see the [Contributing Guide](https://github.com/apache/superset/blob/master/CONTRIBUTING.md) for details.
We welcome contributions! Please see the [Developer Portal](https://superset.apache.org/developer_portal/) for details.
## 📄 License

View File

@@ -91,7 +91,7 @@ extension_name/
## 🤝 Contributing
We welcome contributions! Please see the [Contributing Guide](https://github.com/apache/superset/blob/master/CONTRIBUTING.md) for details.
We welcome contributions! Please see the [Developer Portal](https://superset.apache.org/developer_portal/) for details.
## 📄 License

View File

@@ -1,165 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Superset Frontend Linting
Apache Superset uses a hybrid linting approach combining OXC (Oxidation Compiler) for standard rules and a custom AST-based checker for Superset-specific rules.
## Architecture
The linting system consists of two components:
1. **OXC Linter** (`oxlint`) - A Rust-based linter that's 50-100x faster than ESLint
- Handles all standard JavaScript/TypeScript rules
- Configured via `oxlint.json`
- Runs via `npm run lint` or `npm run lint-fix`
2. **Custom Rules Checker** - A Node.js AST-based checker for Superset-specific patterns
- Enforces no literal colors (use theme colors)
- Prevents FontAwesome usage (use @superset-ui/core Icons)
- Validates i18n template usage (no template variables)
- Runs via `npm run check:custom-rules`
## Usage
### Quick Commands
```bash
# Run both OXC and custom rules
npm run lint:full
# Run OXC linter only (faster for most checks)
npm run lint
# Fix auto-fixable issues with OXC
npm run lint-fix
# Run custom rules checker only
npm run check:custom-rules
# Run on specific files
npm run lint-fix src/components/Button/index.tsx
npm run check:custom-rules src/theme/*.tsx
```
### Pre-commit Hooks
The linting system is integrated with pre-commit hooks:
```bash
# Install pre-commit hooks
pre-commit install
# Run hooks manually on staged files
pre-commit run
# Run on specific files
pre-commit run --files superset-frontend/src/file.tsx
```
## Configuration
### OXC Configuration (`oxlint.json`)
The OXC configuration includes:
- Standard ESLint rules
- React and React Hooks rules
- TypeScript rules
- Import/export rules
- JSX accessibility rules
- Unicorn rules for additional coverage
### Custom Rules
The custom rules are implemented in `scripts/check-custom-rules.js` and check for:
1. **No Literal Colors**: Enforces using theme colors instead of hardcoded hex/rgb values
2. **No FontAwesome**: Requires using `@superset-ui/core` Icons component
3. **Proper i18n Usage**: Prevents template variables in translation functions
## Performance
The hybrid approach provides:
- **50-100x faster linting** compared to ESLint for standard rules via OXC
- **Selective checking** - custom rules only run on changed files during pre-commit
- **Parallel execution** - OXC and custom rules can run concurrently
## Troubleshooting
### "Plugin 'basic-custom-plugin' not found" Error
If you see this error when running `npm run lint`, ensure you're using the explicit config:
```bash
npx oxlint --config oxlint.json
```
### Custom Rules Not Running
Verify the AST parsing dependencies are installed:
```bash
npm ls @babel/parser @babel/traverse glob
```
### Pre-commit Hook Failures
Ensure your changes are staged:
```bash
git add .
pre-commit run
```
## Development
### Adding New Custom Rules
1. Edit `scripts/check-custom-rules.js`
2. Add a new check function following the pattern:
```javascript
function checkNewRule(ast, filepath) {
traverse(ast, {
// AST visitor pattern
});
}
```
3. Call the function in `processFile()`
### Updating OXC Rules
1. Edit `oxlint.json`
2. Test with `npm run lint`
3. Update ignore patterns if needed
## Migration from ESLint
This hybrid approach replaces the previous ESLint setup while maintaining all custom Superset linting rules. The migration provides:
- Significantly faster linting (50-100x improvement)
- Compatibility with Apache Software Foundation requirements (no custom binaries)
- Maintainable JavaScript-based custom rules
## CI/CD Integration
The linting system is integrated into CI via GitHub Actions. See `.github/workflows/superset-frontend-lint.yml` for the CI configuration.

View File

@@ -97,7 +97,7 @@ export function deactivate() {
## 🤝 Contributing
We welcome contributions! Please see the [Contributing Guide](https://github.com/apache/superset/blob/master/CONTRIBUTING.md) for details.
We welcome contributions! Please see the [Developer Portal](https://superset.apache.org/developer_portal/) for details.
## 📄 License

View File

@@ -1,225 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Playwright E2E Tests for Superset
This directory contains Playwright end-to-end tests for Apache Superset, designed as a replacement for the existing Cypress tests during the migration to Playwright.
## Architecture
```
playwright/
├── components/core/ # Reusable UI components
├── pages/ # Page Object Models
├── tests/ # Test files organized by feature
├── utils/ # Shared constants and utilities
└── README.md # This file
```
## Design Principles
We follow **YAGNI** (You Aren't Gonna Need It), **DRY** (Don't Repeat Yourself), and **KISS** (Keep It Simple, Stupid) principles:
- Build only what's needed now
- Reuse existing patterns and components
- Keep solutions simple and maintainable
## Component Architecture
### Core Components (`components/core/`)
Reusable UI interaction classes for common elements:
- **Form**: Container with properly scoped child element access
- **Input**: Supports `fill()`, `type()`, and `pressSequentially()` methods
- **Button**: Standard click, hover, focus interactions
**Usage Example:**
```typescript
import { Form } from '../components/core';
const loginForm = new Form(page, '[data-test="login-form"]');
const usernameInput = loginForm.getInput('[data-test="username-input"]');
await usernameInput.fill('admin');
```
### Page Objects (`pages/`)
Each page object encapsulates:
- **Actions**: What you can do on the page
- **Queries**: Information you can get from the page
- **Selectors**: Centralized in private static SELECTORS constant
- **NO Assertions**: Keep assertions in test files
**Page Object Pattern:**
```typescript
export class AuthPage {
// Selectors centralized in the page object
private static readonly SELECTORS = {
LOGIN_FORM: '[data-test="login-form"]',
USERNAME_INPUT: '[data-test="username-input"]',
} as const;
// Actions - what you can do
async loginWithCredentials(username: string, password: string) {}
// Queries - information you can get
async getCurrentUrl(): Promise<string> {}
// NO assertions - those belong in tests
}
```
### Tests (`tests/`)
Organized by feature/area (auth, dashboard, charts, etc.):
- Use page objects for actions
- Keep assertions in test files
- Import shared constants from `utils/`
**Test Pattern:**
```typescript
import { test, expect } from '@playwright/test';
import { AuthPage } from '../../pages/AuthPage';
import { LOGIN } from '../../utils/urls';
test('should login with correct credentials', async ({ page }) => {
const authPage = new AuthPage(page);
await authPage.goto();
await authPage.loginWithCredentials('admin', 'general');
// Assertions belong in tests, not page objects
expect(await authPage.getCurrentUrl()).not.toContain(LOGIN);
});
```
### Utilities (`utils/`)
Shared constants and utilities:
- **urls.ts**: URL paths and request patterns
- Keep flat exports (no premature namespacing)
## Contributing Guidelines
### Adding New Tests
1. **Check existing components** before creating new ones
2. **Use page objects** for page interactions
3. **Keep assertions in tests**, not page objects
4. **Follow naming conventions**: `feature.spec.ts`
### Adding New Components
1. **Follow YAGNI**: Only build what's immediately needed
2. **Use Locator-based scoping** for proper element isolation
3. **Support both string selectors and Locator objects** via constructor overloads
4. **Add to `components/core/index.ts`** for easy importing
### Adding New Page Objects
1. **Centralize selectors** in private static SELECTORS constant
2. **Import shared constants** from `utils/urls.ts`
3. **Actions and queries only** - no assertions
4. **Use existing components** for DOM interactions
## Running Tests
```bash
# Run all tests
npm run playwright:test
# or: npx playwright test
# Run specific test file
npx playwright test tests/auth/login.spec.ts
# Run with UI mode for debugging
npm run playwright:ui
# or: npx playwright test --ui
# Run in headed mode (see browser)
npm run playwright:headed
# or: npx playwright test --headed
# Debug specific test file
npm run playwright:debug tests/auth/login.spec.ts
# or: npx playwright test --debug tests/auth/login.spec.ts
```
## Test Reports
Playwright generates multiple reports for better visibility:
```bash
# View interactive HTML report (opens automatically on failure)
npm run playwright:report
# or: npx playwright show-report
# View test trace for debugging failures
npx playwright show-trace test-results/[test-name]/trace.zip
```
### Report Types
- **List Reporter**: Shows progress and summary table in terminal
- **HTML Report**: Interactive web interface with screenshots, videos, and traces
- **JSON Report**: Machine-readable format in `test-results/results.json`
- **GitHub Actions**: Annotations in CI for failed tests
### Debugging Failed Tests
When tests fail, Playwright automatically captures:
- **Screenshots** at the point of failure
- **Videos** of the entire test run
- **Traces** with timeline and network activity
- **Error context** with detailed debugging information
All debugging artifacts are available in the HTML report for easy analysis.
## Configuration
- **Config**: `playwright.config.ts` - matches Cypress settings
- **Base URL**: `http://localhost:8088` (assumes Superset running)
- **Browsers**: Chrome only for Phase 1 (YAGNI)
- **Retries**: 2 in CI, 0 locally (matches Cypress)
## Migration from Cypress
When porting Cypress tests:
1. **Port the logic**, not the implementation
2. **Use page objects** instead of inline selectors
3. **Replace `cy.intercept/cy.wait`** with `page.waitForRequest()`
4. **Use shared constants** from `utils/urls.ts`
5. **Follow the established patterns** shown in `tests/auth/login.spec.ts`
## Best Practices
- **Centralize selectors** in page objects
- **Centralize URLs** in `utils/urls.ts`
- **Use meaningful test descriptions**
- **Keep page objects action-focused**
- **Put assertions in tests, not page objects**
- **Follow the existing patterns** for consistency

View File

@@ -97,7 +97,7 @@ GLOBAL_ASYNC_QUERIES_JWT_COOKIE_NAME
GLOBAL_ASYNC_QUERIES_JWT_SECRET
```
More info on Superset configuration values for async queries: https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries
More info on Superset configuration values for async queries: https://superset.apache.org/docs/contributing/misc#async-chart-queries
## StatsD monitoring

View File

@@ -519,143 +519,268 @@ CURRENCIES = ["USD", "EUR", "GBP", "INR", "MXN", "JPY", "CNY"]
# ---------------------------------------------------
# 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
# Experimental PyArrow engine for CSV parsing (may have issues with dates/nulls)
"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.
"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,
"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,
"ALERT_REPORTS_FILTER": False,
"ALERT_REPORT_SLACK_V2": False,
"ALERT_REPORT_WEBHOOK": 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.
"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
"CACHE_IMPERSONATION": False,
# Enable caching per user key for Superset cache (not database cache impersonation)
"CACHE_QUERY_BY_USER": False,
# Enable sharing charts with embedding
"EMBEDDABLE_CHARTS": True,
"DRILL_TO_DETAIL": True, # deprecated
"DRILL_BY": True,
"DATAPANEL_CLOSED_BY_DEFAULT": False,
# When you open the dashboard, the filter panel will be closed
"FILTERBAR_CLOSED_BY_DEFAULT": False,
# The feature is off by default, and currently only supported in Presto and Postgres, # noqa: E501
# and Bigquery.
# It also needs to be enabled on a per-database basis, by adding the key/value pair
# `cost_estimate_enabled: true` to the database `extra` attribute.
"ESTIMATE_QUERY_COST": False,
# Allow users to enable ssh tunneling when creating a DB.
# Users must check whether the DB engine supports SSH Tunnels
# otherwise enabling this flag won't have any effect on the DB.
"SSH_TUNNELING": False,
"AVOID_COLORS_COLLISION": True,
# Do not show user info in the menu
"MENU_HIDE_USER_INFO": False,
# Allows users to add a ``superset://`` DB that can query across databases. This is
# an experimental feature with potential security and performance risks, so use with
# caution. If the feature is enabled you can also set a limit for how much data is
# returned from each database in the ``SUPERSET_META_DB_LIMIT`` configuration value
# in this file.
"ENABLE_SUPERSET_META_DB": False,
# Set to True to replace Selenium with Playwright to execute reports and thumbnails.
# Unlike Selenium, Playwright reports support deck.gl visualizations
# Enabling this feature flag requires installing "playwright" pip package
"PLAYWRIGHT_REPORTS_AND_THUMBNAILS": False,
# Set to True to enable experimental chart plugins
"CHART_PLUGINS_EXPERIMENTAL": False,
# Regardless of database configuration settings, force SQLLAB to run async
# using Celery
"SQLLAB_FORCE_RUN_ASYNC": False,
# Set to True to to enable factory resent CLI command
"ENABLE_FACTORY_RESET_COMMAND": False,
# Whether Superset should use Slack avatars for users.
# If on, you'll want to add "https://avatars.slack-edge.com" to the list of allowed
# domains in your TALISMAN_CONFIG
"SLACK_ENABLE_AVATARS": False,
# Adds a theme editor as a modal dialog in the navbar. Allows people to type in JSON
# Enables CSS Templates functionality in Settings menu and dashboard forms.
# When disabled, users can still add custom CSS to dashboards but cannot use
# pre-built CSS templates.
"CSS_TEMPLATES": True,
# Allow users to optionally specify date formats in email subjects, which will
# be parsed if enabled
"DATE_FORMAT_IN_EMAIL_SUBJECT": False,
# Allow metrics and columns to be grouped into (potentially nested) folders in the
# chart builder
"DATASET_FOLDERS": False,
# Enable Table V2 Viz plugin
# =================================================================
# 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,
# Enable Table v2 time comparison feature
"TABLE_V2_TIME_COMPARISON_ENABLED": False,
# Enable Superset extensions, which allow users to add custom functionality
# to Superset without modifying the core codebase.
"ENABLE_EXTENSIONS": 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,
# 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,
# 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
# =================================================================
# 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,
# Enables webhook integration for Alerts and Reports
# @lifecycle: testing
"ALERT_REPORT_WEBHOOK": False,
# Allow users to export full CSV of table viz type.
# Warning: Could cause server memory/compute issues with large datasets.
# @lifecycle: testing
"ALLOW_FULL_CSV_EXPORT": False,
# Enable caching per impersonation key in datasources with user impersonation
# @lifecycle: testing
"CACHE_IMPERSONATION": False,
# 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,
# =================================================================
# STABLE - PATH TO DEPRECATION
# =================================================================
# These flags are stable and on path to becoming default behavior,
# after which the flag will be deprecated.
# -----------------------------------------------------------------
# Enables dashboard virtualization for improved performance
# @lifecycle: stable
# @category: path_to_deprecation
"DASHBOARD_VIRTUALIZATION": True,
# =================================================================
# STABLE - RUNTIME CONFIGURATION
# =================================================================
# These flags act as runtime configuration options. They are stable
# but will be retained as configuration options rather than deprecated.
# -----------------------------------------------------------------
# When enabled, alerts send email/slack with screenshot AND link.
# When disabled, alerts send only link; reports still send screenshot.
# @lifecycle: stable
# @category: runtime_config
"ALERTS_ATTACH_REPORTS": True,
# Allow ad-hoc subqueries in SQL Lab
# @lifecycle: stable
# @category: runtime_config
"ALLOW_ADHOC_SUBQUERY": False,
# Enable caching per user key for Superset cache
# @lifecycle: stable
# @category: runtime_config
"CACHE_QUERY_BY_USER": False,
# Enables CSS Templates in Settings menu and dashboard forms
# @lifecycle: stable
# @category: runtime_config
"CSS_TEMPLATES": True,
# Role-based access control for dashboards
# @lifecycle: stable
# @category: runtime_config
# @docs: https://superset.apache.org/docs/using-superset/creating-your-first-dashboard
"DASHBOARD_RBAC": False,
# Data panel closed by default in chart builder
# @lifecycle: stable
# @category: runtime_config
"DATAPANEL_CLOSED_BY_DEFAULT": False,
# Enable drill-by functionality in charts
# @lifecycle: stable
# @category: runtime_config
"DRILL_BY": True,
# Enable Druid JOINs (requires Druid version with JOIN support)
# @lifecycle: stable
# @category: runtime_config
"DRUID_JOINS": False,
# Enable sharing charts with embedding
# @lifecycle: stable
# @category: runtime_config
"EMBEDDABLE_CHARTS": True,
# Enable embedded Superset functionality
# @lifecycle: stable
# @category: runtime_config
"EMBEDDED_SUPERSET": False,
# Enable Jinja templating in SQL queries
# @lifecycle: stable
# @category: runtime_config
"ENABLE_TEMPLATE_PROCESSING": False,
# Escape HTML in Markdown components (rather than rendering it)
# @lifecycle: stable
# @category: runtime_config
"ESCAPE_MARKDOWN_HTML": False,
# Filter bar closed by default when opening dashboard
# @lifecycle: stable
# @category: runtime_config
"FILTERBAR_CLOSED_BY_DEFAULT": False,
# Force garbage collection after every request
# @lifecycle: stable
# @category: runtime_config
"FORCE_GARBAGE_COLLECTION_AFTER_EVERY_REQUEST": False,
# Use card view as default in list views
# @lifecycle: stable
# @category: runtime_config
"LISTVIEWS_DEFAULT_CARD_VIEW": False,
# Hide user info in the navigation menu
# @lifecycle: stable
# @category: runtime_config
"MENU_HIDE_USER_INFO": False,
# Use Slack avatars for users. Requires adding slack-edge.com to TALISMAN_CONFIG.
# @lifecycle: stable
# @category: runtime_config
"SLACK_ENABLE_AVATARS": False,
# Enable SQL Lab backend persistence for query state
# @lifecycle: stable
# @category: runtime_config
"SQLLAB_BACKEND_PERSISTENCE": True,
# Force SQL Lab to run async via Celery regardless of database settings
# @lifecycle: stable
# @category: runtime_config
"SQLLAB_FORCE_RUN_ASYNC": False,
# Exposes API endpoint to compute thumbnails
# @lifecycle: stable
# @category: runtime_config
# @docs: https://superset.apache.org/docs/configuration/cache
"THUMBNAILS": False,
# =================================================================
# STABLE - INTERNAL/ADMIN
# =================================================================
# These flags are for internal use or administrative purposes.
# -----------------------------------------------------------------
# Enable factory reset CLI command
# @lifecycle: stable
# @category: internal
"ENABLE_FACTORY_RESET_COMMAND": False,
# =================================================================
# DEPRECATED
# =================================================================
# These flags default to True and will be removed in a future major
# release. Set to True in your config to avoid unexpected changes.
# -----------------------------------------------------------------
# Avoid color collisions in charts by using distinct colors
# @lifecycle: deprecated
"AVOID_COLORS_COLLISION": True,
# Enable drill-to-detail functionality in charts
# @lifecycle: deprecated
"DRILL_TO_DETAIL": True,
# Allow JavaScript in chart controls. WARNING: XSS security vulnerability!
# @lifecycle: deprecated
"ENABLE_JAVASCRIPT_CONTROLS": False,
}
# ------------------------------