Skip to content

Commit

Permalink
fix(home): make to merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
prosdev0107 committed Jun 20, 2022
2 parents 0834234 + b7eb235 commit d1f4922
Show file tree
Hide file tree
Showing 176 changed files with 2,555 additions and 1,063 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/welcome-new-users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Welcome New Contributor

on:
pull_request_target:
types: [opened]

jobs:
welcome:
runs-on: ubuntu-latest
permissions:
issues: write

steps:
- name: Welcome Message
uses: actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |-
Congrats on making your first PR and thank you for contributing to Superset! :tada: :heart:
We hope to see you in our [Slack](https://apache-superset.slack.com/) community too!
- name: First Time Label
uses: andymckay/labeler@master
with:
add-labels: "new:contributor"
repo-token: ${{ secrets.GITHUB_TOKEN }}
34 changes: 21 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Look through the GitHub issues. Issues tagged with

Superset could always use better documentation,
whether as part of the official Superset docs,
in docstrings, `docs/*.rst` or even on the web as blog posts or
in docstrings, or even on the web as blog posts or
articles. See [Documentation](#documentation) for more details.

### Add Translations
Expand Down Expand Up @@ -388,23 +388,30 @@ cd superset

The latest documentation and tutorial are available at https://superset.apache.org/.

The site is written using the Gatsby framework and docz for the
documentation subsection. Find out more about it in `docs/README.md`
The documentation site is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator, the source for which resides in `./docs`.

#### Images
#### Local Development

If you're adding new images to the documentation, you'll notice that the images
referenced in the rst, e.g.
To set up a local development environment with hot reloading for the documentation site:

.. image:: _static/images/tutorial/tutorial_01_sources_database.png
```shell
cd docs
yarn install # Installs NPM dependencies
yarn start # Starts development server at http://localhost:3000
```

#### Build

To create and serve a production build of the documentation site:

aren't actually stored in that directory. Instead, you should add and commit
images (and any other static assets) to the `superset-frontend/src/assets/images` directory.
When the docs are deployed to https://superset.apache.org/, images
are copied from there to the `_static/images` directory, just like they're referenced
in the docs.
```shell
yarn build
yarn serve
```

#### Deployment

For example, the image referenced above actually lives in `superset-frontend/src/assets/images/tutorial`. Since the image is moved during the documentation build process, the docs reference the image in `_static/images/tutorial` instead.
Commits to `master` trigger a rebuild and redeploy of the documentation site. Submit pull requests that modify the documention with the `docs:` prefix.

### Flask server

Expand Down Expand Up @@ -1064,6 +1071,7 @@ LANGUAGES = {
```

This script will

1. update the template file `superset/translations/messages.pot` with current application strings.
2. update language files with the new extracted strings.

Expand Down
4 changes: 2 additions & 2 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ assists people when migrating to a new version.

### Breaking Changes

- [19770](https://github.com/apache/superset/pull/19770): As per SIPs 11 and 68, the native NoSQL Druid connector is deprecated and has been removed. Druid is still supported through SQLAlchemy via pydruid. The config keys `DRUID_IS_ACTIVE` and `DRUID_METADATA_LINKS_ENABLED` have also been removed.
- [19981](https://github.com/apache/superset/pull/19981): Per [SIP-81](https://github.com/apache/superset/issues/19953) the /explore/form_data api now requires a `datasource_type` in addition to a `datasource_id` for POST and PUT requests
- [19770](https://github.com/apache/superset/pull/19770): Per [SIP-11](https://github.com/apache/superset/issues/6032) and [SIP-68](https://github.com/apache/superset/issues/14909), the native NoSQL Druid connector is deprecated and has been removed. Druid is still supported through SQLAlchemy via pydruid. The config keys `DRUID_IS_ACTIVE` and `DRUID_METADATA_LINKS_ENABLED` have also been removed.
- [19274](https://github.com/apache/superset/pull/19274): The `PUBLIC_ROLE_LIKE_GAMMA` config key has been removed, set `PUBLIC_ROLE_LIKE = "Gamma"` to have the same functionality.
- [19273](https://github.com/apache/superset/pull/19273): The `SUPERSET_CELERY_WORKERS` and `SUPERSET_WORKERS` config keys has been removed. Configure Celery directly using `CELERY_CONFIG` on Superset.
- [19262](https://github.com/apache/superset/pull/19262): Per [SIP-11](https://github.com/apache/superset/issues/6032) and [SIP-68](https://github.com/apache/superset/issues/14909) the native NoSQL Druid connector is deprecated and will no longer be supported. Druid SQL is still [supported](https://superset.apache.org/docs/databases/druid).
- [19231](https://github.com/apache/superset/pull/19231): The `ENABLE_REACT_CRUD_VIEWS` feature flag has been removed (premantly enabled). Any deployments which had set this flag to false will need to verify that the React views support their use case.
- [19230](https://github.com/apache/superset/pull/19230): The `ROW_LEVEL_SECURITY` feature flag has been removed (permantly enabled). Any deployments which had set this flag to false will need to verify that the presence of the Row Level Security feature does not interfere with their use case.
- [19168](https://github.com/apache/superset/pull/19168): Celery upgrade to 5.X resulted in breaking changes to its command line invocation. Please follow [these](https://docs.celeryq.dev/en/stable/whatsnew-5.2.html#step-1-adjust-your-command-line-invocation) instructions for adjustments. Also consider migrating you Celery config per [here](https://docs.celeryq.dev/en/stable/userguide/configuration.html#conf-old-settings-map).
Expand Down
1 change: 1 addition & 0 deletions docker/run-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ gunicorn \
--worker-class ${SERVER_WORKER_CLASS:-gthread} \
--threads ${SERVER_THREADS_AMOUNT:-20} \
--timeout ${GUNICORN_TIMEOUT:-60} \
--keep-alive ${GUNICORN_KEEPALIVE:-2} \
--limit-request-line ${SERVER_LIMIT_REQUEST_LINE:-0} \
--limit-request-field_size ${SERVER_LIMIT_REQUEST_FIELD_SIZE:-0} \
"${FLASK_APP}"
34 changes: 1 addition & 33 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,4 @@ specific language governing permissions and limitations
under the License.
-->

# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn install
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

```
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
This is the public documentation site for Superset, built using [Docusaurus 2](https://docusaurus.io/). See [CONTRIBUTING.md](../CONTRIBUTING.md#documentation)` for documentation on contributing to documentation.
6 changes: 6 additions & 0 deletions docs/docs/databases/druid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ The connection string looks like:
```
druid://<User>:<password>@<Host>:<Port-default-9088>/druid/v2/sql
```
Here's a breakdown of the key components of this connection string:

User: username portion of the credentials needed to connect to your database
Password: password portion of the credentials needed to connect to your database
Host: IP address (or URL) of the host machine that's running your database
Port: specific port that's exposed on your host machine where your database is running

### Customizing Druid Connection

Expand Down
20 changes: 0 additions & 20 deletions docs/docs/installation/cache.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,6 @@ defined in `DATA_CACHE_CONFIG`.

## Celery beat

Superset has a Celery task that will periodically warm up the cache based on different strategies.
To use it, add the following to the `CELERYBEAT_SCHEDULE` section in `config.py`:

```python
CELERYBEAT_SCHEDULE = {
'cache-warmup-hourly': {
'task': 'cache-warmup',
'schedule': crontab(minute=0, hour='*'), # hourly
'kwargs': {
'strategy_name': 'top_n_dashboards',
'top_n': 5,
'since': '7 days ago',
},
},
}
```

This will cache all the charts in the top 5 most popular dashboards every hour. For other
strategies, check the `superset/tasks/cache.py` file.

### Caching Thumbnails

This is an optional feature that can be turned on by activating it’s feature flag on config:
Expand Down
17 changes: 10 additions & 7 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ const config = {
projectName: 'superset', // Usually your repo name.
themes: ['@saucelabs/theme-github-codeblock'],
plugins: [
["docusaurus-plugin-less", {
lessOptions: {
javascriptEnabled: true,
}
}],
[
'docusaurus-plugin-less',
{
lessOptions: {
javascriptEnabled: true,
},
},
],
[
'@docusaurus/plugin-client-redirects',
{
Expand Down Expand Up @@ -229,8 +232,7 @@ const config = {
},
footer: {
style: 'dark',
links: [
],
links: [],
copyright: `Copyright © ${new Date().getFullYear()},
The <a href="https://www.apache.org/" target="_blank" rel="noreferrer">Apache Software Foundation</a>,
Licensed under the Apache <a href="https://apache.org/licenses/LICENSE-2.0" target="_blank" rel="noreferrer">License</a>. <br/>
Expand All @@ -249,6 +251,7 @@ const config = {
darkTheme: darkCodeTheme,
},
}),
scripts: ['/script/matomo.js'],
};

module.exports = config;
3 changes: 3 additions & 0 deletions docs/static/resources/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4399,6 +4399,9 @@
"nullable": true,
"type": "boolean"
},
"kind": {
"readOnly": true
},
"main_dttm_col": {
"maxLength": 250,
"nullable": true,
Expand Down
36 changes: 36 additions & 0 deletions docs/static/script/matomo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

var _paq = (window._paq = window._paq || []);
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = 'https://analytics.apache.org/';
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '22']);
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.async = true;
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
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.6.2
version: 0.6.3
dependencies:
- name: postgresql
version: 11.1.22
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/deployment-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ spec:
{{ toYaml .Values.supersetCeleryBeat.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if or (.Values.serviceAccount.create) (.Values.serviceAccountName) }}
serviceAccountName: {{ template "superset.serviceAccountName" . }}
{{- end }}
securityContext:
runAsUser: {{ .Values.runAsUser }}
{{- if .Values.supersetCeleryBeat.initContainers }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ import {
import { DASHBOARD_LIST } from '../dashboard_list/dashboard_list.helper';
import { CHART_LIST } from '../chart_list/chart_list.helper';

const getTestTitle = (
test: Mocha.Suite = (Cypress as any).mocha.getRunner().suite.ctx.test,
): string =>
test.parent?.title
? `${getTestTitle(test.parent)} -- ${test.title}`
: test.title;

// TODO: fix flaky init logic and re-enable
const milliseconds = new Date().getTime();
const dashboard = `Test Dashboard${milliseconds}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Dashboard save action', () => {
beforeEach(() => {
cy.login();
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.get('#app').then(data => {
cy.get('#app').then(() => {
cy.get('.dashboard-header-container').then(headerContainerElement => {
const dashboardId = headerContainerElement.attr('data-test-id');

Expand All @@ -57,7 +57,7 @@ describe('Dashboard save action', () => {

// change to what the title should be
it('should save as new dashboard', () => {
cy.wait('@copyRequest').then(xhr => {
cy.wait('@copyRequest').then(() => {
cy.get('[data-test="editable-title"]').then(element => {
const dashboardTitle = element.attr('title');
expect(dashboardTitle).to.not.equal(`World Bank's Data`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ describe('VizType control', () => {
cy.visitChartByName('Daily Totals');
cy.verifySliceSuccess({ waitAlias: '@tableChartData' });

cy.get('[data-test="visualization-type"]').contains('Table').click();
cy.contains('View all charts').click();

cy.get('button').contains('Evolution').click(); // change categories
cy.get('[role="button"]').contains('Line Chart').click();
cy.get('button').contains('Select').click();
cy.get('.ant-modal-content').within(() => {
cy.get('button').contains('Evolution').click(); // change categories
cy.get('[role="button"]').contains('Line Chart').click();
cy.get('button').contains('Select').click();
});

cy.get('button[data-test="run-query-button"]').click();
cy.verifySliceSuccess({
Expand All @@ -125,7 +127,7 @@ describe('Test datatable', () => {
cy.get('[data-test="row-count-label"]').contains('26 rows');
cy.get('.ant-empty-description').should('not.exist');
});
it('Datapane loads view samples', () => {
it.skip('Datapane loads view samples', () => {
cy.contains('Samples').click();
cy.get('[data-test="row-count-label"]').contains('1k rows');
cy.get('.ant-empty-description').should('not.exist');
Expand Down
Loading

0 comments on commit d1f4922

Please sign in to comment.