Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elizabeth/test ai #11

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1d2dbf2
add checks on migration
eschutho Sep 12, 2023
dbb7acd
fix(dockefile): broken docker image (#25251)
hugosjoberg Sep 11, 2023
39ec061
feat: Tags ListView Page (#24964)
hughhhh Sep 12, 2023
0db07d1
fix: Add line height to metadata bar (#25268)
kgabryje Sep 12, 2023
574147e
fix: inability to remove chart filter when dashboard time filter is a…
Sep 12, 2023
b5a15d0
build(deps-dev): bump eslint from 8.48.0 to 8.49.0 in /superset-webso…
dependabot[bot] Sep 12, 2023
0aa4705
chore: Remove the ability to switch to filter-box chart when DASHBOAR…
john-bodley Sep 12, 2023
babdbb2
build(deps): bump uuid from 9.0.0 to 9.0.1 in /superset-websocket (#2…
dependabot[bot] Sep 13, 2023
b62ff92
docs: rewrite superset docker localhost prose (#25296)
jsoref Sep 14, 2023
990dbe7
fix: is_select with UNION (#25290)
betodealmeida Sep 14, 2023
aa9d33d
build(deps): bump ws from 8.13.0 to 8.14.1 in /superset-websocket (#2…
dependabot[bot] Sep 14, 2023
e030395
build(docker): bump geckodriver and firefox to latest (#25287)
alekseyolg Sep 14, 2023
a38c50a
feat(datasource): Checkbox for always filtering main dttm in datasour…
Always-prog Sep 14, 2023
aed3dd4
chore: changing one word (disablement -> disabling) (#25291)
rusackas Sep 14, 2023
3a42300
chore(sqllab): Migrate tests to typescript (#25274)
justinpark Sep 15, 2023
2bb10e1
build(deps-dev): bump @types/uuid from 9.0.3 to 9.0.4 in /superset-we…
dependabot[bot] Sep 15, 2023
a9c1262
chore: bump gunicorn to v21 (#25313)
villebro Sep 15, 2023
e1f9812
fix: Add explicit ON DELETE CASCADE for dashboard_roles (#25320)
john-bodley Sep 18, 2023
b5e1b31
docs: add ReadyTech to INTHEWILD.md (#25324)
jbat Sep 18, 2023
65e5ea1
fix(chart): Supporting custom SQL as temporal x-axis column with filt…
Sep 18, 2023
63113d7
fix: Use RLS clause instead of ID for cache key (#25229)
jfrag1 Sep 18, 2023
be79435
docs: add snowflake-sqlalchemy in ./docker/requirements-local.txt (#…
janhavitripurwar Sep 18, 2023
97fd522
feat(tag): fast follow for Tags flatten api + update client with gene…
hughhhh Sep 18, 2023
2f9d0af
feat(helm): Support HPA for supersetNode and supersetWorker (#25280)
tenkian4 Sep 18, 2023
24bd123
docs: jwks_uri addition to OAUTH provider (#24928)
kravi21 Sep 19, 2023
a78a9c2
fix: Improve the reliability of alerts & reports (#25239)
jfrag1 Sep 19, 2023
c63c0c7
feat: Adds CLI commands to execute viz migrations (#25304)
michael-s-molina Sep 19, 2023
e86526e
fix(sqllab): invalid persisted tab state (#25308)
justinpark Sep 19, 2023
cc8c651
fix: DashboardRoles cascade operation (#25349)
michael-s-molina Sep 20, 2023
ddf2783
chore(async): Making create app configurable (#25346)
craig-rueda Sep 20, 2023
e4af715
add ai pr reviewer
eschutho Sep 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ai-pr-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# .github/workflows/chromatic.yml
# seee https://www.chromatic.com/docs/github-actions
#
# 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.
#

name: Code Review

permissions:
contents: read
pull-requests: write

on:
pull_request:
pull_request_review_comment:
types: [created]

concurrency:
group:
${{ github.repository }}-${{ github.event.number || github.head_ref ||
github.sha }}-${{ github.workflow }}-${{ github.event_name ==
'pull_request_review_comment' && 'pr_comment' || 'pr' }}
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }}

jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: coderabbitai/ai-pr-reviewer@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
debug: false
review_simple_changes: false
review_comment_lgtm: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ superset/bin/supersetc
tmp
rat-results.txt
superset/app/
superset-websocket/config.json

# Node.js, webpack artifacts, storybook
*.entry.js
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ under the License.
- [#17045](https://github.com/apache/superset/pull/17045) docs: add vscode linter instructions to CONTRIBUTING.md (@suddjian)
- [#16993](https://github.com/apache/superset/pull/16993) style: Update text for SLL Tooltip (@gabester78)
- [#16959](https://github.com/apache/superset/pull/16959) chore(Dashboard): Implement dedicated message for missing dataset (@geido)
- [#17016](https://github.com/apache/superset/pull/17016) docs(pylint): Add context about disablement of Pylint messages (@john-bodley)
- [#17016](https://github.com/apache/superset/pull/17016) docs(pylint): Add context about disabling of Pylint messages (@john-bodley)
- [#17009](https://github.com/apache/superset/pull/17009) chore: bump superset-ui 0.18.10 (@zhaoyongjie)
- [#16974](https://github.com/apache/superset/pull/16974) refactor(filterset): improve response body (@ofekisr)
- [#16999](https://github.com/apache/superset/pull/16999) chore: no direct use of supersetTheme (or bad LESS vars) in SqlEditor (@rusackas)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ We use [Pylint](https://pylint.org/) for linting which can be invoked via:
tox -e pylint
```

In terms of best practices please avoid blanket disablement of Pylint messages globally (via `.pylintrc`) or top-level within the file header, albeit there being a few exceptions. Disablement should occur inline as it prevents masking issues and provides context as to why said message is disabled.
In terms of best practices please avoid blanket disabling of Pylint messages globally (via `.pylintrc`) or top-level within the file header, albeit there being a few exceptions. Disabling should occur inline as it prevents masking issues and provides context as to why said message is disabled.

Additionally, the Python code is auto-formatted using [Black](https://github.com/python/black) which
is configured as a pre-commit hook. There are also numerous [editor integrations](https://black.readthedocs.io/en/stable/integrations/editors.html)
Expand Down
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}
FROM --platform=${BUILDPLATFORM} node:16-slim AS superset-node

ARG NPM_BUILD_CMD="build"

RUN apt-get update -q \
&& apt-get install -yq --no-install-recommends \
python3 \
make \
gcc \
g++

ENV BUILD_CMD=${NPM_BUILD_CMD} \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# NPM ci first, as to NOT invalidate previous steps except for when package.json changes
Expand Down Expand Up @@ -96,8 +104,8 @@ CMD ["/usr/bin/run-server.sh"]
# Dev image...
######################################################################
FROM lean AS dev
ARG GECKODRIVER_VERSION=v0.32.0 \
FIREFOX_VERSION=106.0.3
ARG GECKODRIVER_VERSION=v0.33.0 \
FIREFOX_VERSION=117.0.1

USER root

Expand Down
1 change: 1 addition & 0 deletions RESOURCES/INTHEWILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Join our growing community!
- [Preset, Inc.](https://preset.io)
- [Pronto Tools](http://www.prontotools.io) [@zkan]
- [PubNub](https://pubnub.com) [@jzucker2]
- [ReadyTech](https://www.readytech.io)
- [Reward Gateway](https://www.rewardgateway.com)
- [ScopeAI](https://www.getscopeai.com) [@iloveluce]
- [Showmax](https://tech.showmax.com) [@bobek]
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ x-superset-volumes: &superset-volumes

version: "3.7"
services:
nginx:
image: nginx:latest
container_name: superset_nginx
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
redis:
image: redis:7
container_name: superset_cache
Expand Down
127 changes: 127 additions & 0 deletions docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#
# 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.
#
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent [$connection_requests] "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 30;
keepalive_requests 2;

###### Compression Stuff

# Enable Gzip compressed.
gzip on;

# Compression level (1-9).
# 5 is a perfect compromise between size and cpu usage, offering about
# 75% reduction for most ascii files (almost identical to level 9).
gzip_comp_level 5;

# Don't compress anything that's already small and unlikely to shrink much
# if at all (the default is 20 bytes, which is bad as that usually leads to
# larger files after gzipping).
gzip_min_length 256;

# Compress data even for clients that are connecting to us via proxies,
# identified by the "Via" header (required for CloudFront).
gzip_proxied any;

# Tell proxies to cache both the gzipped and regular version of a resource
# whenever the client's Accept-Encoding capabilities header varies;
# Avoids the issue where a non-gzip capable client (which is extremely rare
# today) would display gibberish if their proxy gave them the gzipped version.
gzip_vary on;

# Compress all output labeled with one of the following MIME-types.
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component;
# text/html is always compressed by HttpGzipModule

output_buffers 20 10m;

client_max_body_size 10m;

upstream superset_app {
server host.docker.internal:8088;
keepalive 100;
}

upstream superset_websocket {
server host.docker.internal:8080;
keepalive 100;
}

server {
listen 80 default_server;
server_name _;

location /ws {
proxy_pass http://superset_websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}

location / {
proxy_pass http://superset_app;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
port_in_redirect off;
proxy_connect_timeout 300;
}
}
}
2 changes: 1 addition & 1 deletion docs/docs/contributing/hooks-and-linting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ We use [Pylint](https://pylint.org/) for linting which can be invoked via:
tox -e pylint
```

In terms of best practices please avoid blanket disablement of Pylint messages globally (via `.pylintrc`) or top-level within the file header, albeit there being a few exceptions. Disablement should occur inline as it prevents masking issues and provides context as to why said message is disabled.
In terms of best practices please avoid blanket disabling of Pylint messages globally (via `.pylintrc`) or top-level within the file header, albeit there being a few exceptions. Disabling should occur inline as it prevents masking issues and provides context as to why said message is disabled.

Additionally, the Python code is auto-formatted using [Black](https://github.com/python/black) which
is configured as a pre-commit hook. There are also numerous [editor integrations](https://black.readthedocs.io/en/stable/integrations/editors.html)
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/databases/snowflake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ version: 1

## Snowflake

### Install Snowflake Driver

Follow the steps [here](/docs/databases/docker-add-drivers) about how to
install new database drivers when setting up Superset locally via docker-compose.

```
echo "snowflake-sqlalchemy" >> ./docker/requirements-local.txt
```

The recommended connector library for Snowflake is
[snowflake-sqlalchemy](https://pypi.org/project/snowflake-sqlalchemy/).

Expand Down
1 change: 1 addition & 0 deletions docs/docs/installation/configuring-superset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ OAUTH_PROVIDERS = [
'access_token_params':{ # Additional parameters for calls to access_token_url
'client_id':'myClientId'
},
'jwks_uri':'https://myAuthorizationServe/adfs/discovery/keys', # may be required to generate token
'access_token_headers':{ # Additional headers for calls to access_token_url
'Authorization': 'Basic Base64EncodedClientIdAndSecret'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ password: admin

### 5. Connecting Superset to your local database instance

When running Superset using `docker` or `docker-compose` it runs in its own docker container, as if the Superset was running in a separate machine entirely. Therefore attempts to connect to your local database with hostname `localhost` won't work as `localhost` refers to the docker container Superset is running in, and not your actual host machine. Fortunately, docker provides an easy way to access network resources in the host machine from inside a container, and we will leverage this capability to connect to our local database instance.
When running Superset using `docker` or `docker-compose` it runs in its own docker container, as if the Superset was running in a separate machine entirely. Therefore attempts to connect to your local database with the hostname `localhost` won't work as `localhost` refers to the docker container Superset is running in, and not your actual host machine. Fortunately, docker provides an easy way to access network resources in the host machine from inside a container, and we will leverage this capability to connect to our local database instance.

Here the instructions are for connecting to postgresql (which is running on your host machine) from Superset (which is running in its docker container). Other databases may have slightly different configurations but gist would be same and boils down to 2 steps -

1. **(Mac users may skip this step)** Configuring the local postgresql/database instance to accept public incoming connections. By default postgresql only allows incoming connections from `localhost` only, but re-iterating once again, `localhosts` are different for host machine and docker container. For postgresql this involves make one-line changes to the files `postgresql.conf` and `pg_hba.conf`, you can find helpful links tailored to your OS / PG version on the web easily for this task. For docker it suffices to only whitelist IPs `172.0.0.0/8` instead of `*`, but in any case you are _warned_ that doing this in a production database _may_ have disastrous consequences as you are opening your database to the public internet.
2. Instead of `localhost`, try using `host.docker.internal` (Mac users, Ubuntu) or `172.18.0.1` (Linux users) as the host name when attempting to connect to the database. This is docker internal detail, what is happening is that in Mac systems docker creates a dns entry for the host name `host.docker.internal` which resolves to the correct address for the host machine, whereas in linux this is not the case (at least by default). If neither of these 2 hostnames work then you may want to find the exact host name you want to use, for that you can do `ifconfig` or `ip addr show` and look at the IP address of `docker0` interface that must have been created by docker for you. Alternately if you don't even see the `docker0` interface try (if needed with sudo) `docker network inspect bridge` and see if there is an entry for `"Gateway"` and note the IP address.
1. **(Mac users may skip this step)** Configuring the local postgresql/database instance to accept public incoming connections. By default, postgresql only allows incoming connections from `localhost` and under Docker, unless you use `--network=host`, `localhost` will refer to different endpoints on the host machine and in a docker container respectively. Allowing postgresql to accept connections from the Docker involves making one-line changes to the files `postgresql.conf` and `pg_hba.conf`; you can find helpful links tailored to your OS / PG version on the web easily for this task. For Docker it suffices to only whitelist IPs `172.0.0.0/8` instead of `*`, but in any case you are _warned_ that doing this in a production database _may_ have disastrous consequences as you are opening your database to the public internet.
2. Instead of `localhost`, try using `host.docker.internal` (Mac users, Ubuntu) or `172.18.0.1` (Linux users) as the hostname when attempting to connect to the database. This is a Docker internal detail -- what is happening is that, in Mac systems, Docker Desktop creates a dns entry for the hostname `host.docker.internal` which resolves to the correct address for the host machine, whereas in Linux this is not the case (at least by default). If neither of these 2 hostnames work then you may want to find the exact hostname you want to use, for that you can do `ifconfig` or `ip addr show` and look at the IP address of `docker0` interface that must have been created by Docker for you. Alternately if you don't even see the `docker0` interface try (if needed with sudo) `docker network inspect bridge` and see if there is an entry for `"Gateway"` and note the IP address.
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
version: 0.10.6
version: 0.10.7
dependencies:
- name: postgresql
version: 12.1.6
Expand Down
10 changes: 9 additions & 1 deletion helm/superset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs

# superset

![Version: 0.10.6](https://img.shields.io/badge/Version-0.10.6-informational?style=flat-square)
![Version: 0.10.7](https://img.shields.io/badge/Version-0.10.7-informational?style=flat-square)

Apache Superset is a modern, enterprise-ready business intelligence web application

Expand Down Expand Up @@ -169,6 +169,10 @@ helm install my-superset superset/superset
| supersetCeleryFlower.startupProbe.timeoutSeconds | int | `1` | |
| supersetCeleryFlower.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetCeleryFlower deployments |
| supersetNode.affinity | object | `{}` | Affinity to be added to supersetNode deployment |
| supersetNode.autoscaling.enabled | bool | `false` | |
| supersetNode.autoscaling.maxReplicas | int | `100` | |
| supersetNode.autoscaling.minReplicas | int | `1` | |
| supersetNode.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| supersetNode.command | list | See `values.yaml` | Startup command |
| supersetNode.connections.db_host | string | `"{{ .Release.Name }}-postgresql"` | |
| supersetNode.connections.db_name | string | `"superset"` | |
Expand Down Expand Up @@ -257,6 +261,10 @@ helm install my-superset superset/superset
| supersetWebsockets.strategy | object | `{}` | |
| supersetWebsockets.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetWebsockets deployments |
| supersetWorker.affinity | object | `{}` | Affinity to be added to supersetWorker deployment |
| supersetWorker.autoscaling.enabled | bool | `false` | |
| supersetWorker.autoscaling.maxReplicas | int | `100` | |
| supersetWorker.autoscaling.minReplicas | int | `1` | |
| supersetWorker.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| supersetWorker.command | list | a `celery worker` command | Worker startup command |
| supersetWorker.containerSecurityContext | object | `{}` | |
| supersetWorker.deploymentAnnotations | object | `{}` | Annotations to be added to supersetWorker deployment |
Expand Down
2 changes: 2 additions & 0 deletions helm/superset/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ metadata:
annotations: {{- toYaml .Values.supersetWorker.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.supersetWorker.autoscaling.enabled }}
replicas: {{ .Values.supersetWorker.replicaCount }}
{{- end }}
selector:
matchLabels:
app: {{ template "superset.name" . }}-worker
Expand Down
2 changes: 2 additions & 0 deletions helm/superset/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ metadata:
annotations: {{- toYaml .Values.supersetNode.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.supersetNode.autoscaling.enabled }}
replicas: {{ .Values.supersetNode.replicaCount }}
{{- end }}
{{- if .Values.supersetNode.strategy }}
strategy: {{- toYaml .Values.supersetNode.strategy | nindent 4 }}
{{- end }}
Expand Down
Loading
Loading