Skip to content

Commit

Permalink
Merge branch 'apache:master' into bw/add_rw
Browse files Browse the repository at this point in the history
  • Loading branch information
BowenXiao1999 authored Nov 30, 2022
2 parents 3748fd9 + 969c963 commit de3f2a1
Show file tree
Hide file tree
Showing 272 changed files with 6,374 additions and 3,214 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker_build_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ else
docker logout
docker login --username "${DOCKERHUB_USER}" --password "${DOCKERHUB_TOKEN}"
docker push --all-tags "${REPO_NAME}"
docker push --all-tags "${REPO_NAME}-websocket"
fi
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ This statement thanks the following, on which it draws for content and inspirati

# Slack Community Guidelines

If you decide to join the [Community Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-16jvzmoi8-sI7jKWp~xc2zYRe~NqiY9Q), please adhere to the following rules:
If you decide to join the [Community Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-1jp6hjzrq-H0PlFtToyLWuPiJDuRWCNw), please adhere to the following rules:

**1. Treat everyone in the community with respect.**

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
[![PyPI version](https://badge.fury.io/py/apache-superset.svg)](https://badge.fury.io/py/apache-superset)
[![Coverage Status](https://codecov.io/github/apache/superset/coverage.svg?branch=master)](https://codecov.io/github/apache/superset)
[![PyPI](https://img.shields.io/pypi/pyversions/apache-superset.svg?maxAge=2592000)](https://pypi.python.org/pypi/apache-superset)
[![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://join.slack.com/t/apache-superset/shared_invite/zt-16jvzmoi8-sI7jKWp~xc2zYRe~NqiY9Q)
[![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://join.slack.com/t/apache-superset/shared_invite/zt-1jp6hjzrq-H0PlFtToyLWuPiJDuRWCNw)
[![Documentation](https://img.shields.io/badge/docs-apache.org-blue.svg)](https://superset.apache.org)

<img
Expand Down Expand Up @@ -129,7 +129,7 @@ Want to add support for your datastore or data engine? Read more [here](https://
## Get Involved

- Ask and answer questions on [StackOverflow](https://stackoverflow.com/questions/tagged/apache-superset) using the **apache-superset** tag
- [Join our community's Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-16jvzmoi8-sI7jKWp~xc2zYRe~NqiY9Q)
- [Join our community's Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-1jp6hjzrq-H0PlFtToyLWuPiJDuRWCNw)
and please read our [Slack Community Guidelines](https://github.com/apache/superset/blob/master/CODE_OF_CONDUCT.md#slack-community-guidelines)
- [Join our dev@superset.apache.org Mailing list](https://lists.apache.org/list.html?dev@superset.apache.org)

Expand Down
1 change: 1 addition & 0 deletions RESOURCES/INTHEWILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ Join our growing community!
- [Prensa Iberica](https://www.prensaiberica.es/) [@zamar-roura]

### Others
- [AI inside](https://inside.ai/en/)
- [Dropbox](https://www.dropbox.com/) [@bkyryliuk]
- [Grassroot](https://www.grassrootinstitute.org/)
- [komoot](https://www.komoot.com/) [@christophlingg]
Expand Down
2 changes: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ assists people when migrating to a new version.

### Potential Downtime

- [21284](https://github.com/apache/superset/pull/21284): A change which drops the unused `dbs.allow_multi_schema_metadata_fetch` column via a (potentially locking) DDL operation.

### Other

## 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/contributing/contributing-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The core contributors (or committers) to Superset communicate primarily in the f
which can be joined by anyone):

- [Mailing list](https://lists.apache.org/list.html?dev@superset.apache.org)
- [Apache Superset Slack community](https://join.slack.com/t/apache-superset/shared_invite/zt-16jvzmoi8-sI7jKWp~xc2zYRe~NqiY9Q)
- [Apache Superset Slack community](https://join.slack.com/t/apache-superset/shared_invite/zt-1jp6hjzrq-H0PlFtToyLWuPiJDuRWCNw)
- [GitHub issues and PR's](https://github.com/apache/superset/issues)

More references:
Expand Down
14 changes: 7 additions & 7 deletions docs/docs/databases/clickhouse.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ version: 1
To use ClickHouse with Superset, you will need to add the following Python library:

```
clickhouse-sqlalchemy>=0.2.2
clickhouse-connect>=0.4.1
```

If running Superset using Docker Compose, add the following to your `./docker/requirements-local.txt` file:

```
clickhouse-sqlalchemy>=0.2.2
clickhouse-connect>=0.4.1
```

The recommended connector library for ClickHouse is
[sqlalchemy-clickhouse](https://github.com/cloudflare/sqlalchemy-clickhouse).
[clickhouse-connect](https://github.com/ClickHouse/clickhouse-connect).

The expected connection string is formatted as follows:

```
clickhouse+native://<user>:<password>@<host>:<port>/<database>[?options…]clickhouse://{username}:{password}@{hostname}:{port}/{database}
clickhousedb://<user>:<password>@<host>:<port>/<database>[?options…]clickhouse://{username}:{password}@{hostname}:{port}/{database}
```

Here's a concrete example of a real connection string:

```
clickhouse+native://demo:demo@github.demo.trial.altinity.cloud/default?secure=true
clickhousedb://demo:demo@github.demo.trial.altinity.cloud/default?secure=true
```

If you're using Clickhouse locally on your computer, you can get away with using a native protocol URL that
If you're using Clickhouse locally on your computer, you can get away with using a http protocol URL that
uses the default user without a password (and doesn't encrypt the connection):

```
clickhouse+native://localhost/default
clickhousedb://localhost/default
```
20 changes: 20 additions & 0 deletions docs/docs/databases/dynamodb.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Amazon DynamoDB
hide_title: true
sidebar_position: 4
version: 1
---

## AWS DynamoDB

### PyDynamoDB

[PyDynamoDB](https://pypi.org/project/PyDynamoDB/) is a Python DB API 2.0 (PEP 249) client for Amazon DynamoDB.

The connection string for Amazon DynamoDB is as follows:

```
dynamodb://{aws_access_key_id}:{aws_secret_access_key}@dynamodb.{region_name}.amazonaws.com:443?connector=superset
```

To get more documentation, please visit: [PyDynamoDB WIKI](https://github.com/passren/PyDynamoDB/wiki/5.-Superset).
5 changes: 3 additions & 2 deletions docs/docs/databases/installing-database-drivers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ A list of some of the recommended packages.
| Database | PyPI package | Connection String |
| --------------------------------------------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [Amazon Athena](/docs/databases/athena) | `pip install "PyAthenaJDBC>1.0.9` , `pip install "PyAthena>1.2.0` | `awsathena+rest://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{ ` |
| [Amazon DynamoDB](/docs/databases/dynamodb) | `pip install "PyDynamoDB>=0.4.2` | `dynamodb://{access_key_id}:{secret_access_key}@dynamodb.{region_name}.amazonaws.com?connector=superset` |
| [Amazon Redshift](/docs/databases/redshift) | `pip install sqlalchemy-redshift` | ` redshift+psycopg2://<userName>:<DBPassword>@<AWS End Point>:5439/<Database Name>` |
| [Apache Drill](/docs/databases/drill) | `pip install sqlalchemy-drill` | `drill+sadrill:// For JDBC drill+jdbc://` |
| [Apache Druid](/docs/databases/druid) | `pip install pydruid` | `druid://<User>:<password>@<Host>:<Port-default-9088>/druid/v2/sql` |
Expand All @@ -35,7 +36,7 @@ A list of some of the recommended packages.
| [Ascend.io](/docs/databases/ascend) | `pip install impyla` | `ascend://{username}:{password}@{hostname}:{port}/{database}?auth_mechanism=PLAIN;use_ssl=true` |
| [Azure MS SQL](/docs/databases/sql-server) | `pip install pymssql` | `mssql+pymssql://UserName@presetSQL:TestPassword@presetSQL.database.windows.net:1433/TestSchema` |
| [Big Query](/docs/databases/bigquery) | `pip install pybigquery` | `bigquery://{project_id}` |
| [ClickHouse](/docs/databases/clickhouse) | `pip install clickhouse-sqlalchemy` | `clickhouse+native://{username}:{password}@{hostname}:{port}/{database}` |
| [ClickHouse](/docs/databases/clickhouse) | `pip install clickhouse-connect` | `clickhousedb://{username}:{password}@{hostname}:{port}/{database}` |
| [CockroachDB](/docs/databases/cockroachdb) | `pip install cockroachdb` | `cockroachdb://root@{hostname}:{port}/{database}?sslmode=disable` |
| [Dremio](/docs/databases/dremio) | `pip install sqlalchemy_dremio` | `dremio://user:pwd@host:31010/` |
| [Elasticsearch](/docs/databases/elasticsearch) | `pip install elasticsearch-dbapi` | `elasticsearch+http://{user}:{password}@{host}:9200/` |
Expand All @@ -48,7 +49,7 @@ A list of some of the recommended packages.
| [MySQL](/docs/databases/mysql) | `pip install mysqlclient` | `mysql://<UserName>:<DBPassword>@<Database Host>/<Database Name>` |
| [Oracle](/docs/databases/oracle) | `pip install cx_Oracle` | `oracle://` |
| [PostgreSQL](/docs/databases/postgres) | `pip install psycopg2` | `postgresql://<UserName>:<DBPassword>@<Database Host>/<Database Name>` |
| [Trino](/docs/databases/trino) | `pip install sqlalchemy-trino` | `trino://{username}:{password}@{hostname}:{port}/{catalog}` |
| [Trino](/docs/databases/trino) | `pip install trino` | `trino://{username}:{password}@{hostname}:{port}/{catalog}` |
| [Presto](/docs/databases/presto) | `pip install pyhive` | `presto://` |
| [SAP Hana](/docs/databases/hana) | `pip install hdbcli sqlalchemy-hana or pip install apache-superset[hana]` | `hana://{username}:{password}@{host}:{port}` |
| [Snowflake](/docs/databases/snowflake) | `pip install snowflake-sqlalchemy` | `snowflake://{user}:{password}@{account}.{region}/{database}?role={role}&warehouse={warehouse}` |
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const config = {
},
{
label: 'Slack',
href: 'https://join.slack.com/t/apache-superset/shared_invite/zt-16jvzmoi8-sI7jKWp~xc2zYRe~NqiY9Q',
href: 'https://join.slack.com/t/apache-superset/shared_invite/zt-1jp6hjzrq-H0PlFtToyLWuPiJDuRWCNw',
},
{
label: 'Mailing List',
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Layout from '@theme/Layout';

const links = [
[
'https://join.slack.com/t/apache-superset/shared_invite/zt-16jvzmoi8-sI7jKWp~xc2zYRe~NqiY9Q',
'https://join.slack.com/t/apache-superset/shared_invite/zt-1jp6hjzrq-H0PlFtToyLWuPiJDuRWCNw',
'Slack',
'interact with other Superset users and community members',
],
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_git_sha() -> str:
"pybigquery>=0.4.10",
"google-cloud-bigquery>=2.4.0",
],
"clickhouse": ["clickhouse-sqlalchemy>=0.2.2, <0.3"],
"clickhouse": ["clickhouse-connect>=0.4.1, <0.5"],
"cockroachdb": ["cockroachdb>=0.3.5, <0.4"],
"cors": ["flask-cors>=2.0.0"],
"crate": ["crate[sqlalchemy]>=0.26.0, <0.27"],
Expand All @@ -142,6 +142,7 @@ def get_git_sha() -> str:
"dremio": ["sqlalchemy-dremio>=1.1.5, <1.3"],
"drill": ["sqlalchemy-drill==0.1.dev"],
"druid": ["pydruid>=0.6.5,<0.7"],
"dynamodb": ["pydynamodb>=0.4.2"],
"solr": ["sqlalchemy-solr >= 0.2.0"],
"elasticsearch": ["elasticsearch-dbapi>=0.2.9, <0.3.0"],
"exasol": ["sqlalchemy-exasol >= 2.4.0, <3.0"],
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ module.exports = {
builder: 'webpack5',
},
stories: [
'../src/@(components|common|filters|explore|views)/**/*.stories.@(tsx|jsx)',
'../src/@(components|common|filters|explore|views)/**/*.*.@(mdx)',
'../src/@(components|common|filters|explore|views|dashboard)/**/*.stories.@(tsx|jsx)',
'../src/@(components|common|filters|explore|views|dashboard)/**/*.*.@(mdx)',
],
addons: [
'@storybook/addon-essentials',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function openModalFromChartContext(targetMenuItem: string) {
.first()
.click();
}

cy.getBySel('metadata-bar').should('be.visible');
cy.wait('@samples');
}

Expand Down Expand Up @@ -196,6 +196,23 @@ describe('Drill to detail modal', () => {
.then($rows => {
expect($rows).to.contain('Victoria');
});

// verify scroll top on pagination
cy.getBySelLike('Number-modal')
.find('.table-condensed')
.scrollTo(0, 100);

cy.get("[role='rowgroup'] [role='row']")
.contains('Miguel')
.should('not.be.visible');

cy.get(".pagination-container [role='navigation'] [role='button']")
.eq(1)
.click();

cy.get("[role='rowgroup'] [role='row']")
.contains('Aaron')
.should('be.visible');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ describe('Native filters', () => {
search.split('').slice(1, search.length).join('');

cy.location().then(loc => {
cy.url().should('contain', 'native_filters_key');
const queryParams = qs.parse(removeFirstChar(loc.search));
filterKey = queryParams.native_filters_key as string;
expect(typeof filterKey).eq('string');
Expand All @@ -465,6 +466,7 @@ describe('Native filters', () => {
addCountryNameFilter();
saveNativeFilterSettings([SAMPLE_CHART]);
cy.location().then(loc => {
cy.url().should('contain', 'native_filters_key');
const queryParams = qs.parse(removeFirstChar(loc.search));
const newfilterKey = queryParams.native_filters_key;
expect(newfilterKey).eq(filterKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ export function interceptDatasets() {
cy.intercept('GET', `/api/v1/dashboard/*/datasets`).as('getDatasets');
}

export function interceptDashboardasync() {
cy.intercept('GET', `/dashboardasync/api/read*`).as('getDashboardasync');
}

export function setFilter(filter: string, option: string) {
interceptFiltering();

Expand Down Expand Up @@ -346,8 +350,8 @@ export function cancelNativeFilterSettings() {
.should('be.visible')
.click();
cy.get(nativeFilters.modal.alertXUnsavedFilters)
.should('have.text', 'There are unsaved changes.')
.should('be.visible');
.should('be.visible')
.should('have.text', 'There are unsaved changes.');
cy.get(nativeFilters.modal.footer)
.find(nativeFilters.modal.yesCancelButton)
.contains('cancel')
Expand Down Expand Up @@ -455,13 +459,17 @@ export function inputNativeFilterDefaultValue(defaultValue: string) {
cy.contains('Filter has default value').click();
cy.contains('Default value is required').should('be.visible');
cy.get(nativeFilters.modal.container).within(() => {
cy.get(nativeFilters.filterConfigurationSections.filterPlaceholder)
.contains('options')
.should('be.visible');
cy.get(
nativeFilters.filterConfigurationSections.filterPlaceholder,
).contains('options');
cy.get(nativeFilters.filterConfigurationSections.collapsedSectionContainer)
.first()
.get(nativeFilters.filtersPanel.columnEmptyInput)
.type(`${defaultValue}{enter}`);
.eq(1)
.within(() => {
cy.get('.ant-select-selection-search-input').type(
`${defaultValue}{enter}`,
{ force: true },
);
});
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
* under the License.
*/

import { interceptGet as interceptDashboardGet } from '../dashboard/utils';
import {
interceptGet as interceptDashboardGet,
interceptDashboardasync,
} from '../dashboard/utils';

export function interceptFiltering() {
cy.intercept('GET', `/api/v1/chart/?q=*`).as('filtering');
Expand Down Expand Up @@ -58,10 +61,13 @@ export function setFilter(filter: string, option: string) {

export function saveChartToDashboard(dashboardName: string) {
interceptDashboardGet();
interceptDashboardasync();
interceptUpdate();
interceptExploreGet();

cy.getBySel('query-save-button').click();
cy.wait('@getDashboardasync');
cy.getBySelLike('chart-modal').should('be.visible');
cy.get(
'[data-test="save-chart-modal-select-dashboard-form"] [aria-label="Select a dashboard"]',
)
Expand Down
Loading

0 comments on commit de3f2a1

Please sign in to comment.