Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/preset-io/superset into l…
Browse files Browse the repository at this point in the history
…ily/get-dashboard-for-logger

# Conflicts:
#	superset/models/sql_lab.py
  • Loading branch information
Lily Kuang committed Aug 3, 2022
2 parents 32636e5 + e4fc556 commit 8623999
Show file tree
Hide file tree
Showing 159 changed files with 3,314 additions and 1,388 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
# Notify Helm Chart maintainers about changes in it

/helm/superset/ @craig-rueda @dpgaspar @villebro

# Notify E2E test maintainers of changes
/superset-frontend/cypress-base/ @jinghua-qa
4 changes: 3 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ include-naming-hint=no

# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
property-classes=abc.abstractproperty
property-classes=
abc.abstractproperty,
sqlalchemy.ext.hybrid.hybrid_property

# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ superset:
superset load-examples

# Install node packages
cd superset-frontend; npm install
cd superset-frontend; npm ci

update: update-py update-js

Expand Down Expand Up @@ -101,7 +101,7 @@ node-app:

build-cypress:
cd superset-frontend; npm run build-instrumented
cd superset-frontend/cypress-base; npm install
cd superset-frontend/cypress-base; npm ci

open-cypress:
if ! [ $(port) ]; then cd superset-frontend/cypress-base; CYPRESS_BASE_URL=http://localhost:9000 npm run cypress open; fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ We don't recommend using the system installed Python. Instead, first install the
brew install readline pkg-config libffi openssl mysql postgres
```

You should install a recent version of Python (the official docker image uses 3.8.12). We'd recommend using a Python version manager like [pyenv](https://github.com/pyenv/pyenv) (and also [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)).
You should install a recent version of Python (the official docker image uses 3.8.13). We'd recommend using a Python version manager like [pyenv](https://github.com/pyenv/pyenv) (and also [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)).

Let's also make sure we have the latest version of `pip` and `setuptools`:

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/installation/running-on-kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ superset-worker-75b48bbcc-qrq49 1/1 Running 0 4m12s

The exact list will depend on some of your specific configuration overrides but you should generally expect:

- N `superset-xxxx-yyyy` and `superset-worker-xxxx-yyyy` pods (depending on your `replicaCount` value)
- N `superset-xxxx-yyyy` and `superset-worker-xxxx-yyyy` pods (depending on your `supersetNode.replicaCount` and `supersetWorker.replicaCount` values)
- 1 `superset-postgresql-0` depending on your postgres settings
- 1 `superset-redis-master-0` depending on your redis settings
- 1 `superset-celerybeat-xxxx-yyyy` pod if you have `supersetCeleryBeat.enabled = true` in your values overrides
Expand Down
16 changes: 15 additions & 1 deletion docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ const CarouselSection = styled('div')`
}
`;

const StyledCredits = styled.div`
width: 100%;
height: 60px;
padding: 18px;
background-color: #282E4A;
text-align: center;
color: #FFFFFF;
`;

const StyledDatabaseImg = styled.img`
width: ${(props) => props.width};
height: ${(props) => props.height};
Expand Down Expand Up @@ -461,8 +470,13 @@ export default function Home(): JSX.Element {
</span>
</StyledIntegrations>
</CarouselSection>

</StyledMain>
<StyledCredits>
We use{' '}
<a href="https://applitools.com/" target="_blank" rel="nofollow">
<img src="img/applitools.png" title="Applitools" />
</a>
</StyledCredits>
</Layout>
);
}
Binary file added docs/static/img/applitools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
version: 0.6.6
version: 0.7.0
dependencies:
- name: postgresql
version: 11.1.22
Expand Down
2 changes: 1 addition & 1 deletion helm/superset/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metadata:
{{ toYaml .Values.supersetWorker.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
replicas: {{ .Values.supersetWorker.replicaCount }}
selector:
matchLabels:
app: {{ template "superset.name" . }}-worker
Expand Down
2 changes: 1 addition & 1 deletion helm/superset/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metadata:
{{ toYaml .Values.supersetNode.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
replicas: {{ .Values.supersetNode.replicaCount }}
selector:
matchLabels:
app: {{ template "superset.name" . }}
Expand Down
12 changes: 8 additions & 4 deletions helm/superset/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"type": "object",
"additionalProperties": true,
"properties": {
"replicaCount": {
"type": "integer"
},
"runAsUser": {
"type": "integer"
},
Expand Down Expand Up @@ -216,6 +213,9 @@
"type": "object",
"additionalProperties": false,
"properties": {
"replicaCount": {
"type": "integer"
},
"command": {
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command"
},
Expand Down Expand Up @@ -287,6 +287,7 @@
}
},
"required": [
"replicaCount",
"command",
"connections",
"env",
Expand All @@ -297,6 +298,9 @@
"type": "object",
"additionalProperties": false,
"properties": {
"replicaCount": {
"type": "integer"
},
"command": {
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command"
},
Expand Down Expand Up @@ -326,6 +330,7 @@
}
},
"required": [
"replicaCount",
"command",
"forceReload"
]
Expand Down Expand Up @@ -594,7 +599,6 @@
}
},
"required": [
"replicaCount",
"runAsUser",
"serviceAccount",
"bootstrapScript",
Expand Down
4 changes: 2 additions & 2 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

# User ID directive. This user must have enough permissions to run the bootstrap script
# Runn containers as root is not recommended in production. Change this to another UID - e.g. 1000 to be more secure
runAsUser: 0
Expand Down Expand Up @@ -224,6 +222,7 @@ hostAliases: []
##
## Superset node configuration
supersetNode:
replicaCount: 1
command:
- "/bin/sh"
- "-c"
Expand Down Expand Up @@ -268,6 +267,7 @@ supersetNode:
##
## Superset worker configuration
supersetWorker:
replicaCount: 1
command:
- "/bin/sh"
- "-c"
Expand Down
8 changes: 4 additions & 4 deletions requirements/integration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ packaging==21.3
pep517==0.11.0
# via pip-tools
pip-compile-multi==2.4.1
# via -r requirements/integration.in
# via -r integration.in
pip-tools==6.2.0
# via pip-compile-multi
platformdirs==2.2.0
# via virtualenv
pluggy==0.13.1
# via tox
pre-commit==2.14.0
# via -r requirements/integration.in
# via -r integration.in
py==1.10.0
# via tox
pyparsing==3.0.6
Expand All @@ -55,8 +55,8 @@ tomli==1.2.1
# via pep517
toposort==1.6
# via pip-compile-multi
tox==3.24.1
# via -r requirements/integration.in
tox==3.25.1
# via -r integration.in
virtualenv==20.7.2
# via
# pre-commit
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ disallow_untyped_calls = true
disallow_untyped_defs = true
ignore_missing_imports = true
no_implicit_optional = true
warn_unused_ignores = false
warn_unused_ignores = true

[mypy-superset.migrations.versions.*]
ignore_errors = true
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def get_git_sha() -> str:
zip_safe=False,
entry_points={
"console_scripts": ["superset=superset.cli.main:superset"],
# the `postgres+psycopg2://` scheme was removed in SQLAlchemy 1.4, add an alias here
# to prevent breaking existing databases
"sqlalchemy.dialects": [
"postgres.psycopg2=sqlalchemy.dialects.postgresql:dialect"
],
},
install_requires=[
"backoff>=1.8.0",
Expand Down Expand Up @@ -162,9 +167,7 @@ def get_git_sha() -> str:
"shillelagh": [
"shillelagh[datasetteapi,gsheetsapi,socrata,weatherapi]>=1.0.3, <2"
],
"snowflake": [
"snowflake-sqlalchemy==1.2.4"
], # PINNED! 1.2.5 introduced breaking changes requiring sqlalchemy>=1.4.0
"snowflake": ["snowflake-sqlalchemy>=1.2.4, <2"],
"spark": ["pyhive[hive]>=0.6.5", "tableschema", "thrift>=0.11.0, <1.0.0"],
"teradata": ["teradatasql>=16.20.0.23"],
"thumbnails": ["Pillow>=9.1.1, <10.0.0"],
Expand Down
3 changes: 2 additions & 1 deletion superset-embedded-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ export async function embedDashboard({
iframe.sandbox.add("allow-scripts"); // obviously the iframe needs scripts
iframe.sandbox.add("allow-presentation"); // for fullscreen charts
iframe.sandbox.add("allow-downloads"); // for downloading charts as image
iframe.sandbox.add("allow-forms"); // for forms to submit
iframe.sandbox.add("allow-popups"); // for exporting charts as csv
// add these ones if it turns out we need them:
// iframe.sandbox.add("allow-top-navigation");
// iframe.sandbox.add("allow-forms");

// add the event listener before setting src, to be 100% sure that we capture the load event
iframe.addEventListener('load', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { HEALTH_POP_FORM_DATA_DEFAULTS } from './visualizations/shared.helper';
const apiURL = (endpoint: string, queryObject: Record<string, unknown>) =>
`${endpoint}?q=${rison.encode(queryObject)}`;

describe.skip('Test explore links', () => {
describe('Test explore links', () => {
beforeEach(() => {
cy.login();
interceptChart({ legacy: true }).as('chartData');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ describe('Visualization > Line', () => {
cy.get('.panel-body').contains(
`Add required control values to preview chart`,
);
cy.get('.text-danger').contains('Metrics');
cy.get('[data-test="metrics-header"]').contains('Metrics');
cy.get('[data-test="metrics-header"] [data-test="error-tooltip"]').should(
'exist',
);

cy.get('[data-test=metrics]')
.contains('Drop columns/metrics here or click')
Expand All @@ -55,7 +58,11 @@ describe('Visualization > Line', () => {
.type('sum{enter}');
cy.get('[data-test="AdhocMetricEdit#save"]').contains('Save').click();

cy.get('.text-danger').should('not.exist');
cy.get('[data-test="metrics-header"]').contains('Metrics');
cy.get('[data-test="metrics-header"] [data-test="error-tooltip"]').should(
'not.exist',
);

cy.get('.ant-alert-warning').should('not.exist');
});

Expand Down
Loading

0 comments on commit 8623999

Please sign in to comment.