Skip to content

Commit c288f3f

Browse files
committed
Merge branch 'master' into enxdev/fix/custom-tabs
2 parents e21fb56 + 6663709 commit c288f3f

File tree

645 files changed

+62724
-19544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

645 files changed

+62724
-19544
lines changed

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PreToolUse": [
4+
{
5+
"matcher": "Bash",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "jq -r '.tool_input.command // \"\"' | grep -qE '^git commit' && cd \"$CLAUDE_PROJECT_DIR\" && echo '🔍 Running pre-commit before commit...' && pre-commit run || true"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.github/actions/change-detector/label-draft-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
steps:
1111
- name: Check if the PR is a draft
1212
id: check-draft
13-
uses: actions/github-script@v6
13+
uses: actions/github-script@v8
1414
with:
1515
script: |
1616
const isDraft = context.payload.pull_request.draft;

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@ updates:
1212
# not until React >= 18.0.0
1313
- dependency-name: "storybook"
1414
- dependency-name: "@storybook*"
15+
# remark-gfm v4+ requires react-markdown v9+, which needs React 18
16+
- dependency-name: "remark-gfm"
17+
- dependency-name: "react-markdown"
1518
# JSDOM v30 doesn't play well with Jest v30
1619
# Source: https://jestjs.io/blog#known-issues
1720
# GH thread: https://github.com/jsdom/jsdom/issues/3492
1821
- dependency-name: "jest-environment-jsdom"
22+
# `@swc/plugin-transform-imports` doesn't work with current Webpack-SWC hybrid setup
23+
# See https://github.com/apache/superset/pull/37384#issuecomment-3793991389
24+
# TODO: remove the plugin once Lodash usage has been migrated to a more readily tree-shakeable alternative
25+
- dependency-name: "@swc/plugin-transform-imports"
1926
directory: "/superset-frontend/"
2027
schedule:
2128
interval: "daily"

.github/workflows/check_db_migration_confict.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
`❗ @${pull.user.login} Your base branch \`${currentBranch}\` has ` +
7070
'also updated `superset/migrations`.\n' +
7171
'\n' +
72-
'**Please consider rebasing your branch and [resolving potential db migration conflicts](https://github.com/apache/superset/blob/master/CONTRIBUTING.md#merging-db-migrations).**',
72+
'**Please consider rebasing your branch and [resolving potential db migration conflicts](https://superset.apache.org/docs/contributing/development#merging-db-migrations).**',
7373
});
7474
}
7575
}

.github/workflows/superset-docs-deploy.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Docs Deployment
22

33
on:
4+
# Deploy after integration tests complete on master
5+
workflow_run:
6+
workflows: ["Python-Integration"]
7+
types: [completed]
8+
branches: [master]
9+
10+
# Also allow manual trigger and direct pushes to docs
411
push:
512
paths:
613
- "docs/**"
@@ -30,9 +37,10 @@ jobs:
3037
name: Build & Deploy
3138
runs-on: ubuntu-24.04
3239
steps:
33-
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
40+
- name: "Checkout ${{ github.event.workflow_run.head_sha || github.sha }}"
3441
uses: actions/checkout@v6
3542
with:
43+
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
3644
persist-credentials: false
3745
submodules: recursive
3846
- name: Set up Node.js
@@ -58,6 +66,35 @@ jobs:
5866
working-directory: docs
5967
run: |
6068
yarn install --check-cache
69+
- name: Download database diagnostics (if triggered by integration tests)
70+
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'
71+
uses: dawidd6/action-download-artifact@v12
72+
continue-on-error: true
73+
with:
74+
workflow: superset-python-integrationtest.yml
75+
run_id: ${{ github.event.workflow_run.id }}
76+
name: database-diagnostics
77+
path: docs/src/data/
78+
- name: Try to download latest diagnostics (for push/dispatch triggers)
79+
if: github.event_name != 'workflow_run'
80+
uses: dawidd6/action-download-artifact@v12
81+
continue-on-error: true
82+
with:
83+
workflow: superset-python-integrationtest.yml
84+
name: database-diagnostics
85+
path: docs/src/data/
86+
branch: master
87+
search_artifacts: true
88+
if_no_artifact_found: warn
89+
- name: Use diagnostics artifact if available
90+
working-directory: docs
91+
run: |
92+
if [ -f "src/data/databases-diagnostics.json" ]; then
93+
echo "Using fresh diagnostics from integration tests"
94+
mv src/data/databases-diagnostics.json src/data/databases.json
95+
else
96+
echo "Using committed databases.json (no artifact found)"
97+
fi
6198
- name: yarn build
6299
working-directory: docs
63100
run: |
@@ -71,5 +108,5 @@ jobs:
71108
destination-github-username: "apache"
72109
destination-repository-name: "superset-site"
73110
target-branch: "asf-site"
74-
commit-message: "deploying docs: ${{ github.event.head_commit.message }} (apache/superset@${{ github.sha }})"
111+
commit-message: "deploying docs: ${{ github.event.head_commit.message || 'triggered by integration tests' }} (apache/superset@${{ github.event.workflow_run.head_sha || github.sha }})"
75112
user-email: dev@superset.apache.org

