Skip to content

Commit 62dfeb1

Browse files
Merge remote-tracking branch 'origin/master' into disable-sqlparse
2 parents 21c2915 + b627011 commit 62dfeb1

File tree

3,184 files changed

+239251
-385672
lines changed

Some content is hidden

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

3,184 files changed

+239251
-385672
lines changed

.asf.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,16 @@ github:
6363
# combination here.
6464
contexts:
6565
- lint-check
66+
- cypress-matrix (0, chrome)
6667
- cypress-matrix (1, chrome)
6768
- cypress-matrix (2, chrome)
6869
- cypress-matrix (3, chrome)
70+
- cypress-matrix (4, chrome)
71+
- cypress-matrix (5, chrome)
6972
- frontend-build
70-
- pre-commit
71-
- python-lint
73+
- pre-commit (current)
74+
- pre-commit (next)
75+
- pre-commit (previous)
7276
- test-mysql
7377
- test-postgres (current)
7478
- test-postgres (next)

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
docker/**/*.sh text eol=lf
2+
*.svg binary

.github/CODEOWNERS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# https://github.com/apache/superset/issues/13351
44

5-
/superset/migrations/ @apache/superset-committers
5+
/superset/migrations/ @mistercrunch @michael-s-molina @betodealmeida @eschutho
66

77
# Notify some committers of changes in the components
88

@@ -30,7 +30,3 @@
3030

