Skip to content

Commit

Permalink
Merge branch 'master' into pypi-install-overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
sfirke authored Jul 16, 2024
2 parents 423df6e + d51a2ad commit 17c78e3
Show file tree
Hide file tree
Showing 2,457 changed files with 284,014 additions and 474,555 deletions.
3 changes: 3 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ github:
# combination here.
contexts:
- lint-check
- cypress-matrix (0, chrome)
- cypress-matrix (1, chrome)
- cypress-matrix (2, chrome)
- cypress-matrix (3, chrome)
- cypress-matrix (4, chrome)
- cypress-matrix (5, chrome)
- frontend-build
- pre-commit
- python-lint
Expand Down
4 changes: 0 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,3 @@

**/*.geojson @villebro @rusackas
/superset-frontend/plugins/legacy-plugin-chart-country-map/ @villebro @rusackas

# Translations are a finnicky contribution that we care about

/superset/translations/ @villebro @rusackas
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ body:
label: Superset version
options:
- master / latest-dev
- "4.0.0"
- "3.1.2"
- "4.0.1"
- "3.1.3"
validations:
required: true
- type: dropdown
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/setup-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ runs:
echo "PYTHON_VERSION=3.10" >> $GITHUB_ENV
elif [ "${{ inputs.python-version }}" = "next" ]; then
echo "PYTHON_VERSION=3.11" >> $GITHUB_ENV
elif [ "${{ inputs.python-version }}" = "previous" ]; then
echo "PYTHON_VERSION=3.9" >> $GITHUB_ENV
else
echo "PYTHON_VERSION=${{ inputs.python-version }}" >> $GITHUB_ENV
fi
Expand Down
78 changes: 22 additions & 56 deletions .github/workflows/bashlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,17 @@ testdata() {
say "::endgroup::"
}

codecov() {
say "::group::Upload code coverage"
bash ".github/workflows/codecov.sh" "$@"
celery-worker() {
cd "$GITHUB_WORKSPACE"
say "::group::Start Celery worker"
# must specify PYTHONPATH to make `tests.superset_test_config` importable
export PYTHONPATH="$GITHUB_WORKSPACE"
celery \
--app=superset.tasks.celery_app:app \
worker \
--concurrency=2 \
--detach \
--optimization=fair
say "::endgroup::"
}

Expand All @@ -135,35 +143,10 @@ cypress-install() {
cache-save cypress
}

# Run Cypress and upload coverage reports
cypress-run() {
cypress-run-all() {
local USE_DASHBOARD=$1
cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"

local page=$1
local group=${2:-Default}
local cypress="./node_modules/.bin/cypress run"
local browser=${CYPRESS_BROWSER:-chrome}

export TERM="xterm"
export ELECTRON_DISABLE_GPU=true # Attempt to disable GPU for Electron-based Cypress

say "::group::Run Cypress for [$page]"
if [[ -z $CYPRESS_KEY ]]; then
xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' $cypress --spec "cypress/e2e/$page" --browser "$browser"
else
export CYPRESS_RECORD_KEY=$(echo $CYPRESS_KEY | base64 --decode)
# additional flags for Cypress dashboard recording
xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' $cypress --spec "cypress/e2e/$page" --browser "$browser" \
--record --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}" \
--parallel --ci-build-id "${GITHUB_SHA:0:8}-${NONCE}"

fi

# don't add quotes to $record because we do want word splitting
say "::endgroup::"
}

cypress-run-all() {
# Start Flask and run it in background
# --no-debugger means disable the interactive debugger on the 500 page
# so errors can print to stderr.
Expand All @@ -174,32 +157,17 @@ cypress-run-all() {
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!

cypress-run "*/**/*"

# After job is done, print out Flask log for debugging
say "::group::Flask log for default run"
cat "$flasklog"
say "::endgroup::"

# Rerun SQL Lab tests with backend persist disabled
export SUPERSET_CONFIG=tests.integration_tests.superset_test_config_sqllab_backend_persist_off

# Restart Flask with new configs
kill $flaskProcessId
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!

cypress-run "sqllab/*" "Backend persist"
USE_DASHBOARD_FLAG=''
if [ "$USE_DASHBOARD" = "true" ]; then
USE_DASHBOARD_FLAG='--use-dashboard'
fi

# Upload code coverage separately so each page can have separate flags
# -c will clean existing coverage reports, -F means add flags
# || true to prevent CI failure on codecov upload
codecov -c -F "cypress" || true
python ../../scripts/cypress_run.py --parallelism $PARALLELISM --parallelism-id $PARALLEL_ID $USE_DASHBOARD_FLAG

say "::group::Flask log for backend persist"
# After job is done, print out Flask log for debugging
echo "::group::Flask log for default run"
cat "$flasklog"
say "::endgroup::"

echo "::endgroup::"
# make sure the program exits
kill $flaskProcessId
}
Expand All @@ -223,9 +191,7 @@ cypress-run-applitools() {
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!

$cypress --spec "cypress/e2e/*/**/*.applitools.test.ts" --browser "$browser" --headless

codecov -c -F "cypress" || true
$cypress --spec "cypress/applitools/**/*" --browser "$browser" --headless

say "::group::Flask log for default run"
cat "$flasklog"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
bump-python-package:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
actions: write
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cancel_duplicates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
cancel-duplicate-runs:
name: Cancel duplicate workflow runs
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
actions: write
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_db_migration_confict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- "superset/migrations/**"
branches:
- "master"
- "[0-9].[0-9]"
- "[0-9].[0-9]*"
pull_request:
paths:
- "superset/migrations/**"
Expand All @@ -19,7 +19,7 @@ concurrency:
jobs:
check_db_migration_conflict:
name: Check DB migration conflict
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: write
Expand Down
Loading

0 comments on commit 17c78e3

Please sign in to comment.