.github/workflows/superset-docs-verify.yml

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@ on:
44
pull_request:
55
paths:
66
- "docs/**"
7+
- "superset/db_engine_specs/**"
78
- ".github/workflows/superset-docs-verify.yml"
89
types: [synchronize, opened, reopened, ready_for_review]
10+
workflow_run:
11+
workflows: ["Python-Integration"]
12+
types: [completed]
913

1014
# cancel previous workflow jobs for PRs
1115
concurrency:
12-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_sha || github.run_id }}
1317
cancel-in-progress: true
1418

1519
jobs:
1620
linkinator:
1721
# See docs here: https://github.com/marketplace/actions/linkinator
22+
# Only run on pull_request, not workflow_run
23+
if: github.event_name == 'pull_request'
1824
name: Link Checking
1925
runs-on: ubuntu-latest
2026
steps:
@@ -50,8 +56,11 @@ jobs:
5056
https://timbr.ai/,
5157
https://opensource.org/license/apache-2-0,
5258
https://www.plaidcloud.com/
53-
build-deploy:
54-
name: Build & Deploy
59+
60+
build-on-pr:
61+
# Build docs when PR changes docs/** (uses committed databases.json)
62+
if: github.event_name == 'pull_request'
63+
name: Build (PR trigger)
5564
runs-on: ubuntu-24.04
5665
defaults:
5766
run:
@@ -75,3 +84,50 @@ jobs:
7584
- name: yarn build
7685
run: |
7786
yarn build
87+
88+
build-after-tests:
89+
# Build docs after integration tests complete (uses fresh diagnostics)
90+
# Only runs if integration tests succeeded
91+
if: >
92+
github.event_name == 'workflow_run' &&
93+
github.event.workflow_run.conclusion == 'success'
94+
name: Build (after integration tests)
95+
runs-on: ubuntu-24.04
96+
defaults:
97+
run:
98+
working-directory: docs
99+
steps:
100+
- name: "Checkout PR head: ${{ github.event.workflow_run.head_sha }}"
101+
uses: actions/checkout@v6
102+
with:
103+
ref: ${{ github.event.workflow_run.head_sha }}
104+
persist-credentials: false
105+
submodules: recursive
106+
- name: Set up Node.js
107+
uses: actions/setup-node@v6
108+
with:
109+
node-version-file: './docs/.nvmrc'
110+
- name: yarn install
111+
run: |
112+
yarn install --check-cache
113+
- name: Download database diagnostics from integration tests
114+
uses: dawidd6/action-download-artifact@v12
115+
with:
116+
workflow: superset-python-integrationtest.yml
117+
run_id: ${{ github.event.workflow_run.id }}
118+
name: database-diagnostics
119+
path: docs/src/data/
120+
- name: Use fresh diagnostics
121+
run: |
122+
if [ -f "src/data/databases-diagnostics.json" ]; then
123+
echo "Using fresh diagnostics from integration tests"
124+
mv src/data/databases-diagnostics.json src/data/databases.json
125+
else
126+
echo "Warning: No diagnostics artifact found, using committed data"
127+
fi
128+
- name: yarn typecheck
129+
run: |
130+
yarn typecheck
131+
- name: yarn build
132+
run: |
133+
yarn build

