Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhashubham95 authored Sep 18, 2022
2 parents 3d5d072 + 7e2e8b8 commit 55b6341
Show file tree
Hide file tree
Showing 404 changed files with 13,484 additions and 10,056 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
/helm/superset/ @craig-rueda @dpgaspar @villebro

# Notify E2E test maintainers of changes
/superset-frontend/cypress-base/ @jinghua-qa
/superset-frontend/cypress-base/ @jinghua-qa @geido
2 changes: 1 addition & 1 deletion .github/workflows/superset-python-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements/testing.txt'
# TODO: separated requiermentes.txt file just for unit tests
# TODO: separated requirements.txt file just for unit tests
- name: Install dependencies
if: steps.check.outcome == 'failure'
uses: ./.github/actions/cached-dependencies
Expand Down
12 changes: 6 additions & 6 deletions RELEASING/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ git tag ${SUPERSET_VERSION_RC}
git push origin ${SUPERSET_VERSION_RC}
```

### Create a release on Github

After submitting the tag, follow the steps [here](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) to create the release. Use the vote email text as the content for the release description. Make sure to check the "This is a pre-release" checkbox for release canditates. You can check previous releases if you need an example.

## Preparing the release candidate

The first step of preparing an Apache Release is packaging a release candidate
Expand Down Expand Up @@ -347,7 +343,11 @@ To build and run the recently created tarball **from SVN**:
# login using admin/admin
```

### Voting
## Create a release on Github

After submitting the tag and testing the release candidate, follow the steps [here](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) to create the release on GitHub. Use the vote email text as the content for the release description. Make sure to check the "This is a pre-release" checkbox for release candidates. You can check previous releases if you need an example.

## Voting

Now you're ready to start the [VOTE] thread. Here's an example of a
previous release vote thread:
Expand Down Expand Up @@ -385,7 +385,7 @@ A List of people with -1 vote (ex: John):

The script will generate the email text that should be sent to [email protected] using an email client. The release version and release candidate number are fetched from the previously set environment variables.

### Validating a release
## Validating a release

https://www.apache.org/info/verification.html

