Skip to content

Commit

Permalink
fix(superset): Install Postgres pattern in main package (#43615)
Browse files Browse the repository at this point in the history
Using the configuration used by the current upstream image with
Superset's current Helm chart is broken without the Postgres pattern,
which boils down to one module - psycopg2

Instead of breaking Helm deployments due to upstream changes, just
provide psycopg2 in the main package

Signed-off-by: RJ Sampson <[email protected]>
  • Loading branch information
EyeCantCU authored Feb 25, 2025
1 parent a9556e7 commit 789dfe3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 110 deletions.
69 changes: 9 additions & 60 deletions superset.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: superset
version: 4.1.1
epoch: 4
epoch: 5
description: Data Visualization and Data Exploration Platform
copyright:
- license: Apache-2.0
Expand Down Expand Up @@ -79,6 +79,9 @@ pipeline:
# Build Apache Superset
pip install .
# Install Postgres pattern
pip install .[postgres]
# translations for the web application, Is a non-blocking call, so errors may be ignored
flask fab babel-compile --target superset/translations
Expand Down Expand Up @@ -106,63 +109,6 @@ pipeline:
cp superset-frontend/package.json ${{targets.destdir}}/app/superset-frontend/
subpackages:
- name: ${{package.name}}-ci
description: Superset with Postgres support
options:
no-depends: true
no-provides: true
dependencies:
runtime:
- openssl
- py${{vars.python-version}}-pip
- python-${{vars.python-version}}
pipeline:
- runs: |
# Copy Superset to subpackage
mkdir -p ${{targets.contextdir}}
cp -r ${{targets.destdir}}/* ${{targets.contextdir}}/
# Set path to virtual environment
sed -i "s|/usr/share/superset|${{targets.contextdir}}/usr/share/superset|g" ${{targets.contextdir}}/usr/share/superset/venv/bin/*
sed -i "s|/usr/share/superset|${{targets.contextdir}}/usr/share/superset|g" ${{targets.contextdir}}/usr/share/superset/venv/pyvenv.cfg
# Re-initialize and activate virtual env
python -m venv ${{targets.contextdir}}/usr/share/superset/venv --system-site-packages
source ${{targets.contextdir}}/usr/share/superset/venv/bin/activate
# Install Postgres pattern
pip install .[postgres]
# Remove pip
pip uninstall --yes pip
# Fix virtual environment's installed path
sed -i "s|${{targets.contextdir}}/usr/share/superset|/usr/share/superset|g" ${{targets.contextdir}}/usr/share/superset/venv/bin/*
sed -i "s|${{targets.contextdir}}/usr/share/superset|/usr/share/superset|g" ${{targets.contextdir}}/usr/share/superset/venv/pyvenv.cfg
test:
environment:
contents:
packages:
- ${{package.name}}-entrypoint
pipeline:
- uses: test/daemon-check-output
with:
start: |
env \
PATH=/usr/share/superset/venv/bin:$PATH \
SUPERSET_ENV=production \
FLASK_APP="superset.app:create_app()" \
SUPERSET_PORT=8088 \
SUPERSET_SECRET_KEY="$(openssl rand -base64 42)" \
/app/docker/entrypoints/docker-ci.sh
timeout: 60
expected_output: |
Applying DB migrations
Setting up admin user
Setting up roles and perms
Starting gunicorn
Listening at: http://0.0.0.0:8088
- name: ${{package.name}}-entrypoint
description: "Docker configuration for Superset"
dependencies:
Expand Down Expand Up @@ -219,8 +165,11 @@ test:
FLASK_APP="superset.app:create_app()" \
SUPERSET_PORT=8088 \
SUPERSET_SECRET_KEY="$(openssl rand -base64 42)" \
/app/docker/entrypoints/run-server.sh
timeout: 30
/app/docker/entrypoints/docker-ci.sh
timeout: 60
expected_output: |
Applying DB migrations
Setting up admin user
Setting up roles and perms
Starting gunicorn
Listening at: http://0.0.0.0:8088
51 changes: 1 addition & 50 deletions withdrawn-packages.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
go-fips-1.21-1.21.1-r2.apk
go-fips-1.21-1.21.2-r0.apk
go-fips-1.21-1.21.3-r0.apk
go-fips-1.21-1.21.4-r0.apk
go-fips-1.21-1.21.5-r0.apk
go-fips-1.21-1.21.7-r0.apk
go-fips-1.21-1.21.8-r0.apk
go-fips-1.21-1.21.8-r1.apk
go-fips-1.21-1.21.9-r0.apk
go-fips-1.21-1.21.9-r1.apk
go-fips-1.21-1.21.10-r0.apk
go-fips-1.21-1.21.11-r0.apk
go-fips-1.21-1.21.12-r0.apk
go-fips-1.21-1.21.13-r0.apk
go-fips-1.21-doc-1.21.1-r0.apk
go-fips-1.21-doc-1.21.1-r1.apk
go-fips-1.21-doc-1.21.1-r2.apk
go-fips-1.21-doc-1.21.2-r0.apk
go-fips-1.21-doc-1.21.3-r0.apk
go-fips-1.21-doc-1.21.4-r0.apk
go-fips-1.21-doc-1.21.5-r0.apk
go-fips-1.21-doc-1.21.7-r0.apk
go-fips-1.21-doc-1.21.8-r0.apk
go-fips-1.21-doc-1.21.8-r1.apk
go-fips-1.21-doc-1.21.9-r0.apk
go-fips-1.21-doc-1.21.9-r1.apk
go-fips-1.21-doc-1.21.10-r0.apk
go-fips-1.21-doc-1.21.11-r0.apk
go-fips-1.21-doc-1.21.12-r0.apk
go-fips-1.21-doc-1.21.13-r0.apk
debezium-connect-entrypoint-3.0-3.0.7-r1.apk



jmx-exporter-bitnami-1.1.0-r0.apk
wildfly-35.0.1-r10.apk
wildfly-openjdk-17-35.0.1-r10.apk
wildfly-openjdk-17-compat-35.0.1-r10.apk
wildfly-openjdk-21-35.0.1-r10.apk
wildfly-openjdk-21-compat-35.0.1-r10.apk
wildfly-35.0.1-r11.apk
wildfly-openjdk-17-35.0.1-r11.apk
wildfly-openjdk-17-compat-35.0.1-r11.apk
wildfly-openjdk-21-35.0.1-r11.apk
wildfly-openjdk-21-compat-35.0.1-r11.apk
wildfly-35.0.1-r9.apk
wildfly-openjdk-17-35.0.1-r9.apk
wildfly-openjdk-17-compat-35.0.1-r9.apk
wildfly-openjdk-21-35.0.1-r9.apk
wildfly-openjdk-21-compat-35.0.1-r9.apk
superset-ci-4.1.1-r4

0 comments on commit 789dfe3

Please sign in to comment.