Flips the ALERT_REPORT_SLACK_V2 feature flag default to True so the v2 auto-upgrade path runs out of the box, and adds one-shot DeprecationWarning + logger.warning emissions when v1 still runs (flag explicitly off, or bot missing the channels:read scope). Slack retired the legacy files.upload endpoint in 2025, so v1 file uploads are already broken at the API level — only text-only chat_postMessage sends still succeed via the legacy path. The bulk of the change is bulletproof unit-test coverage for SlackV2Notification ahead of v1 removal in the next major: - files_upload_v2 invocation with PNG (single + multiple), CSV, and PDF, asserting channel, file, title, filename, and initial_comment kwargs - multi-channel fan-out (3 channels x 2 files = 6 uploads) and text-only multi-channel chat_postMessage - inline-file precedence (CSV beats screenshots beats PDF) - parametrized exception mapping across 7 slack_sdk error types -> the 4 NotificationException subclasses - statsd .ok and .warning gauge emission via the @statsd_gauge decorator - execution_id propagation from g.logs_context to the success log, plus the falsy g.logs_context fallback path - end-to-end auto-upgrade round-trip: v1 SLACK recipient with channel names raises SlackV1NotificationError -> update_report_schedule_slack_v2 rewrites the row to channel IDs -> SlackV2Notification fast-paths the next send with no further channel resolution - should_use_v2_api() warning behavior: deprecation warning emitted exactly once across multiple calls in both the flag-off and scope-missing paths, with the scope-missing logger.warning continuing to fire each call so operators see the actionable scope hint in their report-execution logs Also locks in current behavior of the @backoff.on_exception(SlackApiError, ...) decorator on send(): because send() catches every SlackApiError internally and re-raises as NotificationUnprocessableException, backoff never sees the target exception type and no retries actually fire. Test asserts call_count == 1 with a docstring marking this as a known design issue to address separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This is the public documentation site for Superset, built using Docusaurus 3. See the Developer Docs for documentation on contributing to documentation.
Version Management
The Superset documentation site uses Docusaurus versioning with four independent sections:
- User Documentation (
/user-docs/) - End-user guides and tutorials - Admin Documentation (
/admin-docs/) - Installation, configuration, and security - Developer Docs (
/developer-docs/) - Developer guides, contributing, and extensions - Component Playground (
/components/) - Interactive component examples (currently disabled)
Each section maintains its own version history and can be versioned independently.
Creating a New Version
To create a new version for any section, use the Docusaurus version command with the appropriate plugin ID or use our automated scripts:
Using Automated Scripts (Required)
⚠️ Important: Always use these custom commands instead of the native Docusaurus commands. These scripts ensure that both the Docusaurus versioning system AND the versions-config.json file are updated correctly.
# Main Documentation
yarn version:add:docs 1.2.0
# Developer Portal
yarn version:add:developer_portal 1.2.0
# Component Playground (when enabled)
yarn version:add:components 1.2.0
Do NOT use the native Docusaurus commands directly (yarn docusaurus docs:version), as they will:
- ❌ Create version files but NOT update
versions-config.json - ❌ Cause versions to not appear in dropdown menus
- ❌ Require manual fixes to synchronize the configuration
Managing Versions
With Automated Scripts
The automated scripts handle all configuration updates automatically. No manual editing required!
Manual Configuration
If creating versions manually, you'll need to:
-
Update
versions-config.json(ordocusaurus.config.tsif not using dynamic config):- Add version to
onlyIncludeVersionsarray - Add version metadata to
versionsobject - Update
lastVersionif needed
- Add version to
-
Files Created by Versioning: When a new version is created, Docusaurus generates:
- Versioned docs folder:
[section]_versioned_docs/version-X.X.X/ - Versioned sidebars:
[section]_versioned_sidebars/version-X.X.X-sidebars.json - Versions list:
[section]_versions.json
Note: For main docs, the prefix is omitted (e.g.,
versioned_docs/instead ofdocs_versioned_docs/) - Versioned docs folder:
-
Important: After adding a version, restart the development server to see changes:
yarn stop yarn start
Removing a Version
Using Automated Scripts (Recommended)
# Main Documentation
yarn version:remove:docs 1.0.0
# Developer Portal
yarn version:remove:developer_portal 1.0.0
# Component Playground
yarn version:remove:components 1.0.0
Manual Removal
To manually remove a version:
-
Delete the version folder from the appropriate location:
- Main docs:
versioned_docs/version-X.X.X/(no prefix for main) - Developer Portal:
developer_portal_versioned_docs/version-X.X.X/ - Components:
components_versioned_docs/version-X.X.X/
- Main docs:
-
Delete the version metadata file:
- Main docs:
versioned_sidebars/version-X.X.X-sidebars.json(no prefix) - Developer Portal:
developer_portal_versioned_sidebars/version-X.X.X-sidebars.json - Components:
components_versioned_sidebars/version-X.X.X-sidebars.json
- Main docs:
-
Update the versions list file:
- Main docs:
versions.json - Developer Portal:
developer_portal_versions.json - Components:
components_versions.json
- Main docs:
-
Update configuration:
- If using dynamic config: Update
versions-config.json - If using static config: Update
docusaurus.config.ts
- If using dynamic config: Update
-
Restart the server to see changes
Version Configuration Examples
Main Documentation (default plugin)
docs: {
includeCurrentVersion: true,
lastVersion: 'current', // Makes /docs/ show Next version
onlyIncludeVersions: ['current', '1.1.0', '1.0.0'],
versions: {
current: {
label: 'Next',
path: '', // Empty path for default routing
banner: 'unreleased',
},
'1.1.0': {
label: '1.1.0',
path: '1.1.0',
banner: 'none',
},
},
}
Developer Portal & Components (custom plugins)
{
id: 'developer_portal',
path: 'developer_portal',
routeBasePath: 'developer_portal',
includeCurrentVersion: true,
lastVersion: '1.1.0', // Default version
onlyIncludeVersions: ['current', '1.1.0', '1.0.0'],
versions: {
current: {
label: 'Next',
path: 'next',
banner: 'unreleased',
},
'1.1.0': {
label: '1.1.0',
path: '1.1.0',
banner: 'none',
},
},
}
Best Practices
- Version naming: Use semantic versioning (e.g., 1.0.0, 1.1.0, 2.0.0)
- Version banners: Use
'unreleased'for development versions,'none'for stable releases - Limit displayed versions: Use
onlyIncludeVersionsto show only relevant versions - Test locally: Always test version changes locally before deploying
- Independent versioning: Each section can have different version numbers and release cycles
Troubleshooting
Version Not Showing After Creation
If you accidentally used yarn docusaurus docs:version instead of yarn version:add:
- Problem: The version files were created but
versions-config.jsonwasn't updated - Solution: Either:
- Revert the changes:
git restore versions.json && rm -rf versioned_docs/ versioned_sidebars/ - Then use the correct command:
yarn version:add:docs <version>
- Revert the changes:
For other issues:
- Restart the server: Changes to version configuration require a server restart
- Check config file: Ensure
versions-config.jsonincludes the new version - Verify files exist: Check that versioned docs folder was created
Broken Links in Versioned Documentation
When creating a new version, links in the documentation are preserved as-is. Common issues:
- Cross-section links: Links between sections (e.g., from developer_portal to docs) need to be version-aware
- Absolute vs relative paths: Use relative paths within the same section
- Version-specific URLs: Update hardcoded URLs to use version variables
To fix broken links:
- Use
type: 'doc'withdocIdfor version-aware navigation in navbar - Use relative paths within the same documentation section
- Test all versions after creation to identify broken links