-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/security-converge-databases
# Conflicts: # superset/constants.py # tests/security_tests.py
- Loading branch information
Showing
164 changed files
with
5,138 additions
and
1,547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
name: E2E | ||
|
||
on: [push, pull_request] | ||
on: [push, pull_request_target] | ||
|
||
jobs: | ||
Cypress: | ||
cypress-matrix: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: true | ||
# when one test fails, DO NOT cancel the other | ||
# containers, because this will kill Cypress processes | ||
# leaving the Dashboard hanging ... | ||
# https://github.com/cypress-io/github-action/issues/48 | ||
fail-fast: false | ||
matrix: | ||
containers: [1, 2, 3] | ||
browser: ["chrome"] | ||
env: | ||
FLASK_ENV: development | ||
|
@@ -34,8 +39,14 @@ jobs: | |
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Checkout code | ||
- name: Checkout code (push) | ||
if: github.event_name == 'push' | ||
uses: actions/checkout@v2 | ||
- name: Checkout code (pull_request) | ||
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'refs/pull/${{ github.event.number }}/merge' | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
|
@@ -89,3 +100,12 @@ jobs: | |
with: | ||
name: screenshots | ||
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots | ||
Cypress: | ||
if: ${{ always() }} | ||
name: Cypress (chrome) | ||
runs-on: ubuntu-18.04 | ||
needs: cypress-matrix | ||
steps: | ||
- name: Check build matrix status | ||
if: ${{ needs.cypress-matrix.result != 'success' }} | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,4 @@ REDIS_PORT=6379 | |
FLASK_ENV=development | ||
SUPERSET_ENV=development | ||
SUPERSET_LOAD_EXAMPLES=yes | ||
CYPRESS_CONFIG=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,22 +37,29 @@ Init Step ${1}/${STEP_CNT} [${2}] -- ${3} | |
EOF | ||
} | ||
|
||
ADMIN_PASSWORD="admin" | ||
# If Cypress run – overwrite the password for admin and export env variables | ||
if [ "$CYPRESS_CONFIG" == "true" ]; then | ||
ADMIN_PASSWORD="general" | ||
export SUPERSET_CONFIG=tests.superset_test_config | ||
export SUPERSET_TESTENV=true | ||
export ENABLE_REACT_CRUD_VIEWS=true | ||
export SUPERSET__SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://superset:superset@db:5432/superset | ||
fi | ||
# Initialize the database | ||
echo_step "1" "Starting" "Applying DB migrations" | ||
superset db upgrade | ||
echo_step "1" "Complete" "Applying DB migrations" | ||
|
||
# Create an admin user | ||
echo_step "2" "Starting" "Setting up admin user ( admin / admin )" | ||
echo_step "2" "Starting" "Setting up admin user ( admin / $ADMIN_PASSWORD )" | ||
superset fab create-admin \ | ||
--username admin \ | ||
--firstname Superset \ | ||
--lastname Admin \ | ||
--email [email protected] \ | ||
--password admin | ||
--password $ADMIN_PASSWORD | ||
echo_step "2" "Complete" "Setting up admin user" | ||
|
||
# Create default roles and permissions | ||
echo_step "3" "Starting" "Setting up roles and perms" | ||
superset init | ||
|
@@ -61,6 +68,12 @@ echo_step "3" "Complete" "Setting up roles and perms" | |
if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then | ||
# Load some data to play with | ||
echo_step "4" "Starting" "Loading examples" | ||
superset load_examples | ||
# If Cypress run which consumes superset_test_config – load required data for tests | ||
if [ "$CYPRESS_CONFIG" == "true" ]; then | ||
superset load_test_users | ||
superset load_examples --load-test-data | ||
else | ||
superset load_examples | ||
fi | ||
echo_step "4" "Complete" "Loading examples" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
# under the License. | ||
-e file:. | ||
pyrsistent>=0.16.1,<0.17 | ||
importlib-metadata>=1.7.0, <2 | ||
importlib-metadata==2.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,3 @@ | |
-r base.in | ||
gevent | ||
psycopg2-binary | ||
redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,5 +30,4 @@ pyhive[presto]>=0.6.3 | |
pylint | ||
pytest | ||
pytest-cov | ||
redis | ||
statsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.