Expand Down
2 changes: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ assists people when migrating to a new version.
- [20606](https://github.com/apache/superset/pull/20606): When user clicks on chart title or "Edit chart" button in Dashboard page, Explore opens in the same tab. Clicking while holding cmd/ctrl opens Explore in a new tab. To bring back the old behaviour (always opening Explore in a new tab), flip feature flag `DASHBOARD_EDIT_CHART_IN_NEW_TAB` to `True`.
- [20799](https://github.com/apache/superset/pull/20799): Presto and Trino engine will now display tracking URL for running queries in SQL Lab. If for some reason you don't want to show the tracking URL (for example, when your data warehouse hasn't enable access for to Presto or Trino UI), update `TRACKING_URL_TRANSFORMER` in `config.py` to return `None`.
- [21002](https://github.com/apache/superset/pull/21002): Support Python 3.10 and bump pandas 1.4 and pyarrow 6.
- [21163](https://github.com/apache/superset/pull/21163): When `GENERIC_CHART_AXES` feature flags set to `True`, the Time Grain control will move below the X-Axis control.
- [21284](https://github.com/apache/superset/pull/21284): The non-functional `MAX_TABLE_NAMES` config key has been removed.

### Breaking Changes

Expand Down
10 changes: 10 additions & 0 deletions docker/pythonpath_dev/superset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ def get_env_variable(var_name: str, default: Optional[str] = None) -> str:

RESULTS_BACKEND = FileSystemCache("/app/superset_home/sqllab")

CACHE_CONFIG = {
"CACHE_TYPE": "redis",
"CACHE_DEFAULT_TIMEOUT": 300,
"CACHE_KEY_PREFIX": "superset_",
"CACHE_REDIS_HOST": REDIS_HOST,
"CACHE_REDIS_PORT": REDIS_PORT,
"CACHE_REDIS_DB": REDIS_RESULTS_DB,
}
DATA_CACHE_CONFIG = CACHE_CONFIG


class CeleryConfig(object):
BROKER_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}"
Expand Down
26 changes: 26 additions & 0 deletions docs/docs/databases/kusto.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Kusto
hide_title: true
sidebar_position: 41
version: 2
---

## Kusto

The recommended connector library for Kusto is
[sqlalchemy-kusto](https://pypi.org/project/sqlalchemy-kusto/2.0.0/)>=2.0.0.

The connection string for Kusto (sql dialect) looks like this:

```
kustosql+https://{cluster_url}/{database}?azure_ad_client_id={azure_ad_client_id}&azure_ad_client_secret={azure_ad_client_secret}&azure_ad_tenant_id={azure_ad_tenant_id}&msi=False
```

The connection string for Kusto (kql dialect) looks like this:

```
kustokql+https://{cluster_url}/{database}?azure_ad_client_id={azure_ad_client_id}&azure_ad_client_secret={azure_ad_client_secret}&azure_ad_tenant_id={azure_ad_tenant_id}&msi=False
```

Make sure the user has privileges to access and use all required
databases/tables/views.
28 changes: 28 additions & 0 deletions docs/docs/databases/snowflake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,31 @@ user/role rights during engine creation by default. However, when pressing the
button in the Create or Edit Database dialog, user/role credentials are validated by passing
“validate_default_parameters”: True to the connect() method during engine creation. If the user/role
is not authorized to access the database, an error is recorded in the Superset logs.

And if you want connect Snowflake with [Key Pair Authentication](https://docs.snowflake.com/en/user-guide/key-pair-auth.html#step-6-configure-the-snowflake-client-to-use-key-pair-authentication).
Plase make sure you have the key pair and the public key is registered in Snowflake.
To connect Snowflake with Key Pair Authentication, you need to add the following parameters to "SECURE EXTRA" field.

***Please note that you need to merge multi-line private key content to one line and insert `\n` between each line***

```
{
"auth_method": "keypair",
"auth_params": {
"privatekey_body": "-----BEGIN ENCRYPTED PRIVATE KEY-----\n...\n...\n-----END ENCRYPTED PRIVATE KEY-----",
"privatekey_pass":"Your Private Key Password"
}
}
```

If your private key is stored on server, you can replace "privatekey_body" with “privatekey_path” in parameter.

```
{
"auth_method": "keypair",
"auth_params": {
"privatekey_path":"Your Private Key Path",
"privatekey_pass":"Your Private Key Password"
}
}
```
1 change: 1 addition & 0 deletions docs/docs/installation/alerts-reports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ SLACK_API_TOKEN = "xoxb-"
# Email configuration
SMTP_HOST = "smtp.sendgrid.net" #change to your host
SMTP_STARTTLS = True
SMTP_SSL_SERVER_AUTH = True # If your using an SMTP server with a valid certificate
SMTP_SSL = False
SMTP_USER = "your_user"
SMTP_PORT = 2525 # your port eg. 587
Expand Down
19 changes: 0 additions & 19 deletions docs/static/resources/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3532,9 +3532,6 @@
},
"Database": {
"properties": {
"allow_multi_schema_metadata_fetch": {
"type": "boolean"
},
"allows_cost_estimate": {
"type": "boolean"
},
Expand Down Expand Up @@ -3679,10 +3676,6 @@
"nullable": true,
"type": "boolean"
},
"allow_multi_schema_metadata_fetch": {
"nullable": true,
"type": "boolean"
},
"allow_run_async": {
"nullable": true,
"type": "boolean"
Expand Down Expand Up @@ -3771,10 +3764,6 @@
"nullable": true,
"type": "boolean"
},
"allow_multi_schema_metadata_fetch": {
"nullable": true,
"type": "boolean"
},
"allow_run_async": {
"nullable": true,
"type": "boolean"
Expand Down Expand Up @@ -3870,10 +3859,6 @@
"description": "Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.",
"type": "boolean"
},
"allow_multi_schema_metadata_fetch": {
"description": "Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.",
"type": "boolean"
},
"allow_run_async": {
"description": "Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.",
"type": "boolean"
Expand Down Expand Up @@ -3971,10 +3956,6 @@
"description": "Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.",
"type": "boolean"
},
"allow_multi_schema_metadata_fetch": {
"description": "Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.",
"type": "boolean"
},
"allow_run_async": {
"description": "Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.",
"type": "boolean"
Expand Down
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: [email protected]
url: https://github.com/craig-rueda
version: 0.7.1
version: 0.7.2
dependencies:
- name: postgresql
version: 11.1.22
Expand Down
14 changes: 13 additions & 1 deletion helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,21 @@ envFromSecrets: []
## Extra environment variables that will be passed into pods
##
extraEnv: {}
# Different gunicorn settings, refer to the gunicorn documentation
# https://docs.gunicorn.org/en/stable/settings.html#
# These variables are used as Flags at the gunicorn startup
# https://github.com/apache/superset/blob/master/docker/run-server.sh#L22
# Extend timeout to allow long running queries.
# GUNICORN_TIMEOUT: 300

# Increase the gunicorn worker amount, can improve performance drastically
# See: https://docs.gunicorn.org/en/stable/design.html#how-many-workers
# SERVER_WORKER_AMOUNT: 4
# WORKER_MAX_REQUESTS: 0
# WORKER_MAX_REQUESTS_JITTER: 0
# SERVER_THREADS_AMOUNT: 20
# GUNICORN_KEEPALIVE: 2
# SERVER_LIMIT_REQUEST_LINE: 0
# SERVER_LIMIT_REQUEST_FIELD_SIZE: 0

# OAUTH_HOME_DOMAIN: ..
# # If a whitelist is not set, any address that can use your OAuth2 endpoint will be able to login.
Expand Down
6 changes: 3 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ flask==2.0.3
# flask-migrate
# flask-sqlalchemy
# flask-wtf
flask-appbuilder==4.1.3
flask-appbuilder==4.1.4
# via apache-superset
flask-babel==1.0.0
# via flask-appbuilder
Expand Down Expand Up @@ -185,7 +185,7 @@ packaging==21.3
# via
# bleach
# deprecation
pandas==1.4.3
pandas==1.4.4
# via apache-superset
parsedatetime==2.6
# via apache-superset
Expand Down Expand Up @@ -269,7 +269,7 @@ sqlalchemy==1.4.36
# flask-sqlalchemy
# marshmallow-sqlalchemy
# sqlalchemy-utils
sqlalchemy-utils==0.37.8
sqlalchemy-utils==0.38.3
# via
# apache-superset
# flask-appbuilder
Expand Down
2 changes: 1 addition & 1 deletion requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ tableschema==1.20.2
# via apache-superset
tabulator==1.53.5
# via tableschema
thrift==0.13.0
thrift==0.14.1
# via
# apache-superset
# pyhive
Expand Down
2 changes: 1 addition & 1 deletion scripts/python_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ superset init

echo "Running tests"

pytest --durations-min=2 --maxfail=1 --cov-report= --cov=superset "$@"
pytest --durations-min=2 --maxfail=1 --cov-report= --cov=superset ./tests/integration_tests "$@"
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_git_sha() -> str:
"cryptography>=3.3.2",
"deprecation>=2.1.0, <2.2.0",
"flask>=2.0.0, <3.0.0",
"flask-appbuilder>=4.1.3, <5.0.0",
"flask-appbuilder>=4.1.4, <5.0.0",
"flask-caching>=1.10.0",
"flask-compress",
"flask-talisman",
Expand All @@ -100,7 +100,7 @@ def get_git_sha() -> str:
"markdown>=3.0",
"msgpack>=1.0.0, <1.1",
"numpy==1.22.1",
"pandas>=1.4.3, <1.5",
"pandas>=1.4.4, <1.5",
"parsedatetime",
"pgsanity",
"polyline",
Expand All @@ -116,7 +116,7 @@ def get_git_sha() -> str:
"simplejson>=3.15.0",
"slackclient==2.5.0", # PINNED! slack changes file upload api in the future versions
"sqlalchemy>=1.4, <2",
"sqlalchemy-utils>=0.37.8, <0.38",
"sqlalchemy-utils>=0.38.3, <0.39",
"sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562
"tabulate==0.8.9",
# needed to support Literal (3.8) and TypeGuard (3.10)
Expand Down Expand Up @@ -144,16 +144,16 @@ def get_git_sha() -> str:
"drill": ["sqlalchemy-drill==0.1.dev"],
"druid": ["pydruid>=0.6.1,<0.7"],
"solr": ["sqlalchemy-solr >= 0.2.0"],
"elasticsearch": ["elasticsearch-dbapi>=0.2.0, <0.3.0"],
"elasticsearch": ["elasticsearch-dbapi>=0.2.9, <0.3.0"],
"exasol": ["sqlalchemy-exasol >= 2.4.0, <3.0"],
"excel": ["xlrd>=1.2.0, <1.3"],
"firebird": ["sqlalchemy-firebird>=0.7.0, <0.8"],
"firebolt": ["firebolt-sqlalchemy>=0.0.1"],
"gsheets": ["shillelagh[gsheetsapi]>=1.0.14, <2"],
"hana": ["hdbcli==2.4.162", "sqlalchemy_hana==0.4.0"],
"hive": ["pyhive[hive]>=0.6.5", "tableschema", "thrift>=0.11.0, <1.0.0"],
"hive": ["pyhive[hive]>=0.6.5", "tableschema", "thrift>=0.14.1, <1.0.0"],
"impala": ["impyla>0.16.2, <0.17"],
"kusto": ["sqlalchemy-kusto>=1.0.1, <2"],
"kusto": ["sqlalchemy-kusto>=2.0.0, <3"],
"kylin": ["kylinpy>=2.8.1, <2.9"],
"mssql": ["pymssql>=2.1.4, <2.2"],
"mysql": ["mysqlclient>=2.1.0, <3"],
Expand All @@ -169,7 +169,7 @@ def get_git_sha() -> str:
"shillelagh[datasetteapi,gsheetsapi,socrata,weatherapi]>=1.0.3, <2"
],
"snowflake": ["snowflake-sqlalchemy>=1.2.4, <2"],
"spark": ["pyhive[hive]>=0.6.5", "tableschema", "thrift>=0.11.0, <1.0.0"],
"spark": ["pyhive[hive]>=0.6.5", "tableschema", "thrift>=0.14.1, <1.0.0"],
"teradata": ["teradatasql>=16.20.0.23"],
"thumbnails": ["Pillow>=9.1.1, <10.0.0"],
"vertica": ["sqlalchemy-vertica-python>=0.5.9, < 0.6"],
Expand Down
7 changes: 6 additions & 1 deletion superset-embedded-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ embedDashboard({
supersetDomain: "https://superset.example.com",
mountPoint: document.getElementById("my-superset-container"), // any html element that can contain an iframe
fetchGuestToken: () => fetchGuestTokenFromBackend(),
dashboardUiConfig: { hideTitle: true }, // dashboard UI config: hideTitle, hideTab, hideChartControls (optional)
dashboardUiConfig: { // dashboard UI config: hideTitle, hideTab, hideChartControls, filters.visible, filters.expanded (optional)
hideTitle: true,
filters: {
expanded: true,
}
},
});
```

Expand Down
4 changes: 4 additions & 0 deletions superset-embedded-sdk/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@
*/

export const IFRAME_COMMS_MESSAGE_TYPE = "__embedded_comms__";
export const DASHBOARD_UI_FILTER_CONFIG_URL_PARAM_KEY: { [index: string]: any } = {
visible: "show_filters",
expanded: "expand_filters",
}
Loading

0 comments on commit 55b6341

Please sign in to comment.