This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a change to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
from c655a3e7dd chore: Updates CHANGELOG.md for 3.0.2
new 078b78f30b fix(trino): allow impersonate_user flag to be imported (#25872)
new eea6a8ed4f fix(table): Double percenting ad-hoc percentage metrics (#25857)
new 6da18f8451 fix(sqllab): invalid sanitization on comparison symbol (#25903)
new a7fbdd607a fix: update flask-caching to avoid breaking redis cache, solves #25339 (#25947)
new e07eed10a2 fix: always denorm column value before querying values (#25919)
new fb1919a483 chore(colors): Updating Airbnb brand colors (#23619)
new 1c287dfc74 fix: naming denomalized to denormalized in helpers.py (#25973)
new 1d2a564d4e fix(helm): Restart all related deployments when bootstrap script changed (#25703)
new 8d873e6da6 fix(rls): Update text from tables to datasets in RLS modal (#25997)
new 6201a297b4 fix: Make Select component fire onChange listener when a selection is pasted in (#25993)
The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
helm/superset/Chart.yaml | 2 +-
helm/superset/README.md | 476 ++++++++++-----------
helm/superset/templates/deployment-beat.yaml | 1 +
helm/superset/templates/deployment-worker.yaml | 1 +
requirements/base.txt | 7 +-
setup.py | 2 +-
.../cypress/e2e/dashboard/editmode.test.ts | 6 +-
.../e2e/explore/visualizations/dist_bar.test.js | 2 +-
.../e2e/explore/visualizations/line.test.ts | 2 +-
.../src/color/colorSchemes/categorical/airbnb.ts | 34 +-
.../superset-ui-core/src/utils/html.test.tsx | 3 +
.../packages/superset-ui-core/src/utils/html.tsx | 4 +-
.../legacy-plugin-chart-map-box/Stories.tsx | 2 +-
.../plugin-chart-table/src/transformProps.ts | 7 +-
.../src/components/Select/AsyncSelect.test.tsx | 14 +
.../src/components/Select/AsyncSelect.tsx | 1 +
.../src/components/Select/Select.test.tsx | 14 +
superset-frontend/src/components/Select/Select.tsx | 1 +
.../src/features/rls/RowLevelSecurityModal.tsx | 4 +-
superset/connectors/base/models.py | 7 -
superset/connectors/sqla/models.py | 29 --
superset/datasource/api.py | 4 +
superset/models/core.py | 1 +
superset/models/helpers.py | 56 ++-
24 files changed, 339 insertions(+), 341 deletions(-)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 078b78f30b587ee0ec58af8eb89c34c4b0650040
Author: FGrobelny <15...@users.noreply.github.com>
AuthorDate: Wed Nov 8 21:00:18 2023 +0100
fix(trino): allow impersonate_user flag to be imported (#25872)
Co-authored-by: John Bodley <45...@users.noreply.github.com>
(cherry picked from commit 458be8c848c9e3d2a798c9371cb2cd65c206e85c)
---
superset/models/core.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/superset/models/core.py b/superset/models/core.py
index 0581756b81..51d5f8a162 100755
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -185,6 +185,7 @@ class Database(
"is_managed_externally",
"external_url",
"encrypted_extra",
+ "impersonate_user",
]
export_children = ["tables"]
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 1d2a564d4eb1b02a2f80446450e8ae8edb911dc5
Author: josedev-union <70...@users.noreply.github.com>
AuthorDate: Wed Nov 15 20:38:54 2023 +0100
fix(helm): Restart all related deployments when bootstrap script changed (#25703)
---
helm/superset/Chart.yaml | 2 +-
helm/superset/README.md | 476 ++++++++++++-------------
helm/superset/templates/deployment-beat.yaml | 1 +
helm/superset/templates/deployment-worker.yaml | 1 +
4 files changed, 241 insertions(+), 239 deletions(-)
diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml
index bd5c6a7909..83f4119791 100644
--- a/helm/superset/Chart.yaml
+++ b/helm/superset/Chart.yaml
@@ -29,7 +29,7 @@ maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
-version: 0.10.10
+version: 0.10.15
dependencies:
- name: postgresql
version: 12.1.6
diff --git a/helm/superset/README.md b/helm/superset/README.md
index 63578b1c78..0a06e817e7 100644
--- a/helm/superset/README.md
+++ b/helm/superset/README.md
@@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs
# superset
-
+
Apache Superset is a modern, enterprise-ready business intelligence web application
@@ -31,7 +31,7 @@ Apache Superset is a modern, enterprise-ready business intelligence web applicat
## Source Code
-* <https://github.com/apache/superset>
+- <https://github.com/apache/superset>
## TL;DR
@@ -42,242 +42,242 @@ helm install my-superset superset/superset
## Requirements
-| Repository | Name | Version |
-|------------|------|---------|
-| https://charts.bitnami.com/bitnami | postgresql | 12.1.6 |
-| https://charts.bitnami.com/bitnami | redis | 17.9.4 |
+| Repository | Name | Version |
+| ---------------------------------- | ---------- | ------- |
+| https://charts.bitnami.com/bitnami | postgresql | 12.1.6 |
+| https://charts.bitnami.com/bitnami | redis | 17.9.4 |
## Values
-| Key | Type | Default | Description |
-|-----|------|---------|-------------|
-| affinity | object | `{}` | |
-| bootstrapScript | string | see `values.yaml` | Install additional packages and do any other bootstrap configuration in this script For production clusters it's recommended to build own image with this step done in CI |
-| configFromSecret | string | `"{{ template \"superset.fullname\" . }}-config"` | The name of the secret which we will use to generate a superset_config.py file Note: this secret must have the key superset_config.py in it and can include other files as well |
-| configMountPath | string | `"/app/pythonpath"` | |
-| configOverrides | object | `{}` | A dictionary of overrides to append at the end of superset_config.py - the name does not matter WARNING: the order is not guaranteed Files can be passed as helm --set-file configOverrides.my-override=my-file.py |
-| configOverridesFiles | object | `{}` | Same as above but the values are files |
-| envFromSecret | string | `"{{ template \"superset.fullname\" . }}-env"` | The name of the secret which we will use to populate env vars in deployed pods This can be useful for secret keys, etc. |
-| envFromSecrets | list | `[]` | This can be a list of templated strings |
-| extraConfigMountPath | string | `"/app/configs"` | |
-| extraConfigs | object | `{}` | Extra files to mount on `/app/pythonpath` |
-| extraEnv | object | `{}` | Extra environment variables that will be passed into pods |
-| extraEnvRaw | list | `[]` | Extra environment variables in RAW format that will be passed into pods |
-| extraSecretEnv | object | `{}` | Extra environment variables to pass as secrets |
-| extraSecrets | object | `{}` | Extra files to mount on `/app/pythonpath` as secrets |
-| extraVolumeMounts | list | `[]` | |
-| extraVolumes | list | `[]` | |
-| fullnameOverride | string | `nil` | Provide a name to override the full names of resources |
-| hostAliases | list | `[]` | Custom hostAliases for all superset pods # https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ |
-| image.pullPolicy | string | `"IfNotPresent"` | |
-| image.repository | string | `"apachesuperset.docker.scarf.sh/apache/superset"` | |
-| image.tag | string | `""` | |
-| imagePullSecrets | list | `[]` | |
-| ingress.annotations | object | `{}` | |
-| ingress.enabled | bool | `false` | |
-| ingress.extraHostsRaw | list | `[]` | |
-| ingress.hosts[0] | string | `"chart-example.local"` | |
-| ingress.ingressClassName | string | `nil` | |
-| ingress.path | string | `"/"` | |
-| ingress.pathType | string | `"ImplementationSpecific"` | |
-| ingress.tls | list | `[]` | |
-| init.adminUser.email | string | `"admin@superset.com"` | |
-| init.adminUser.firstname | string | `"Superset"` | |
-| init.adminUser.lastname | string | `"Admin"` | |
-| init.adminUser.password | string | `"admin"` | |
-| init.adminUser.username | string | `"admin"` | |
-| init.affinity | object | `{}` | |
-| init.command | list | a `superset_init.sh` command | Command |
-| init.containerSecurityContext | object | `{}` | |
-| init.createAdmin | bool | `true` | |
-| init.enabled | bool | `true` | |
-| init.initContainers | list | a container waiting for postgres | List of initContainers |
-| init.initscript | string | a script to create admin user and initailize roles | A Superset init script |
-| init.jobAnnotations."helm.sh/hook" | string | `"post-install,post-upgrade"` | |
-| init.jobAnnotations."helm.sh/hook-delete-policy" | string | `"before-hook-creation"` | |
-| init.loadExamples | bool | `false` | |
-| init.podAnnotations | object | `{}` | |
-| init.podSecurityContext | object | `{}` | |
-| init.resources | object | `{}` | |
-| init.tolerations | list | `[]` | |
-| init.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to init job |
-| initImage.pullPolicy | string | `"IfNotPresent"` | |
-| initImage.repository | string | `"apache/superset"` | |
-| initImage.tag | string | `"dockerize"` | |
-| nameOverride | string | `nil` | Provide a name to override the name of the chart |
-| nodeSelector | object | `{}` | |
-| postgresql | object | see `values.yaml` | Configuration values for the postgresql dependency. ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md |
-| redis | object | see `values.yaml` | Configuration values for the Redis dependency. ref: https://github.com/bitnami/charts/blob/master/bitnami/redis More documentation can be found here: https://artifacthub.io/packages/helm/bitnami/redis |
-| resources | object | `{}` | |
-| runAsUser | int | `0` | User ID directive. This user must have enough permissions to run the bootstrap script Running containers as root is not recommended in production. Change this to another UID - e.g. 1000 to be more secure |
-| service.annotations | object | `{}` | |
-| service.loadBalancerIP | string | `nil` | |
-| service.nodePort.http | int | `"nil"` | |
-| service.port | int | `8088` | |
-| service.type | string | `"ClusterIP"` | |
-| serviceAccount.annotations | object | `{}` | |
-| serviceAccount.create | bool | `false` | Create custom service account for Superset. If create: true and serviceAccountName is not provided, `superset.fullname` will be used. |
-| serviceAccountName | string | `nil` | Specify service account name to be used |
-| supersetCeleryBeat.affinity | object | `{}` | Affinity to be added to supersetCeleryBeat deployment |
-| supersetCeleryBeat.command | list | a `celery beat` command | Command |
-| supersetCeleryBeat.containerSecurityContext | object | `{}` | |
-| supersetCeleryBeat.deploymentAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat deployment |
-| supersetCeleryBeat.enabled | bool | `false` | This is only required if you intend to use alerts and reports |
-| supersetCeleryBeat.forceReload | bool | `false` | If true, forces deployment to reload on each upgrade |
-| supersetCeleryBeat.initContainers | list | a container waiting for postgres | List of init containers |
-| supersetCeleryBeat.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat pods |
-| supersetCeleryBeat.podLabels | object | `{}` | Labels to be added to supersetCeleryBeat pods |
-| supersetCeleryBeat.podSecurityContext | object | `{}` | |
-| supersetCeleryBeat.resources | object | `{}` | Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above. |
-| supersetCeleryBeat.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetCeleryBeat deployments |
-| supersetCeleryFlower.affinity | object | `{}` | Affinity to be added to supersetCeleryFlower deployment |
-| supersetCeleryFlower.command | list | a `celery flower` command | Command |
-| supersetCeleryFlower.containerSecurityContext | object | `{}` | |
-| supersetCeleryFlower.deploymentAnnotations | object | `{}` | Annotations to be added to supersetCeleryFlower deployment |
-| supersetCeleryFlower.enabled | bool | `false` | Enables a Celery flower deployment (management UI to monitor celery jobs) WARNING: on superset 1.x, this requires a Superset image that has `flower<1.0.0` installed (which is NOT the case of the default images) flower>=1.0.0 requires Celery 5+ which Superset 1.5 does not support |
-| supersetCeleryFlower.initContainers | list | a container waiting for postgres and redis | List of init containers |
-| supersetCeleryFlower.livenessProbe.failureThreshold | int | `3` | |
-| supersetCeleryFlower.livenessProbe.httpGet.path | string | `"/api/workers"` | |
-| supersetCeleryFlower.livenessProbe.httpGet.port | string | `"flower"` | |
-| supersetCeleryFlower.livenessProbe.initialDelaySeconds | int | `5` | |
-| supersetCeleryFlower.livenessProbe.periodSeconds | int | `5` | |
-| supersetCeleryFlower.livenessProbe.successThreshold | int | `1` | |
-| supersetCeleryFlower.livenessProbe.timeoutSeconds | int | `1` | |
-| supersetCeleryFlower.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryFlower pods |
-| supersetCeleryFlower.podLabels | object | `{}` | Labels to be added to supersetCeleryFlower pods |
-| supersetCeleryFlower.podSecurityContext | object | `{}` | |
-| supersetCeleryFlower.readinessProbe.failureThreshold | int | `3` | |
-| supersetCeleryFlower.readinessProbe.httpGet.path | string | `"/api/workers"` | |
-| supersetCeleryFlower.readinessProbe.httpGet.port | string | `"flower"` | |
-| supersetCeleryFlower.readinessProbe.initialDelaySeconds | int | `5` | |
-| supersetCeleryFlower.readinessProbe.periodSeconds | int | `5` | |
-| supersetCeleryFlower.readinessProbe.successThreshold | int | `1` | |
-| supersetCeleryFlower.readinessProbe.timeoutSeconds | int | `1` | |
-| supersetCeleryFlower.replicaCount | int | `1` | |
-| supersetCeleryFlower.resources | object | `{}` | Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above. |
-| supersetCeleryFlower.service.annotations | object | `{}` | |
-| supersetCeleryFlower.service.loadBalancerIP | string | `nil` | |
-| supersetCeleryFlower.service.nodePort.http | int | `"nil"` | |
-| supersetCeleryFlower.service.port | int | `5555` | |
-| supersetCeleryFlower.service.type | string | `"ClusterIP"` | |
-| supersetCeleryFlower.startupProbe.failureThreshold | int | `60` | |
-| supersetCeleryFlower.startupProbe.httpGet.path | string | `"/api/workers"` | |
-| supersetCeleryFlower.startupProbe.httpGet.port | string | `"flower"` | |
-| supersetCeleryFlower.startupProbe.initialDelaySeconds | int | `5` | |
-| supersetCeleryFlower.startupProbe.periodSeconds | int | `5` | |
-| supersetCeleryFlower.startupProbe.successThreshold | int | `1` | |
-| 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.command | list | See `values.yaml` | Startup command |
-| supersetNode.connections.db_host | string | `"{{ .Release.Name }}-postgresql"` | |
-| supersetNode.connections.db_name | string | `"superset"` | |
-| supersetNode.connections.db_pass | string | `"superset"` | |
-| supersetNode.connections.db_port | string | `"5432"` | |
-| supersetNode.connections.db_user | string | `"superset"` | |
-| supersetNode.connections.redis_host | string | `"{{ .Release.Name }}-redis-headless"` | Change in case of bringing your own redis and then also set redis.enabled:false |
-| supersetNode.connections.redis_port | string | `"6379"` | |
-| supersetNode.containerSecurityContext | object | `{}` | |
-| supersetNode.deploymentAnnotations | object | `{}` | Annotations to be added to supersetNode deployment |
-| supersetNode.deploymentLabels | object | `{}` | Labels to be added to supersetNode deployment |
-| supersetNode.env | object | `{}` | |
-| supersetNode.extraContainers | list | `[]` | Launch additional containers into supersetNode pod |
-| supersetNode.forceReload | bool | `false` | If true, forces deployment to reload on each upgrade |
-| supersetNode.initContainers | list | a container waiting for postgres | Init containers |
-| supersetNode.livenessProbe.failureThreshold | int | `3` | |
-| supersetNode.livenessProbe.httpGet.path | string | `"/health"` | |
-| supersetNode.livenessProbe.httpGet.port | string | `"http"` | |
-| supersetNode.livenessProbe.initialDelaySeconds | int | `15` | |
-| supersetNode.livenessProbe.periodSeconds | int | `15` | |
-| supersetNode.livenessProbe.successThreshold | int | `1` | |
-| supersetNode.livenessProbe.timeoutSeconds | int | `1` | |
-| supersetNode.podAnnotations | object | `{}` | Annotations to be added to supersetNode pods |
-| supersetNode.podLabels | object | `{}` | Labels to be added to supersetNode pods |
-| supersetNode.podSecurityContext | object | `{}` | |
-| supersetNode.readinessProbe.failureThreshold | int | `3` | |
-| supersetNode.readinessProbe.httpGet.path | string | `"/health"` | |
-| supersetNode.readinessProbe.httpGet.port | string | `"http"` | |
-| supersetNode.readinessProbe.initialDelaySeconds | int | `15` | |
-| supersetNode.readinessProbe.periodSeconds | int | `15` | |
-| supersetNode.readinessProbe.successThreshold | int | `1` | |
-| supersetNode.readinessProbe.timeoutSeconds | int | `1` | |
-| supersetNode.replicaCount | int | `1` | |
-| supersetNode.resources | object | `{}` | Resource settings for the supersetNode pods - these settings overwrite might existing values from the global resources object defined above. |
-| supersetNode.startupProbe.failureThreshold | int | `60` | |
-| supersetNode.startupProbe.httpGet.path | string | `"/health"` | |
-| supersetNode.startupProbe.httpGet.port | string | `"http"` | |
-| supersetNode.startupProbe.initialDelaySeconds | int | `15` | |
-| supersetNode.startupProbe.periodSeconds | int | `5` | |
-| supersetNode.startupProbe.successThreshold | int | `1` | |
-| supersetNode.startupProbe.timeoutSeconds | int | `1` | |
-| supersetNode.strategy | object | `{}` | |
-| supersetNode.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetNode deployments |
-| supersetWebsockets.affinity | object | `{}` | Affinity to be added to supersetWebsockets deployment |
-| supersetWebsockets.command | list | `[]` | |
-| supersetWebsockets.config | object | see `values.yaml` | The config.json to pass to the server, see https://github.com/apache/superset/tree/master/superset-websocket Note that the configuration can also read from environment variables (which will have priority), see https://github.com/apache/superset/blob/master/superset-websocket/src/config.ts for a list of supported variables |
-| supersetWebsockets.containerSecurityContext | object | `{}` | |
-| supersetWebsockets.deploymentAnnotations | object | `{}` | |
-| supersetWebsockets.enabled | bool | `false` | This is only required if you intend to use `GLOBAL_ASYNC_QUERIES` in `ws` mode see https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries |
-| supersetWebsockets.image.pullPolicy | string | `"IfNotPresent"` | |
-| supersetWebsockets.image.repository | string | `"oneacrefund/superset-websocket"` | There is no official image (yet), this one is community-supported |
-| supersetWebsockets.image.tag | string | `"latest"` | |
-| supersetWebsockets.ingress.path | string | `"/ws"` | |
-| supersetWebsockets.ingress.pathType | string | `"Prefix"` | |
-| supersetWebsockets.livenessProbe.failureThreshold | int | `3` | |
-| supersetWebsockets.livenessProbe.httpGet.path | string | `"/health"` | |
-| supersetWebsockets.livenessProbe.httpGet.port | string | `"ws"` | |
-| supersetWebsockets.livenessProbe.initialDelaySeconds | int | `5` | |
-| supersetWebsockets.livenessProbe.periodSeconds | int | `5` | |
-| supersetWebsockets.livenessProbe.successThreshold | int | `1` | |
-| supersetWebsockets.livenessProbe.timeoutSeconds | int | `1` | |
-| supersetWebsockets.podAnnotations | object | `{}` | |
-| supersetWebsockets.podLabels | object | `{}` | |
-| supersetWebsockets.podSecurityContext | object | `{}` | |
-| supersetWebsockets.readinessProbe.failureThreshold | int | `3` | |
-| supersetWebsockets.readinessProbe.httpGet.path | string | `"/health"` | |
-| supersetWebsockets.readinessProbe.httpGet.port | string | `"ws"` | |
-| supersetWebsockets.readinessProbe.initialDelaySeconds | int | `5` | |
-| supersetWebsockets.readinessProbe.periodSeconds | int | `5` | |
-| supersetWebsockets.readinessProbe.successThreshold | int | `1` | |
-| supersetWebsockets.readinessProbe.timeoutSeconds | int | `1` | |
-| supersetWebsockets.replicaCount | int | `1` | |
-| supersetWebsockets.resources | object | `{}` | |
-| supersetWebsockets.service.annotations | object | `{}` | |
-| supersetWebsockets.service.loadBalancerIP | string | `nil` | |
-| supersetWebsockets.service.nodePort.http | int | `"nil"` | |
-| supersetWebsockets.service.port | int | `8080` | |
-| supersetWebsockets.service.type | string | `"ClusterIP"` | |
-| supersetWebsockets.startupProbe.failureThreshold | int | `60` | |
-| supersetWebsockets.startupProbe.httpGet.path | string | `"/health"` | |
-| supersetWebsockets.startupProbe.httpGet.port | string | `"ws"` | |
-| supersetWebsockets.startupProbe.initialDelaySeconds | int | `5` | |
-| supersetWebsockets.startupProbe.periodSeconds | int | `5` | |
-| supersetWebsockets.startupProbe.successThreshold | int | `1` | |
-| supersetWebsockets.startupProbe.timeoutSeconds | int | `1` | |
-| supersetWebsockets.strategy | object | `{}` | |
-| supersetWebsockets.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetWebsockets deployments |
-| supersetWorker.affinity | object | `{}` | Affinity to be added to supersetWorker deployment |
-| supersetWorker.command | list | a `celery worker` command | Worker startup command |
-| supersetWorker.containerSecurityContext | object | `{}` | |
-| supersetWorker.deploymentAnnotations | object | `{}` | Annotations to be added to supersetWorker deployment |
-| supersetWorker.deploymentLabels | object | `{}` | Labels to be added to supersetWorker deployment |
-| supersetWorker.extraContainers | list | `[]` | Launch additional containers into supersetWorker pod |
-| supersetWorker.forceReload | bool | `false` | If true, forces deployment to reload on each upgrade |
-| supersetWorker.initContainers | list | a container waiting for postgres and redis | Init container |
-| supersetWorker.livenessProbe.exec.command | list | a `celery inspect ping` command | Liveness probe command |
-| supersetWorker.livenessProbe.failureThreshold | int | `3` | |
-| supersetWorker.livenessProbe.initialDelaySeconds | int | `120` | |
-| supersetWorker.livenessProbe.periodSeconds | int | `60` | |
-| supersetWorker.livenessProbe.successThreshold | int | `1` | |
-| supersetWorker.livenessProbe.timeoutSeconds | int | `60` | |
-| supersetWorker.podAnnotations | object | `{}` | Annotations to be added to supersetWorker pods |
-| supersetWorker.podLabels | object | `{}` | Labels to be added to supersetWorker pods |
-| supersetWorker.podSecurityContext | object | `{}` | |
-| supersetWorker.readinessProbe | object | `{}` | No startup/readiness probes by default since we don't really care about its startup time (it doesn't serve traffic) |
-| supersetWorker.replicaCount | int | `1` | |
-| supersetWorker.resources | object | `{}` | Resource settings for the supersetWorker pods - these settings overwrite might existing values from the global resources object defined above. |
-| supersetWorker.startupProbe | object | `{}` | No startup/readiness probes by default since we don't really care about its startup time (it doesn't serve traffic) |
-| supersetWorker.strategy | object | `{}` | |
-| supersetWorker.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetWorker deployments |
-| tolerations | list | `[]` | |
-| topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to all deployments |
+| Key | Type | Default | Description |
+| ------------------------------------------------------- | ------ | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| affinity | object | `{}` | |
+| bootstrapScript | string | see `values.yaml` | Install additional packages and do any other bootstrap configuration in this script For production clusters it's recommended to build own image with this step done in CI |
+| configFromSecret | string | `"{{ template \"superset.fullname\" . }}-config"` | The name of the secret which we will use to generate a superset_config.py file Note: this secret must have the key superset_config.py in it and can include other files as well |
+| configMountPath | string | `"/app/pythonpath"` | |
+| configOverrides | object | `{}` | A dictionary of overrides to append at the end of superset_config.py - the name does not matter WARNING: the order is not guaranteed Files can be passed as helm --set-file configOverrides.my-override=my-file.py |
+| configOverridesFiles | object | `{}` | Same as above but the values are files |
+| envFromSecret | string | `"{{ template \"superset.fullname\" . }}-env"` | The name of the secret which we will use to populate env vars in deployed pods This can be useful for secret keys, etc. |
+| envFromSecrets | list | `[]` | This can be a list of templated strings |
+| extraConfigMountPath | string | `"/app/configs"` | |
+| extraConfigs | object | `{}` | Extra files to mount on `/app/pythonpath` |
+| extraEnv | object | `{}` | Extra environment variables that will be passed into pods |
+| extraEnvRaw | list | `[]` | Extra environment variables in RAW format that will be passed into pods |
+| extraSecretEnv | object | `{}` | Extra environment variables to pass as secrets |
+| extraSecrets | object | `{}` | Extra files to mount on `/app/pythonpath` as secrets |
+| extraVolumeMounts | list | `[]` | |
+| extraVolumes | list | `[]` | |
+| fullnameOverride | string | `nil` | Provide a name to override the full names of resources |
+| hostAliases | list | `[]` | Custom hostAliases for all superset pods # https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ |
+| image.pullPolicy | string | `"IfNotPresent"` | |
+| image.repository | string | `"apachesuperset.docker.scarf.sh/apache/superset"` | |
+| image.tag | string | `""` | |
+| imagePullSecrets | list | `[]` | |
+| ingress.annotations | object | `{}` | |
+| ingress.enabled | bool | `false` | |
+| ingress.extraHostsRaw | list | `[]` | |
+| ingress.hosts[0] | string | `"chart-example.local"` | |
+| ingress.ingressClassName | string | `nil` | |
+| ingress.path | string | `"/"` | |
+| ingress.pathType | string | `"ImplementationSpecific"` | |
+| ingress.tls | list | `[]` | |
+| init.adminUser.email | string | `"admin@superset.com"` | |
+| init.adminUser.firstname | string | `"Superset"` | |
+| init.adminUser.lastname | string | `"Admin"` | |
+| init.adminUser.password | string | `"admin"` | |
+| init.adminUser.username | string | `"admin"` | |
+| init.affinity | object | `{}` | |
+| init.command | list | a `superset_init.sh` command | Command |
+| init.containerSecurityContext | object | `{}` | |
+| init.createAdmin | bool | `true` | |
+| init.enabled | bool | `true` | |
+| init.initContainers | list | a container waiting for postgres | List of initContainers |
+| init.initscript | string | a script to create admin user and initailize roles | A Superset init script |
+| init.jobAnnotations."helm.sh/hook" | string | `"post-install,post-upgrade"` | |
+| init.jobAnnotations."helm.sh/hook-delete-policy" | string | `"before-hook-creation"` | |
+| init.loadExamples | bool | `false` | |
+| init.podAnnotations | object | `{}` | |
+| init.podSecurityContext | object | `{}` | |
+| init.resources | object | `{}` | |
+| init.tolerations | list | `[]` | |
+| init.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to init job |
+| initImage.pullPolicy | string | `"IfNotPresent"` | |
+| initImage.repository | string | `"apache/superset"` | |
+| initImage.tag | string | `"dockerize"` | |
+| nameOverride | string | `nil` | Provide a name to override the name of the chart |
+| nodeSelector | object | `{}` | |
+| postgresql | object | see `values.yaml` | Configuration values for the postgresql dependency. ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md |
+| redis | object | see `values.yaml` | Configuration values for the Redis dependency. ref: https://github.com/bitnami/charts/blob/master/bitnami/redis More documentation can be found here: https://artifacthub.io/packages/helm/bitnami/redis |
+| resources | object | `{}` | |
+| runAsUser | int | `0` | User ID directive. This user must have enough permissions to run the bootstrap script Running containers as root is not recommended in production. Change this to another UID - e.g. 1000 to be more secure |
+| service.annotations | object | `{}` | |
+| service.loadBalancerIP | string | `nil` | |
+| service.nodePort.http | int | `"nil"` | |
+| service.port | int | `8088` | |
+| service.type | string | `"ClusterIP"` | |
+| serviceAccount.annotations | object | `{}` | |
+| serviceAccount.create | bool | `false` | Create custom service account for Superset. If create: true and serviceAccountName is not provided, `superset.fullname` will be used. |
+| serviceAccountName | string | `nil` | Specify service account name to be used |
+| supersetCeleryBeat.affinity | object | `{}` | Affinity to be added to supersetCeleryBeat deployment |
+| supersetCeleryBeat.command | list | a `celery beat` command | Command |
+| supersetCeleryBeat.containerSecurityContext | object | `{}` | |
+| supersetCeleryBeat.deploymentAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat deployment |
+| supersetCeleryBeat.enabled | bool | `false` | This is only required if you intend to use alerts and reports |
+| supersetCeleryBeat.forceReload | bool | `false` | If true, forces deployment to reload on each upgrade |
+| supersetCeleryBeat.initContainers | list | a container waiting for postgres | List of init containers |
+| supersetCeleryBeat.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat pods |
+| supersetCeleryBeat.podLabels | object | `{}` | Labels to be added to supersetCeleryBeat pods |
+| supersetCeleryBeat.podSecurityContext | object | `{}` | |
+| supersetCeleryBeat.resources | object | `{}` | Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above. |
+| supersetCeleryBeat.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetCeleryBeat deployments |
+| supersetCeleryFlower.affinity | object | `{}` | Affinity to be added to supersetCeleryFlower deployment |
+| supersetCeleryFlower.command | list | a `celery flower` command | Command |
+| supersetCeleryFlower.containerSecurityContext | object | `{}` | |
+| supersetCeleryFlower.deploymentAnnotations | object | `{}` | Annotations to be added to supersetCeleryFlower deployment |
+| supersetCeleryFlower.enabled | bool | `false` | Enables a Celery flower deployment (management UI to monitor celery jobs) WARNING: on superset 1.x, this requires a Superset image that has `flower<1.0.0` installed (which is NOT the case of the default images) flower>=1.0.0 requires Celery 5+ which Superset 1.5 does not support |
+| supersetCeleryFlower.initContainers | list | a container waiting for postgres and redis | List of init containers |
+| supersetCeleryFlower.livenessProbe.failureThreshold | int | `3` | |
+| supersetCeleryFlower.livenessProbe.httpGet.path | string | `"/api/workers"` | |
+| supersetCeleryFlower.livenessProbe.httpGet.port | string | `"flower"` | |
+| supersetCeleryFlower.livenessProbe.initialDelaySeconds | int | `5` | |
+| supersetCeleryFlower.livenessProbe.periodSeconds | int | `5` | |
+| supersetCeleryFlower.livenessProbe.successThreshold | int | `1` | |
+| supersetCeleryFlower.livenessProbe.timeoutSeconds | int | `1` | |
+| supersetCeleryFlower.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryFlower pods |
+| supersetCeleryFlower.podLabels | object | `{}` | Labels to be added to supersetCeleryFlower pods |
+| supersetCeleryFlower.podSecurityContext | object | `{}` | |
+| supersetCeleryFlower.readinessProbe.failureThreshold | int | `3` | |
+| supersetCeleryFlower.readinessProbe.httpGet.path | string | `"/api/workers"` | |
+| supersetCeleryFlower.readinessProbe.httpGet.port | string | `"flower"` | |
+| supersetCeleryFlower.readinessProbe.initialDelaySeconds | int | `5` | |
+| supersetCeleryFlower.readinessProbe.periodSeconds | int | `5` | |
+| supersetCeleryFlower.readinessProbe.successThreshold | int | `1` | |
+| supersetCeleryFlower.readinessProbe.timeoutSeconds | int | `1` | |
+| supersetCeleryFlower.replicaCount | int | `1` | |
+| supersetCeleryFlower.resources | object | `{}` | Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above. |
+| supersetCeleryFlower.service.annotations | object | `{}` | |
+| supersetCeleryFlower.service.loadBalancerIP | string | `nil` | |
+| supersetCeleryFlower.service.nodePort.http | int | `"nil"` | |
+| supersetCeleryFlower.service.port | int | `5555` | |
+| supersetCeleryFlower.service.type | string | `"ClusterIP"` | |
+| supersetCeleryFlower.startupProbe.failureThreshold | int | `60` | |
+| supersetCeleryFlower.startupProbe.httpGet.path | string | `"/api/workers"` | |
+| supersetCeleryFlower.startupProbe.httpGet.port | string | `"flower"` | |
+| supersetCeleryFlower.startupProbe.initialDelaySeconds | int | `5` | |
+| supersetCeleryFlower.startupProbe.periodSeconds | int | `5` | |
+| supersetCeleryFlower.startupProbe.successThreshold | int | `1` | |
+| 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.command | list | See `values.yaml` | Startup command |
+| supersetNode.connections.db_host | string | `"{{ .Release.Name }}-postgresql"` | |
+| supersetNode.connections.db_name | string | `"superset"` | |
+| supersetNode.connections.db_pass | string | `"superset"` | |
+| supersetNode.connections.db_port | string | `"5432"` | |
+| supersetNode.connections.db_user | string | `"superset"` | |
+| supersetNode.connections.redis_host | string | `"{{ .Release.Name }}-redis-headless"` | Change in case of bringing your own redis and then also set redis.enabled:false |
+| supersetNode.connections.redis_port | string | `"6379"` | |
+| supersetNode.containerSecurityContext | object | `{}` | |
+| supersetNode.deploymentAnnotations | object | `{}` | Annotations to be added to supersetNode deployment |
+| supersetNode.deploymentLabels | object | `{}` | Labels to be added to supersetNode deployment |
+| supersetNode.env | object | `{}` | |
+| supersetNode.extraContainers | list | `[]` | Launch additional containers into supersetNode pod |
+| supersetNode.forceReload | bool | `false` | If true, forces deployment to reload on each upgrade |
+| supersetNode.initContainers | list | a container waiting for postgres | Init containers |
+| supersetNode.livenessProbe.failureThreshold | int | `3` | |
+| supersetNode.livenessProbe.httpGet.path | string | `"/health"` | |
+| supersetNode.livenessProbe.httpGet.port | string | `"http"` | |
+| supersetNode.livenessProbe.initialDelaySeconds | int | `15` | |
+| supersetNode.livenessProbe.periodSeconds | int | `15` | |
+| supersetNode.livenessProbe.successThreshold | int | `1` | |
+| supersetNode.livenessProbe.timeoutSeconds | int | `1` | |
+| supersetNode.podAnnotations | object | `{}` | Annotations to be added to supersetNode pods |
+| supersetNode.podLabels | object | `{}` | Labels to be added to supersetNode pods |
+| supersetNode.podSecurityContext | object | `{}` | |
+| supersetNode.readinessProbe.failureThreshold | int | `3` | |
+| supersetNode.readinessProbe.httpGet.path | string | `"/health"` | |
+| supersetNode.readinessProbe.httpGet.port | string | `"http"` | |
+| supersetNode.readinessProbe.initialDelaySeconds | int | `15` | |
+| supersetNode.readinessProbe.periodSeconds | int | `15` | |
+| supersetNode.readinessProbe.successThreshold | int | `1` | |
+| supersetNode.readinessProbe.timeoutSeconds | int | `1` | |
+| supersetNode.replicaCount | int | `1` | |
+| supersetNode.resources | object | `{}` | Resource settings for the supersetNode pods - these settings overwrite might existing values from the global resources object defined above. |
+| supersetNode.startupProbe.failureThreshold | int | `60` | |
+| supersetNode.startupProbe.httpGet.path | string | `"/health"` | |
+| supersetNode.startupProbe.httpGet.port | string | `"http"` | |
+| supersetNode.startupProbe.initialDelaySeconds | int | `15` | |
+| supersetNode.startupProbe.periodSeconds | int | `5` | |
+| supersetNode.startupProbe.successThreshold | int | `1` | |
+| supersetNode.startupProbe.timeoutSeconds | int | `1` | |
+| supersetNode.strategy | object | `{}` | |
+| supersetNode.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetNode deployments |
+| supersetWebsockets.affinity | object | `{}` | Affinity to be added to supersetWebsockets deployment |
+| supersetWebsockets.command | list | `[]` | |
+| supersetWebsockets.config | object | see `values.yaml` | The config.json to pass to the server, see https://github.com/apache/superset/tree/master/superset-websocket Note that the configuration can also read from environment variables (which will have priority), see https://github.com/apache/superset/blob/master/superset-websocket/src/config.ts for a list of supported variables |
+| supersetWebsockets.containerSecurityContext | object | `{}` | |
+| supersetWebsockets.deploymentAnnotations | object | `{}` | |
+| supersetWebsockets.enabled | bool | `false` | This is only required if you intend to use `GLOBAL_ASYNC_QUERIES` in `ws` mode see https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries |
+| supersetWebsockets.image.pullPolicy | string | `"IfNotPresent"` | |
+| supersetWebsockets.image.repository | string | `"oneacrefund/superset-websocket"` | There is no official image (yet), this one is community-supported |
+| supersetWebsockets.image.tag | string | `"latest"` | |
+| supersetWebsockets.ingress.path | string | `"/ws"` | |
+| supersetWebsockets.ingress.pathType | string | `"Prefix"` | |
+| supersetWebsockets.livenessProbe.failureThreshold | int | `3` | |
+| supersetWebsockets.livenessProbe.httpGet.path | string | `"/health"` | |
+| supersetWebsockets.livenessProbe.httpGet.port | string | `"ws"` | |
+| supersetWebsockets.livenessProbe.initialDelaySeconds | int | `5` | |
+| supersetWebsockets.livenessProbe.periodSeconds | int | `5` | |
+| supersetWebsockets.livenessProbe.successThreshold | int | `1` | |
+| supersetWebsockets.livenessProbe.timeoutSeconds | int | `1` | |
+| supersetWebsockets.podAnnotations | object | `{}` | |
+| supersetWebsockets.podLabels | object | `{}` | |
+| supersetWebsockets.podSecurityContext | object | `{}` | |
+| supersetWebsockets.readinessProbe.failureThreshold | int | `3` | |
+| supersetWebsockets.readinessProbe.httpGet.path | string | `"/health"` | |
+| supersetWebsockets.readinessProbe.httpGet.port | string | `"ws"` | |
+| supersetWebsockets.readinessProbe.initialDelaySeconds | int | `5` | |
+| supersetWebsockets.readinessProbe.periodSeconds | int | `5` | |
+| supersetWebsockets.readinessProbe.successThreshold | int | `1` | |
+| supersetWebsockets.readinessProbe.timeoutSeconds | int | `1` | |
+| supersetWebsockets.replicaCount | int | `1` | |
+| supersetWebsockets.resources | object | `{}` | |
+| supersetWebsockets.service.annotations | object | `{}` | |
+| supersetWebsockets.service.loadBalancerIP | string | `nil` | |
+| supersetWebsockets.service.nodePort.http | int | `"nil"` | |
+| supersetWebsockets.service.port | int | `8080` | |
+| supersetWebsockets.service.type | string | `"ClusterIP"` | |
+| supersetWebsockets.startupProbe.failureThreshold | int | `60` | |
+| supersetWebsockets.startupProbe.httpGet.path | string | `"/health"` | |
+| supersetWebsockets.startupProbe.httpGet.port | string | `"ws"` | |
+| supersetWebsockets.startupProbe.initialDelaySeconds | int | `5` | |
+| supersetWebsockets.startupProbe.periodSeconds | int | `5` | |
+| supersetWebsockets.startupProbe.successThreshold | int | `1` | |
+| supersetWebsockets.startupProbe.timeoutSeconds | int | `1` | |
+| supersetWebsockets.strategy | object | `{}` | |
+| supersetWebsockets.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetWebsockets deployments |
+| supersetWorker.affinity | object | `{}` | Affinity to be added to supersetWorker deployment |
+| supersetWorker.command | list | a `celery worker` command | Worker startup command |
+| supersetWorker.containerSecurityContext | object | `{}` | |
+| supersetWorker.deploymentAnnotations | object | `{}` | Annotations to be added to supersetWorker deployment |
+| supersetWorker.deploymentLabels | object | `{}` | Labels to be added to supersetWorker deployment |
+| supersetWorker.extraContainers | list | `[]` | Launch additional containers into supersetWorker pod |
+| supersetWorker.forceReload | bool | `false` | If true, forces deployment to reload on each upgrade |
+| supersetWorker.initContainers | list | a container waiting for postgres and redis | Init container |
+| supersetWorker.livenessProbe.exec.command | list | a `celery inspect ping` command | Liveness probe command |
+| supersetWorker.livenessProbe.failureThreshold | int | `3` | |
+| supersetWorker.livenessProbe.initialDelaySeconds | int | `120` | |
+| supersetWorker.livenessProbe.periodSeconds | int | `60` | |
+| supersetWorker.livenessProbe.successThreshold | int | `1` | |
+| supersetWorker.livenessProbe.timeoutSeconds | int | `60` | |
+| supersetWorker.podAnnotations | object | `{}` | Annotations to be added to supersetWorker pods |
+| supersetWorker.podLabels | object | `{}` | Labels to be added to supersetWorker pods |
+| supersetWorker.podSecurityContext | object | `{}` | |
+| supersetWorker.readinessProbe | object | `{}` | No startup/readiness probes by default since we don't really care about its startup time (it doesn't serve traffic) |
+| supersetWorker.replicaCount | int | `1` | |
+| supersetWorker.resources | object | `{}` | Resource settings for the supersetWorker pods - these settings overwrite might existing values from the global resources object defined above. |
+| supersetWorker.startupProbe | object | `{}` | No startup/readiness probes by default since we don't really care about its startup time (it doesn't serve traffic) |
+| supersetWorker.strategy | object | `{}` | |
+| supersetWorker.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetWorker deployments |
+| tolerations | list | `[]` | |
+| topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to all deployments |
diff --git a/helm/superset/templates/deployment-beat.yaml b/helm/superset/templates/deployment-beat.yaml
index 43754efb06..eab9a6f3eb 100644
--- a/helm/superset/templates/deployment-beat.yaml
+++ b/helm/superset/templates/deployment-beat.yaml
@@ -42,6 +42,7 @@ spec:
metadata:
annotations:
checksum/superset_config.py: {{ include "superset-config" . | sha256sum }}
+ checksum/superset_bootstrap.sh: {{ tpl .Values.bootstrapScript . | sha256sum }}
checksum/connections: {{ .Values.supersetNode.connections | toYaml | sha256sum }}
checksum/extraConfigs: {{ .Values.extraConfigs | toYaml | sha256sum }}
checksum/extraSecrets: {{ .Values.extraSecrets | toYaml | sha256sum }}
diff --git a/helm/superset/templates/deployment-worker.yaml b/helm/superset/templates/deployment-worker.yaml
index 7f2bcf8df3..be710b723a 100644
--- a/helm/superset/templates/deployment-worker.yaml
+++ b/helm/superset/templates/deployment-worker.yaml
@@ -46,6 +46,7 @@ spec:
metadata:
annotations:
checksum/superset_config.py: {{ include "superset-config" . | sha256sum }}
+ checksum/superset_bootstrap.sh: {{ tpl .Values.bootstrapScript . | sha256sum }}
checksum/connections: {{ .Values.supersetNode.connections | toYaml | sha256sum }}
checksum/extraConfigs: {{ .Values.extraConfigs | toYaml | sha256sum }}
checksum/extraSecrets: {{ .Values.extraSecrets | toYaml | sha256sum }}
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit e07eed10a2f1af92aa531203fd87c6fb5b1c99a1
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Mon Nov 13 13:18:28 2023 -0500
fix: always denorm column value before querying values (#25919)
---
superset/connectors/base/models.py | 7 -----
superset/connectors/sqla/models.py | 29 --------------------
superset/datasource/api.py | 4 +++
superset/models/helpers.py | 56 ++++++++++++++++++--------------------
4 files changed, 31 insertions(+), 65 deletions(-)
diff --git a/superset/connectors/base/models.py b/superset/connectors/base/models.py
index 706c82635c..f560b4d86b 100644
--- a/superset/connectors/base/models.py
+++ b/superset/connectors/base/models.py
@@ -496,13 +496,6 @@ class BaseDatasource(
"""
raise NotImplementedError()
- def values_for_column(self, column_name: str, limit: int = 10000) -> list[Any]:
- """Given a column, returns an iterable of distinct values
-
- This is used to populate the dropdown showing a list of
- values in filters in the explore view"""
- raise NotImplementedError()
-
@staticmethod
def default_query(qry: Query) -> Query:
return qry
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index 79203256f1..5edc724b23 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -46,7 +46,6 @@ from sqlalchemy import (
inspect,
Integer,
or_,
- select,
String,
Table,
Text,
@@ -789,34 +788,6 @@ class SqlaTable(
)
) from ex
- def values_for_column(self, column_name: str, limit: int = 10000) -> list[Any]:
- """Runs query against sqla to retrieve some
- sample values for the given column.
- """
- cols = {col.column_name: col for col in self.columns}
- target_col = cols[column_name]
- tp = self.get_template_processor()
- tbl, cte = self.get_from_clause(tp)
-
- qry = (
- select([target_col.get_sqla_col(template_processor=tp)])
- .select_from(tbl)
- .distinct()
- )
- if limit:
- qry = qry.limit(limit)
-
- if self.fetch_values_predicate:
- qry = qry.where(self.get_fetch_values_predicate(template_processor=tp))
-
- with self.database.get_sqla_engine_with_context() as engine:
- sql = qry.compile(engine, compile_kwargs={"literal_binds": True})
- sql = self._apply_cte(sql, cte)
- sql = self.mutate_query_from_config(sql)
-
- df = pd.read_sql_query(sql=sql, con=engine)
- return df[column_name].to_list()
-
def mutate_query_from_config(self, sql: str) -> str:
"""Apply config's SQL_QUERY_MUTATOR
diff --git a/superset/datasource/api.py b/superset/datasource/api.py
index 6399d197e0..213298d30b 100644
--- a/superset/datasource/api.py
+++ b/superset/datasource/api.py
@@ -120,6 +120,10 @@ class DatasourceRestApi(BaseSupersetApi):
column_name=column_name, limit=row_limit
)
return self.response(200, result=payload)
+ except KeyError:
+ return self.response(
+ 400, message=f"Column name {column_name} does not exist"
+ )
except NotImplementedError:
return self.response(
400,
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 38f29eb223..6163c3022c 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -700,10 +700,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
"MIN": sa.func.MIN,
"MAX": sa.func.MAX,
}
-
- @property
- def fetch_value_predicate(self) -> str:
- return "fix this!"
+ fetch_values_predicate = None
@property
def type(self) -> str:
@@ -776,17 +773,20 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
def columns(self) -> list[Any]:
raise NotImplementedError()
- def get_fetch_values_predicate(
- self, template_processor: Optional[BaseTemplateProcessor] = None
- ) -> TextClause:
- raise NotImplementedError()
-
def get_extra_cache_keys(self, query_obj: dict[str, Any]) -> list[Hashable]:
raise NotImplementedError()
def get_template_processor(self, **kwargs: Any) -> BaseTemplateProcessor:
raise NotImplementedError()
+ def get_fetch_values_predicate(
+ self,
+ template_processor: Optional[ # pylint: disable=unused-argument
+ BaseTemplateProcessor
+ ] = None, # pylint: disable=unused-argument
+ ) -> TextClause:
+ return self.fetch_values_predicate
+
def get_sqla_row_level_filters(
self,
template_processor: BaseTemplateProcessor,
@@ -1334,36 +1334,34 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
return and_(*l)
def values_for_column(self, column_name: str, limit: int = 10000) -> list[Any]:
- """Runs query against sqla to retrieve some
- sample values for the given column.
- """
- cols = {}
- for col in self.columns:
- if isinstance(col, dict):
- cols[col.get("column_name")] = col
- else:
- cols[col.column_name] = col
-
- target_col = cols[column_name]
- tp = None # todo(hughhhh): add back self.get_template_processor()
+ # always denormalize column name before querying for values
+ db_dialect = self.database.get_dialect()
+ denomalized_col_name = self.database.db_engine_spec.denormalize_name(
+ db_dialect, column_name
+ )
+ cols = {col.column_name: col for col in self.columns}
+ target_col = cols[denomalized_col_name]
+ tp = self.get_template_processor()
tbl, cte = self.get_from_clause(tp)
- if isinstance(target_col, dict):
- sql_column = sa.column(target_col.get("name"))
- else:
- sql_column = target_col
-
- qry = sa.select([sql_column]).select_from(tbl).distinct()
+ qry = (
+ sa.select([target_col.get_sqla_col(template_processor=tp)])
+ .select_from(tbl)
+ .distinct()
+ )
if limit:
qry = qry.limit(limit)
+ if self.fetch_values_predicate:
+ qry = qry.where(self.get_fetch_values_predicate(template_processor=tp))
+
with self.database.get_sqla_engine_with_context() as engine: # type: ignore
sql = qry.compile(engine, compile_kwargs={"literal_binds": True})
sql = self._apply_cte(sql, cte)
sql = self.mutate_query_from_config(sql)
df = pd.read_sql_query(sql=sql, con=engine)
- return df[column_name].to_list()
+ return df[denomalized_col_name].to_list()
def get_timestamp_expression(
self,
@@ -1935,7 +1933,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
)
having_clause_and += [self.text(having)]
- if apply_fetch_values_predicate and self.fetch_values_predicate: # type: ignore
+ if apply_fetch_values_predicate and self.fetch_values_predicate:
qry = qry.where(
self.get_fetch_values_predicate(template_processor=template_processor)
)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit eea6a8ed4fb9a5ad9103ce4a6df7a6ed313eabe1
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Wed Nov 8 12:22:00 2023 -0800
fix(table): Double percenting ad-hoc percentage metrics (#25857)
(cherry picked from commit 784a478268fd89e6e58077e99bb2010987d6b07c)
---
superset-frontend/plugins/plugin-chart-table/src/transformProps.ts | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts
index 3c9c00d3c1..0c8970737d 100644
--- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts
+++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts
@@ -118,9 +118,10 @@ const processColumns = memoizeOne(function processColumns(
// because users can also add things like `MAX(str_col)` as a metric.
const isMetric = metricsSet.has(key) && isNumeric(key, records);
const isPercentMetric = percentMetricsSet.has(key);
- const label = isPercentMetric
- ? `%${verboseMap?.[key.replace('%', '')] || key}`
- : verboseMap?.[key] || key;
+ const label =
+ isPercentMetric && verboseMap?.hasOwnProperty(key.replace('%', ''))
+ ? `%${verboseMap[key.replace('%', '')]}`
+ : verboseMap?.[key] || key;
const isTime = dataType === GenericDataType.TEMPORAL;
const isNumber = dataType === GenericDataType.NUMERIC;
const savedFormat = columnFormats?.[key];
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 8d873e6da6c00d9ed853f86f4f9dfd06c5a19aac
Author: yousoph <so...@gmail.com>
AuthorDate: Thu Nov 16 09:48:54 2023 -0800
fix(rls): Update text from tables to datasets in RLS modal (#25997)
(cherry picked from commit 210f1f8f95531365da2c5a5897e801c4cb7edacd)
---
superset-frontend/src/features/rls/RowLevelSecurityModal.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx
index dac4858e4a..20197ecf58 100644
--- a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx
+++ b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx
@@ -385,10 +385,10 @@ function RowLevelSecurityModal(props: RowLevelSecurityModalProps) {
<StyledInputContainer>
<div className="control-label">
- {t('Tables')} <span className="required">*</span>
+ {t('Datasets')} <span className="required">*</span>
<InfoTooltip
tooltip={t(
- 'These are the tables this filter will be applied to.',
+ 'These are the datasets this filter will be applied to.',
)}
/>
</div>
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit a7fbdd607a7f1443146f8fe57404fe84f42c64f3
Author: Giacomo Barone <46...@users.noreply.github.com>
AuthorDate: Sat Nov 11 05:13:50 2023 +0100
fix: update flask-caching to avoid breaking redis cache, solves #25339 (#25947)
Co-authored-by: Ville Brofeldt <33...@users.noreply.github.com>
---
requirements/base.txt | 7 ++++---
setup.py | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/requirements/base.txt b/requirements/base.txt
index 95e6912272..18cf4ccf63 100644
--- a/requirements/base.txt
+++ b/requirements/base.txt
@@ -27,8 +27,9 @@ billiard==3.6.4.0
# via celery
brotli==1.0.9
# via flask-compress
-cachelib==0.6.0
- # via flask-caching
+cachelib==0.9.0
+ # via
+ # flask-caching
celery==5.2.2
# via apache-superset
cffi==1.15.1
@@ -92,7 +93,7 @@ flask-appbuilder==4.3.9
# via apache-superset
flask-babel==1.0.0
# via flask-appbuilder
-flask-caching==1.11.1
+flask-caching==2.1.0
# via apache-superset
flask-compress==1.13
# via apache-superset
diff --git a/setup.py b/setup.py
index 87a721d21b..20796cf133 100644
--- a/setup.py
+++ b/setup.py
@@ -81,7 +81,7 @@ setup(
"deprecation>=2.1.0, <2.2.0",
"flask>=2.2.5, <3.0.0",
"flask-appbuilder>=4.3.9, <5.0.0",
- "flask-caching>=1.11.1, <2.0",
+ "flask-caching>=2.1.0, <3",
"flask-compress>=1.13, <2.0",
"flask-talisman>=1.0.0, <2.0",
"flask-login>=0.6.0, < 1.0",
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 1c287dfc74e98ebe2d5f655dad58c7f91755440e
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Mon Nov 13 18:46:09 2023 -0500
fix: naming denomalized to denormalized in helpers.py (#25973)
(cherry picked from commit 5def416f632ae7d7f90ae615a8600e8110797aec)
---
superset/models/helpers.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 6163c3022c..037e4d8c6e 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -1336,11 +1336,11 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
def values_for_column(self, column_name: str, limit: int = 10000) -> list[Any]:
# always denormalize column name before querying for values
db_dialect = self.database.get_dialect()
- denomalized_col_name = self.database.db_engine_spec.denormalize_name(
+ denormalized_col_name = self.database.db_engine_spec.denormalize_name(
db_dialect, column_name
)
cols = {col.column_name: col for col in self.columns}
- target_col = cols[denomalized_col_name]
+ target_col = cols[denormalized_col_name]
tp = self.get_template_processor()
tbl, cte = self.get_from_clause(tp)
@@ -1361,7 +1361,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
sql = self.mutate_query_from_config(sql)
df = pd.read_sql_query(sql=sql, con=engine)
- return df[denomalized_col_name].to_list()
+ return df[denormalized_col_name].to_list()
def get_timestamp_expression(
self,
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit fb1919a483fff7df8df9365eee8ebcf35dc31a0d
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Mon Nov 13 11:25:14 2023 -0800
chore(colors): Updating Airbnb brand colors (#23619)
(cherry picked from commit 6d8424c104f196bde54d1ff3d02269e4c71059b4)
---
.../cypress/e2e/dashboard/editmode.test.ts | 6 ++--
.../e2e/explore/visualizations/dist_bar.test.js | 2 +-
.../e2e/explore/visualizations/line.test.ts | 2 +-
.../src/color/colorSchemes/categorical/airbnb.ts | 34 +++++++++-------------
.../legacy-plugin-chart-map-box/Stories.tsx | 2 +-
5 files changed, 19 insertions(+), 27 deletions(-)
diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts
index b35105a7b5..e4d645bd2e 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts
@@ -515,7 +515,7 @@ describe('Dashboard edit', () => {
// label Anthony
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
.eq(2)
- .should('have.css', 'fill', 'rgb(0, 122, 135)');
+ .should('have.css', 'fill', 'rgb(244, 176, 42)');
// open main tab and nested tab
openTab(0, 0);
@@ -526,7 +526,7 @@ describe('Dashboard edit', () => {
'[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol',
)
.first()
- .should('have.css', 'fill', 'rgb(0, 122, 135)');
+ .should('have.css', 'fill', 'rgb(244, 176, 42)');
});
it('should apply the color scheme across main tabs', () => {
@@ -557,7 +557,7 @@ describe('Dashboard edit', () => {
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
.first()
- .should('have.css', 'fill', 'rgb(204, 0, 134)');
+ .should('have.css', 'fill', 'rgb(156, 52, 152)');
// change scheme now that charts are rendered across the main tabs
editDashboard();
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js
index 770e1e1c04..591ba31776 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js
@@ -89,6 +89,6 @@ describe('Visualization > Distribution bar chart', () => {
).should('exist');
cy.get('.dist_bar .nv-legend .nv-legend-symbol')
.first()
- .should('have.css', 'fill', 'rgb(255, 90, 95)');
+ .should('have.css', 'fill', 'rgb(41, 105, 107)');
});
});
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts
index 5cc398c7f3..8499db5946 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts
@@ -85,7 +85,7 @@ describe('Visualization > Line', () => {
).should('exist');
cy.get('.line .nv-legend .nv-legend-symbol')
.first()
- .should('have.css', 'fill', 'rgb(255, 90, 95)');
+ .should('have.css', 'fill', 'rgb(41, 105, 107)');
});
it('should work with adhoc metric', () => {
diff --git a/superset-frontend/packages/superset-ui-core/src/color/colorSchemes/categorical/airbnb.ts b/superset-frontend/packages/superset-ui-core/src/color/colorSchemes/categorical/airbnb.ts
index 462065b84f..a126f502a9 100644
--- a/superset-frontend/packages/superset-ui-core/src/color/colorSchemes/categorical/airbnb.ts
+++ b/superset-frontend/packages/superset-ui-core/src/color/colorSchemes/categorical/airbnb.ts
@@ -24,27 +24,19 @@ const schemes = [
id: 'bnbColors',
label: 'Airbnb Colors',
colors: [
- '#ff5a5f', // rausch
- '#7b0051', // hackb
- '#007A87', // kazan
- '#00d1c1', // babu
- '#8ce071', // lima
- '#ffb400', // beach
- '#b4a76c', // barol
- '#ff8083',
- '#cc0086',
- '#00a1b3',
- '#00ffeb',
- '#bbedab',
- '#ffd266',
- '#cbc29a',
- '#ff3339',
- '#ff1ab1',
- '#005c66',
- '#00b3a5',
- '#55d12e',
- '#b37e00',
- '#988b4e',
+ '#29696B',
+ '#5BCACE',
+ '#F4B02A',
+ '#F1826A',
+ '#792EB2',
+ '#C96EC6',
+ '#921E50',
+ '#B27700',
+ '#9C3498',
+ '#9C3498',
+ '#E4679D',
+ '#C32F0E',
+ '#9D63CA',
],
},
].map(s => new CategoricalScheme(s));
diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/Stories.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/Stories.tsx
index 6cdca623a1..dd95ffada5 100644
--- a/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/Stories.tsx
+++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-map-box/Stories.tsx
@@ -42,7 +42,7 @@ export const Basic = () => {
allColumnsY: 'LAT',
clusteringRadius: '60',
globalOpacity: 1,
- mapboxColor: 'rgb(0, 122, 135)',
+ mapboxColor: 'rgb(244, 176, 42)',
mapboxLabel: [],
mapboxStyle: 'mapbox://styles/mapbox/light-v9',
pandasAggfunc: 'sum',
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 6201a297b4ad24eebb15e52cef8970a97573be3c
Author: Jack Fragassi <jf...@gmail.com>
AuthorDate: Thu Nov 16 12:06:05 2023 -0800
fix: Make Select component fire onChange listener when a selection is pasted in (#25993)
(cherry picked from commit 5fccf67cdc4a84edb067a3cde48efacc76dbe33a)
---
.../src/components/Select/AsyncSelect.test.tsx | 14 ++++++++++++++
superset-frontend/src/components/Select/AsyncSelect.tsx | 1 +
superset-frontend/src/components/Select/Select.test.tsx | 14 ++++++++++++++
superset-frontend/src/components/Select/Select.tsx | 1 +
superset/models/helpers.py | 2 +-
5 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/superset-frontend/src/components/Select/AsyncSelect.test.tsx b/superset-frontend/src/components/Select/AsyncSelect.test.tsx
index c1442a6b70..0bb24b474a 100644
--- a/superset-frontend/src/components/Select/AsyncSelect.test.tsx
+++ b/superset-frontend/src/components/Select/AsyncSelect.test.tsx
@@ -868,6 +868,20 @@ test('fires onChange when clearing the selection in multiple mode', async () =>
expect(onChange).toHaveBeenCalledTimes(1);
});
+test('fires onChange when pasting a selection', async () => {
+ const onChange = jest.fn();
+ render(<AsyncSelect {...defaultProps} onChange={onChange} />);
+ await open();
+ const input = getElementByClassName('.ant-select-selection-search-input');
+ const paste = createEvent.paste(input, {
+ clipboardData: {
+ getData: () => OPTIONS[0].label,
+ },
+ });
+ fireEvent(input, paste);
+ expect(onChange).toHaveBeenCalledTimes(1);
+});
+
test('does not duplicate options when using numeric values', async () => {
render(
<AsyncSelect
diff --git a/superset-frontend/src/components/Select/AsyncSelect.tsx b/superset-frontend/src/components/Select/AsyncSelect.tsx
index 20de7bb591..d102af7483 100644
--- a/superset-frontend/src/components/Select/AsyncSelect.tsx
+++ b/superset-frontend/src/components/Select/AsyncSelect.tsx
@@ -554,6 +554,7 @@ const AsyncSelect = forwardRef(
...values,
]);
}
+ fireOnChange();
};
const shouldRenderChildrenOptions = useMemo(
diff --git a/superset-frontend/src/components/Select/Select.test.tsx b/superset-frontend/src/components/Select/Select.test.tsx
index a6b8307582..2910353295 100644
--- a/superset-frontend/src/components/Select/Select.test.tsx
+++ b/superset-frontend/src/components/Select/Select.test.tsx
@@ -985,6 +985,20 @@ test('fires onChange when clearing the selection in multiple mode', async () =>
expect(onChange).toHaveBeenCalledTimes(1);
});
+test('fires onChange when pasting a selection', async () => {
+ const onChange = jest.fn();
+ render(<Select {...defaultProps} onChange={onChange} />);
+ await open();
+ const input = getElementByClassName('.ant-select-selection-search-input');
+ const paste = createEvent.paste(input, {
+ clipboardData: {
+ getData: () => OPTIONS[0].label,
+ },
+ });
+ fireEvent(input, paste);
+ expect(onChange).toHaveBeenCalledTimes(1);
+});
+
test('does not duplicate options when using numeric values', async () => {
render(
<Select
diff --git a/superset-frontend/src/components/Select/Select.tsx b/superset-frontend/src/components/Select/Select.tsx
index 6ccc1e1715..1e3bc73758 100644
--- a/superset-frontend/src/components/Select/Select.tsx
+++ b/superset-frontend/src/components/Select/Select.tsx
@@ -571,6 +571,7 @@ const Select = forwardRef(
]);
}
}
+ fireOnChange();
};
return (
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 037e4d8c6e..3dff86ecee 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -783,7 +783,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
self,
template_processor: Optional[ # pylint: disable=unused-argument
BaseTemplateProcessor
- ] = None, # pylint: disable=unused-argument
+ ] = None,
) -> TextClause:
return self.fetch_values_predicate
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 6da18f84515d6608f8a20f716574e6ec84acf1ac
Author: JUST.in DO IT <ju...@airbnb.com>
AuthorDate: Thu Nov 9 09:26:21 2023 -0800
fix(sqllab): invalid sanitization on comparison symbol (#25903)
(cherry picked from commit 581d3c710867120f85ddfc097713e5f2880722c1)
---
superset-frontend/packages/superset-ui-core/src/utils/html.test.tsx | 3 +++
superset-frontend/packages/superset-ui-core/src/utils/html.tsx | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/superset-frontend/packages/superset-ui-core/src/utils/html.test.tsx b/superset-frontend/packages/superset-ui-core/src/utils/html.test.tsx
index 8fd06cb6f8..9b950e4246 100644
--- a/superset-frontend/packages/superset-ui-core/src/utils/html.test.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/utils/html.test.tsx
@@ -44,6 +44,9 @@ describe('isProbablyHTML', () => {
const plainText = 'Just a plain text';
const isHTML = isProbablyHTML(plainText);
expect(isHTML).toBe(false);
+
+ const trickyText = 'a <= 10 and b > 10';
+ expect(isProbablyHTML(trickyText)).toBe(false);
});
});
diff --git a/superset-frontend/packages/superset-ui-core/src/utils/html.tsx b/superset-frontend/packages/superset-ui-core/src/utils/html.tsx
index 3215eb9b9d..fffd43bda8 100644
--- a/superset-frontend/packages/superset-ui-core/src/utils/html.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/utils/html.tsx
@@ -28,7 +28,9 @@ export function sanitizeHtml(htmlString: string) {
}
export function isProbablyHTML(text: string) {
- return /<[^>]+>/.test(text);
+ return Array.from(
+ new DOMParser().parseFromString(text, 'text/html').body.childNodes,
+ ).some(({ nodeType }) => nodeType === 1);
}
export function sanitizeHtmlIfNeeded(htmlString: string) {