.github/workflows/superset-python-integrationtest.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,36 @@ jobs:
7373
flags: python,mysql
7474
token: ${{ secrets.CODECOV_TOKEN }}
7575
verbose: true
76+
- name: Generate database diagnostics for docs
77+
if: steps.check.outputs.python
78+
env:
79+
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
80+
SUPERSET__SQLALCHEMY_DATABASE_URI: |
81+
mysql+mysqldb://superset:superset@127.0.0.1:13306/superset?charset=utf8mb4&binary_prefix=true
82+
run: |
83+
python -c "
84+
import json
85+
from superset.app import create_app
86+
from superset.db_engine_specs.lib import generate_yaml_docs
87+
app = create_app()
88+
with app.app_context():
89+
docs = generate_yaml_docs()
90+
# Wrap in the expected format
91+
output = {
92+
'generated': '$(date -Iseconds)',
93+
'databases': docs
94+
}
95+
with open('databases-diagnostics.json', 'w') as f:
96+
json.dump(output, f, indent=2, default=str)
97+
print(f'Generated diagnostics for {len(docs)} databases')
98+
"
99+
- name: Upload database diagnostics artifact
100+
if: steps.check.outputs.python
101+
uses: actions/upload-artifact@v6
102+
with:
103+
name: database-diagnostics
104+
path: databases-diagnostics.json
105+
retention-days: 7
76106
test-postgres:
77107
runs-on: ubuntu-24.04
78108
strategy:

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ tmp
6161
rat-results.txt
6262
superset/app/
6363
superset-websocket/config.json
64+
.direnv
6465

6566
# Node.js, webpack artifacts, storybook
6667
*.entry.js
@@ -72,10 +73,6 @@ superset/static/assets/*
7273
superset/static/uploads/*
7374
!superset/static/uploads/.gitkeep
7475
superset/static/version_info.json
75-
superset-frontend/**/esm/*
76-
superset-frontend/**/lib/*
77-
superset-frontend/**/storybook-static/*
78-
superset-frontend/migration-storybook.log
7976
yarn-error.log
8077
*.map
8178
*.min.js
@@ -139,3 +136,4 @@ PROJECT.md
139136
.env.local
140137
oxc-custom-build/
141138
*.code-workspace
139+
*.duckdb

.pre-commit-config.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ repos:
4949
hooks:
5050
- id: check-docstring-first
5151
- id: check-added-large-files
52-
exclude: ^.*\.(geojson)$|^docs/static/img/screenshots/.*|^superset-frontend/CHANGELOG\.md$
52+
exclude: ^.*\.(geojson)$|^docs/static/img/screenshots/.*|^superset-frontend/CHANGELOG\.md$|^superset/examples/.*/data\.parquet$
5353
- id: check-yaml
5454
exclude: ^helm/superset/templates/
5555
- id: debug-statements
@@ -142,3 +142,18 @@ repos:
142142
else
143143
echo "No Python files to lint."
144144
fi
145+
- id: db-engine-spec-metadata
146+
name: database engine spec metadata validation
147+
entry: python superset/db_engine_specs/lint_metadata.py --strict
148+
language: system
149+
files: ^superset/db_engine_specs/.*\.py$
150+
exclude: ^superset/db_engine_specs/(base|lib|lint_metadata|__init__)\.py$
151+
pass_filenames: false
152+
- repo: local
153+
hooks:
154+
- id: feature-flags-sync
155+
name: feature flags documentation sync
156+
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'
157+
language: system
158+
files: ^superset/config\.py$
159+
pass_filenames: false

.rat-excludes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,14 @@ temporary_superset_ui/*
7171
google-big-query.svg
7272
google-sheets.svg
7373
ibm-db2.svg
74+
netlify.png
7475
postgresql.svg
7576
snowflake.svg
7677
ydb.svg
7778
loading.svg
79+
apache-solr.svg
80+
azure.svg
81+
superset.svg
7882

7983
# docs third-party logos, i.e. docs/static/img/logos/*
8084
logos/*

0 commit comments

Comments
 (0)