Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apache/superset into lynd…
Browse files Browse the repository at this point in the history
…si/r6-polish
  • Loading branch information
lyndsiWilliams committed Jul 2, 2021
2 parents 837c3f2 + d4480f5 commit 461b655
Show file tree
Hide file tree
Showing 223 changed files with 871 additions and 475 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bashlib.sh
Expand Up @@ -192,7 +192,7 @@ cypress-run-all() {
say "::endgroup::"

# Rerun SQL Lab tests with backend persist enabled
export SUPERSET_CONFIG=tests.superset_test_config_sqllab_backend_persist
export SUPERSET_CONFIG=tests.integration_tests.superset_test_config_sqllab_backend_persist

# Restart Flask with new configs
kill $flaskProcessId
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/superset-e2e.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
env:
FLASK_ENV: development
ENABLE_REACT_CRUD_VIEWS: true
SUPERSET_CONFIG: tests.superset_test_config
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
PYTHONPATH: ${{ github.workspace }}
REDIS_PORT: 16379
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/superset-python-presto-hive.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
python-version: [3.8]
env:
PYTHONPATH: ${{ github.workspace }}
SUPERSET_CONFIG: tests.superset_test_config
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
SUPERSET__SQLALCHEMY_EXAMPLES_URI: presto://localhost:15433/memory/default
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
python-version: [3.8]
env:
PYTHONPATH: ${{ github.workspace }}
SUPERSET_CONFIG: tests.superset_test_config
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
SUPERSET__SQLALCHEMY_EXAMPLES_URI: hive://localhost:10000/default
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/superset-python-unittest.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
python-version: [3.7]
env:
PYTHONPATH: ${{ github.workspace }}
SUPERSET_CONFIG: tests.superset_test_config
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: |
mysql+mysqldb://superset:superset@127.0.0.1:13306/superset?charset=utf8mb4&binary_prefix=true
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
python-version: [3.7, 3.8]
env:
PYTHONPATH: ${{ github.workspace }}
SUPERSET_CONFIG: tests.superset_test_config
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
services:
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
python-version: [3.7]
env:
PYTHONPATH: ${{ github.workspace }}
SUPERSET_CONFIG: tests.superset_test_config
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: |
sqlite:///${{ github.workspace }}/.temp/unittest.db
Expand Down
18 changes: 11 additions & 7 deletions CONTRIBUTING.md
Expand Up @@ -77,6 +77,8 @@ little bit helps, and credit will always be given.
- [Python Testing](#python-testing)
- [Frontend Testing](#frontend-testing)
- [Integration Testing](#integration-testing)
- [Debugging Server App](#debugging-server-app)
- [Debugging Server App in Kubernetes Environment](#debugging-server-app-in-kubernetes-environment)
- [Storybook](#storybook)
- [Translating](#translating)
- [Enabling language selection](#enabling-language-selection)
Expand Down Expand Up @@ -418,22 +420,23 @@ For example, the image referenced above actually lives in `superset-frontend/ima

#### OS Dependencies

Make sure your machine meets the [OS dependencies](https://superset.apache.org/docs/installation/installing-superset-from-scratch#os-dependencies) before following these steps.
Make sure your machine meets the [OS dependencies](https://superset.apache.org/docs/installation/installing-superset-from-scratch#os-dependencies) before following these steps.
You also need to install MySQL or [MariaDB](https://mariadb.com/downloads).

Ensure Python versions >3.7, Then proceed with:
Ensure that you are using Python version 3.7 or 3.8, then proceed with:

````bash
# Create a virtual environment and activate it (recommended)
python3 -m venv venv # setup a python3 virtualenv
source venv/bin/activate

# Install external dependencies
pip install -r requirements/local.txt
pip install -r requirements/testing.txt

# Install Superset in editable (development) mode
pip install -e .

# Create an admin user in your metadata database
# Create an admin user in your metadata database (use `admin` as username to be able to load the examples)
superset fab create-admin

# Initialize the database
Expand All @@ -442,11 +445,12 @@ superset db upgrade
# Create default roles and permissions
superset init

# Load some data to play with (you must create an Admin user with the username `admin` for this command to work)
# Load some data to play with.
# Note: you MUST have previously created an admin user with the username `admin` for this command to work.
superset load-examples

# Start the Flask dev web server from inside your virtualenv.
# Note that your page may not have css at this point.
# Note that your page may not have CSS at this point.
# See instructions below how to build the front-end assets.
FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger

Expand Down Expand Up @@ -767,7 +771,7 @@ npm run test -- path/to/file.js
We use [Cypress](https://www.cypress.io/) for integration tests. Tests can be run by `tox -e cypress`. To open Cypress and explore tests first setup and run test server:
```bash
export SUPERSET_CONFIG=tests.superset_test_config
export SUPERSET_CONFIG=tests.integration_tests.superset_test_config
export SUPERSET_TESTENV=true
export ENABLE_REACT_CRUD_VIEWS=true
export CYPRESS_BASE_URL="http://localhost:8081"
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-bootstrap.sh
Expand Up @@ -21,7 +21,7 @@ set -eo pipefail
REQUIREMENTS_LOCAL="/app/docker/requirements-local.txt"
# If Cypress run – overwrite the password for admin and export env variables
if [ "$CYPRESS_CONFIG" == "true" ]; then
export SUPERSET_CONFIG=tests.superset_test_config
export SUPERSET_CONFIG=tests.integration_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
Expand Down
17 changes: 16 additions & 1 deletion docs/src/pages/docs/Miscellaneous/issue_codes.mdx
Expand Up @@ -312,11 +312,26 @@ The results stored in the backend were stored in a different format, and no long

The query results were stored in a format that is no longer supported. Please re-run your query.


## Issue 1034

```
The database port provided is invalid.
```

Please check that the provided database port is an integer between 0 and 65535 (inclusive).

## Issue 1035

```
Failed to start remote query on a worker.
```

The query was not started by an asynchronous worker. Please reach out to your administrator for further assistance.

## Issue 1036

```
The database was deleted.
```

The operation failed because the database referenced no longer exists. Please reach out to your administrator for further assistance.
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Expand Up @@ -22,7 +22,7 @@ maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
version: 0.3.1
version: 0.3.2
dependencies:
- name: postgresql
version: 10.2.0
Expand Down
11 changes: 7 additions & 4 deletions helm/superset/templates/ingress.yaml
Expand Up @@ -17,7 +17,7 @@
{{ if .Values.ingress.enabled -}}
{{- $fullName := include "superset.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -46,9 +46,12 @@ spec:
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
- path: {{ .Values.ingress.path }}
pathType: {{ .Values.ingress.pathType }}
backend:
serviceName: {{ $fullName }}
servicePort: http
service:
name: {{ $fullName }}
port:
name: http
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions helm/superset/values.yaml
Expand Up @@ -147,6 +147,7 @@ ingress:
# nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
# nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
path: /
pathType: ImplementationSpecific
hosts:
- chart-example.local
tls: []
Expand Down
2 changes: 1 addition & 1 deletion scripts/python_tests.sh
Expand Up @@ -18,7 +18,7 @@
#
set -e

export SUPERSET_CONFIG=${SUPERSET_CONFIG:-tests.superset_test_config}
export SUPERSET_CONFIG=${SUPERSET_CONFIG:-tests.integration_tests.superset_test_config}
export SUPERSET_TESTENV=true
echo "Superset config module: $SUPERSET_CONFIG"

Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/run.sh
Expand Up @@ -62,7 +62,7 @@ DB_NAME="test"
DB_USER="superset"
DB_PASSWORD="superset"
export SUPERSET__SQLALCHEMY_DATABASE_URI=${SUPERSET__SQLALCHEMY_DATABASE_URI:-postgresql+psycopg2://"${DB_USER}":"${DB_PASSWORD}"@localhost/"${DB_NAME}"}
export SUPERSET_CONFIG=${SUPERSET_CONFIG:-tests.superset_test_config}
export SUPERSET_CONFIG=${SUPERSET_CONFIG:-tests.integration_tests.superset_test_config}
RUN_INIT=1
RUN_RESET_DB=1
RUN_TESTS=1
Expand Down
Expand Up @@ -22,7 +22,7 @@ describe('chart card view', () => {
beforeEach(() => {
cy.login();
cy.visit(CHART_LIST);
cy.get('[data-test="card-view"]').click();
cy.get('[aria-label="card-view"]').click();
});

it('should load cards', () => {
Expand Down
Expand Up @@ -22,7 +22,7 @@ describe('chart card view filters', () => {
beforeEach(() => {
cy.login();
cy.visit(CHART_LIST);
cy.get('[data-test="card-view"]').click();
cy.get('[aria-label="card-view"]').click();
});

it('should filter by owners correctly', () => {
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('chart list view filters', () => {
beforeEach(() => {
cy.login();
cy.visit(CHART_LIST);
cy.get('[data-test="list-view"]').click();
cy.get('[aria-label="list-view"]').click();
});

it('should filter by owners correctly', () => {
Expand Down
Expand Up @@ -22,7 +22,7 @@ describe('chart list view', () => {
beforeEach(() => {
cy.login();
cy.visit(CHART_LIST);
cy.get('[data-test="list-view"]').click();
cy.get('[aria-label="list-view"]').click();
});

it('should load rows', () => {
Expand Down
Expand Up @@ -22,7 +22,7 @@ describe('Dashboard card view', () => {
beforeEach(() => {
cy.login();
cy.visit(DASHBOARD_LIST);
cy.get('[data-test="card-view"]').click();
cy.get('[aria-label="card-view"]').click();
});

xit('should load cards', () => {
Expand Down
Expand Up @@ -22,7 +22,7 @@ describe('dashboard filters card view', () => {
beforeEach(() => {
cy.login();
cy.visit(DASHBOARD_LIST);
cy.get('[data-test="card-view"]').click();
cy.get('[aria-label="card-view"]').click();
});

it('should filter by owners correctly', () => {
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('dashboard filters list view', () => {
beforeEach(() => {
cy.login();
cy.visit(DASHBOARD_LIST);
cy.get('[data-test="list-view"]').click();
cy.get('[aria-label="list-view"]').click();
});

it('should filter by owners correctly', () => {
Expand Down
Expand Up @@ -22,7 +22,7 @@ describe('dashboard list view', () => {
beforeEach(() => {
cy.login();
cy.visit(DASHBOARD_LIST);
cy.get('[data-test="list-view"]').click();
cy.get('[aria-label="list-view"]').click();
});

xit('should load rows', () => {
Expand Down
3 changes: 0 additions & 3 deletions superset-frontend/spec/fixtures/mockNativeFilters.ts
Expand Up @@ -45,7 +45,6 @@ export const nativeFilters: NativeFiltersState = {
rootPath: ['ROOT_ID'],
excluded: [],
},
isInstant: true,
controlValues: {
multiSelect: false,
enableEmptyFilter: false,
Expand Down Expand Up @@ -79,7 +78,6 @@ export const nativeFilters: NativeFiltersState = {
enableEmptyFilter: false,
inverseSelection: false,
},
isInstant: true,
},
},
};
Expand Down Expand Up @@ -136,7 +134,6 @@ export const singleNativeFiltersState = {
cascadeParentIds: [],
scope: { rootPath: ['ROOT_ID'], excluded: [227, 229] },
inverseSelection: false,
isInstant: true,
allowsMultipleValues: false,
isRequired: false,
},
Expand Down
Expand Up @@ -62,7 +62,6 @@ export const nativeFiltersInfo: NativeFiltersState = {
rootPath: [],
excluded: [],
},
isInstant: true,
controlValues: {
allowsMultipleValues: true,
isRequired: false,
Expand Down
2 changes: 2 additions & 0 deletions superset-frontend/src/components/ErrorMessage/types.ts
Expand Up @@ -58,6 +58,7 @@ export const ErrorTypeEnum = {

// Other errors
BACKEND_TIMEOUT_ERROR: 'BACKEND_TIMEOUT_ERROR',
DATABASE_NOT_FOUND_ERROR: 'DATABASE_NOT_FOUND_ERROR',

// Sqllab error
MISSING_TEMPLATE_PARAMS_ERROR: 'MISSING_TEMPLATE_PARAMS_ERROR',
Expand All @@ -68,6 +69,7 @@ export const ErrorTypeEnum = {
INVALID_CVAS_QUERY_ERROR: 'INVALID_CVAS_QUERY_ERROR',
SQLLAB_TIMEOUT_ERROR: 'SQLLAB_TIMEOUT_ERROR',
RESULTS_BACKEND_ERROR: 'RESULTS_BACKEND_ERROR',
ASYNC_WORKERS_ERROR: 'ASYNC_WORKERS_ERROR',

// Generic errors
GENERIC_COMMAND_ERROR: 'GENERIC_COMMAND_ERROR',
Expand Down
Expand Up @@ -66,7 +66,7 @@ describe('LabeledErrorBoundInput', () => {

const label = screen.getByText(/username/i);
const textboxInput = screen.getByRole('textbox');
const tooltipIcon = screen.getByTestId('info-solid-small');
const tooltipIcon = screen.getByRole('img');

fireEvent.mouseOver(tooltipIcon);

Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/components/InfoTooltip/index.tsx
Expand Up @@ -20,7 +20,7 @@
import React from 'react';
import { styled } from '@superset-ui/core';
import { Tooltip } from 'src/components/Tooltip';
import Icon from 'src/components/Icon';
import Icons from 'src/components/Icons';

export interface InfoTooltipProps {
className?: string;
Expand Down Expand Up @@ -75,7 +75,7 @@ export default function InfoTooltip({
overlayStyle={overlayStyle}
color={bgColor}
>
<Icon name="info-solid-small" viewBox={viewBox} />
<Icons.InfoSolidSmall className="info-solid-small" viewBox={viewBox} />
</StyledTooltip>
);
}

0 comments on commit 461b655

Please sign in to comment.