3131
**/*.geojson @villebro @rusackas
3232
/superset-frontend/plugins/legacy-plugin-chart-country-map/ @villebro @rusackas
33-
34-
# Translations are a finnicky contribution that we care about
35-
36-
/superset/translations/ @villebro @rusackas

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,17 @@ body:
77
value: |
88
Hello Superset Community member! Please keep things tidy by putting your post in the proper place:
99
10+
🚨 Reporting a security issue: send an email to security@superset.apache.org. DO NOT USE GITHUB ISSUES TO REPORT SECURITY PROBLEMS.
1011
🐛 Reporting a bug: use this form.
1112
🙏 Asking a question or getting help: post in the [Superset Slack chat](http://bit.ly/join-superset-slack) or [GitHub Discussions](https://github.com/apache/superset/discussions) under "Q&A / Help".
1213
💡 Requesting a new feature: Search [GitHub Discussions](https://github.com/apache/superset/discussions) to see if it exists already. If not, add a new post there under "Ideas".
1314
- type: textarea
1415
id: bug-description
1516
attributes:
1617
label: Bug description
17-
description: A clear and concise description of what the bug is.
18-
validations:
19-
required: true
20-
- type: textarea
21-
id: repro-steps
22-
attributes:
23-
label: How to reproduce the bug
18+
description: A clear description of what the bug is, including reproduction steps and expected behavior.
2419
placeholder: |
20+
The bug is that...
2521
1. Go to '...'
2622
2. Click on '....'
2723
3. Scroll down to '....'
@@ -45,8 +41,8 @@ body:
4541
label: Superset version
4642
options:
4743
- master / latest-dev
48-
- "4.0.0"
49-
- "3.1.2"
44+
- "4.0.2"
45+
- "3.1.3"
5046
validations:
5147
required: true
5248
- type: dropdown

.github/actions/setup-backend/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ runs:
2929
echo "PYTHON_VERSION=3.10" >> $GITHUB_ENV
3030
elif [ "${{ inputs.python-version }}" = "next" ]; then
3131
echo "PYTHON_VERSION=3.11" >> $GITHUB_ENV
32+
elif [ "${{ inputs.python-version }}" = "previous" ]; then
33+
echo "PYTHON_VERSION=3.9" >> $GITHUB_ENV
3234
else
3335
echo "PYTHON_VERSION=${{ inputs.python-version }}" >> $GITHUB_ENV
3436
fi

.github/actions/setup-supersetbot/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ runs:
3434
# simple trick to install globally with dependencies
3535
npm pack
3636
npm install -g ./supersetbot*.tgz
37+
38+
- name: echo supersetbot version
39+
shell: bash
40+
run: supersetbot version

.github/dependabot.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ updates:
88

99
- package-ecosystem: "npm"
1010
ignore:
11-
# not until node >= 18.12.0
12-
- dependency-name: "css-minimizer-webpack-plugin"
11+
# not until React >= 18.0.0
12+
- dependency-name: "storybook"
13+
- dependency-name: "@storybook*"
1314
directory: "/superset-frontend/"
1415
schedule:
1516
interval: "monthly"
@@ -19,14 +20,11 @@ updates:
1920
open-pull-requests-limit: 30
2021
versioning-strategy: increase
2122

22-
- package-ecosystem: "pip"
23-
directory: "/requirements/"
24-
schedule:
25-
interval: "monthly"
26-
labels:
27-
- pip
28-
- dependabot
29-
open-pull-requests-limit: 30
23+
24+
# - package-ecosystem: "pip"
25+
# NOTE: as dependabot isn't compatible with our python
26+
# dependency setup (pip-compile-multi), we'll be using
27+
# `supersetbot` instead
3028

3129
- package-ecosystem: "npm"
3230
directory: ".github/actions"

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@
7272
- any-glob-to-any-file:
7373
- 'superset/translations/zh/**'
7474

75+
"i18n:traditional-chinese":
76+
- changed-files:
77+
- any-glob-to-any-file:
78+
- 'superset/translations/zh_TW/**'
79+
7580
"i18n:dutch":
7681
- changed-files:
7782
- any-glob-to-any-file:

.github/workflows/bashlib.sh

Lines changed: 43 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ EOF
8989
setup-mysql() {
9090
say "::group::Initialize database"
9191
mysql -h 127.0.0.1 -P 13306 -u root --password=root <<-EOF
92+
SET GLOBAL transaction_isolation='READ-COMMITTED';
93+
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
9294
DROP DATABASE IF EXISTS superset;
9395
CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
9496
DROP DATABASE IF EXISTS sqllab_test_db;
@@ -115,9 +117,17 @@ testdata() {
115117
say "::endgroup::"
116118
}
117119

118-
codecov() {
119-
say "::group::Upload code coverage"
120-
bash ".github/workflows/codecov.sh" "$@"
120+
celery-worker() {
121+
cd "$GITHUB_WORKSPACE"
122+
say "::group::Start Celery worker"
123+
# must specify PYTHONPATH to make `tests.superset_test_config` importable
124+
export PYTHONPATH="$GITHUB_WORKSPACE"
125+
celery \
126+
--app=superset.tasks.celery_app:app \
127+
worker \
128+
--concurrency=2 \
129+
--detach \
130+
--optimization=fair
121131
say "::endgroup::"
122132
}
123133

@@ -133,35 +143,10 @@ cypress-install() {
133143
cache-save cypress
134144
}
135145

136-
# Run Cypress and upload coverage reports
137-
cypress-run() {
146+
cypress-run-all() {
147+
local USE_DASHBOARD=$1
138148
cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
139149

140-
local page=$1
141-
local group=${2:-Default}
142-
local cypress="./node_modules/.bin/cypress run"
143-
local browser=${CYPRESS_BROWSER:-chrome}
144-
145-
export TERM="xterm"
146-
export ELECTRON_DISABLE_GPU=true # Attempt to disable GPU for Electron-based Cypress
147-
148-
say "::group::Run Cypress for [$page]"
149-
if [[ -z $CYPRESS_KEY ]]; then
150-
xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' $cypress --spec "cypress/e2e/$page" --browser "$browser"
151-
else
152-
export CYPRESS_RECORD_KEY=$(echo $CYPRESS_KEY | base64 --decode)
153-
# additional flags for Cypress dashboard recording
154-
xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' $cypress --spec "cypress/e2e/$page" --browser "$browser" \
155-
--record --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}" \
156-
--parallel --ci-build-id "${GITHUB_SHA:0:8}-${NONCE}"
157-
158-
fi
159-
160-
# don't add quotes to $record because we do want word splitting
161-
say "::endgroup::"
162-
}
163-
164-
cypress-run-all() {
165150
# Start Flask and run it in background
166151
# --no-debugger means disable the interactive debugger on the 500 page
167152
# so errors can print to stderr.
@@ -172,32 +157,21 @@ cypress-run-all() {
172157
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
173158
local flaskProcessId=$!
174159

175-
cypress-run "*/**/*"
176-
177-
# After job is done, print out Flask log for debugging
178-
say "::group::Flask log for default run"
179-
cat "$flasklog"
180-
say "::endgroup::"
181-
182-
# Rerun SQL Lab tests with backend persist disabled
183-
export SUPERSET_CONFIG=tests.integration_tests.superset_test_config_sqllab_backend_persist_off
184-
185-
# Restart Flask with new configs
186-
kill $flaskProcessId
187-
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
188-
local flaskProcessId=$!
189-
190-
cypress-run "sqllab/*" "Backend persist"
160+
USE_DASHBOARD_FLAG=''
161+
if [ "$USE_DASHBOARD" = "true" ]; then
162+
USE_DASHBOARD_FLAG='--use-dashboard'
163+
fi
191164

192-
# Upload code coverage separately so each page can have separate flags
193-
# -c will clean existing coverage reports, -F means add flags
194-
# || true to prevent CI failure on codecov upload
195-
codecov -c -F "cypress" || true
165+
# UNCOMMENT the next few commands to monitor memory usage
166+
# monitor_memory & # Start memory monitoring in the background
167+
# memoryMonitorPid=$!
168+
python ../../scripts/cypress_run.py --parallelism $PARALLELISM --parallelism-id $PARALLEL_ID --group $PARALLEL_ID --retries 5 $USE_DASHBOARD_FLAG
169+
# kill $memoryMonitorPid
196170

197-
say "::group::Flask log for backend persist"
171+
# After job is done, print out Flask log for debugging
172+
echo "::group::Flask log for default run"
198173
cat "$flasklog"
199-
say "::endgroup::"
200-
174+
echo "::endgroup::"
201175
# make sure the program exits
202176
kill $flaskProcessId
203177
}
@@ -208,6 +182,21 @@ eyes-storybook-dependencies() {
208182
say "::endgroup::"
209183
}
210184

185+
monitor_memory() {
186+
# This is a small utility to monitor memory usage. Useful for debugging memory in GHA.
187+
# To use wrap your command as follows
188+
#
189+
# monitor_memory & # Start memory monitoring in the background
190+
# memoryMonitorPid=$!
191+
# YOUR_COMMAND_HERE
192+
# kill $memoryMonitorPid
193+
while true; do
194+
echo "$(date) - Top 5 memory-consuming processes:"
195+
ps -eo pid,comm,%mem --sort=-%mem | head -n 6 # First line is the header, next 5 are top processes
196+
sleep 2
197+
done
198+
}
199+
211200
cypress-run-applitools() {
212201
cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
213202

@@ -221,9 +210,7 @@ cypress-run-applitools() {
221210
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
222211
local flaskProcessId=$!
223212

224-
$cypress --spec "cypress/e2e/*/**/*.applitools.test.ts" --browser "$browser" --headless --config ignoreTestFiles="[]"
225-
226-
codecov -c -F "cypress" || true
213+
$cypress --spec "cypress/applitools/**/*" --browser "$browser" --headless
227214

228215
say "::group::Flask log for default run"
229216
cat "$flasklog"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Bump Python Package
2+
3+
on:
4+
# Can be triggered manually
5+
workflow_dispatch:
6+
inputs:
7+
package:
8+
required: false
9+
description: The python package to bump (all if empty)
10+
group:
11+
required: false
12+
description: The optional dependency group to bump (as defined in pyproject.toml)
13+
limit:
14+
required: true
15+
description: Max number of PRs to open (0 for no limit)
16+
default: 5
17+
18+
jobs:
19+
bump-python-package:
20+
runs-on: ubuntu-22.04
21+
permissions:
22+
actions: write
23+
contents: write
24+
pull-requests: write
25+
checks: write
26+
steps:
27+
28+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
29+
uses: actions/checkout@v4
30+
with:
31+
persist-credentials: true
32+
ref: master
33+
34+
- name: Setup supersetbot
35+
uses: ./.github/actions/setup-supersetbot/
36+
37+
- name: Set up Python ${{ inputs.python-version }}
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.10"
41+
42+
- name: Install pip-compile-multi
43+
run: pip install pip-compile-multi
44+
45+
- name: supersetbot bump-python -p "${{ github.event.inputs.package }}"
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
run: |
49+
git config --global user.email "action@github.com"
50+
git config --global user.name "GitHub Action"
51+
52+
PACKAGE_OPT=""
53+
if [ -n "${{ github.event.inputs.package }}" ]; then
54+
PACKAGE_OPT="-p ${{ github.event.inputs.package }}"
55+
fi
56+
57+
GROUP_OPT=""
58+
if [ -n "${{ github.event.inputs.group }}" ]; then
59+
GROUP_OPT="-g ${{ github.event.inputs.group }}"
60+
fi
61+
62+
supersetbot bump-python \
63+
--verbose \
64+
--use-current-repo \
65+
--include-subpackages \
66+
--limit ${{ github.event.inputs.limit }} \
67+
$PACKAGE_OPT \
68+
$GROUP_OPT

0 commit comments

Comments
 (0)