Skip to content

Commit a023461

Browse files
swebNickLarsenNZsbernauer
authored
chore(superset): add 6.1.0 as supported version (#1514)
* chore(superset): add 6.1.0 as supported version * chore: lints * chore: cleanups * Update superset/boil-config.toml Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com> * chore: bump uv version * feat: add script to gather superset versions * chore: bump Python to 3.12 (3.11 for 4.1.4) * Rename upstream-versions.sh to gather-upstream-versions.sh --------- Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com> Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.tech>
1 parent 13fabe6 commit a023461

9 files changed

Lines changed: 1396 additions & 520 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
1515
- opa: Add `1.16.2` ([#1509]).
1616
- kafka: Add `3.9.2` and `4.2.1` ([#1483]).
1717
- trino: Add `481` ([#1518]).
18+
- superset: Add `6.1.0` ([#1514])
1819

1920
### Changed
2021

@@ -50,6 +51,7 @@ All notable changes to this project will be documented in this file.
5051
[#1509]: https://github.com/stackabletech/docker-images/pull/1509
5152
[#1510]: https://github.com/stackabletech/docker-images/pull/1510
5253
[#1512]: https://github.com/stackabletech/docker-images/pull/1512
54+
[#1514]: https://github.com/stackabletech/docker-images/pull/1514
5355
[#1518]: https://github.com/stackabletech/docker-images/pull/1518
5456
[#1520]: https://github.com/stackabletech/docker-images/pull/1520
5557

superset/boil-config.toml

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ vector = "0.55.0"
88

99
[versions."4.1.4".build-arguments]
1010
cyclonedx-bom-version = "6.0.0"
11-
# Find the flask-appbuilder version in the applicable constraints.txt file, then find the authlib version.
12-
# https://github.com/dpgaspar/Flask-AppBuilder/blob/release/4.5.0/requirements/extra.txt#L7
11+
# flask-appbuilder==4.5.0 is pinned in https://github.com/apache/superset/blob/4.1.4/requirements/base.txt (search for `flask-appbuilder==`),
12+
# which in turn pins authlib in https://github.com/dpgaspar/Flask-AppBuilder/blob/release/4.5.0/requirements/extra.txt (search for `authlib==`)
1313
authlib-version = "1.2.1"
14-
python-version = "3.9"
15-
uv-version = "0.7.3"
16-
nodejs-version = "20.20.2"
14+
# The default upstream image is built on Python 3.11 (`ARG PY_VER` in https://github.com/apache/superset/blob/4.1.4/Dockerfile)
15+
# and upstream CI tests 3.10 and 3.11 (https://github.com/apache/superset/blob/4.1.4/.github/actions/setup-backend/action.yml)
16+
python-version = "3.11"
17+
# Independent of Superset, use the latest release: https://github.com/astral-sh/uv/releases
18+
uv-version = "0.11.18"
19+
# https://github.com/apache/superset/blob/4.1.4/superset-frontend/.nvmrc
20+
nodejs-version = "18.20.1"
21+
# Independent of Superset, use the latest release: https://github.com/nvm-sh/nvm/releases
1722
nvm-version = "v0.40.4"
1823

1924
[versions."6.0.0".local-images]
@@ -23,10 +28,34 @@ vector = "0.55.0"
2328

2429
[versions."6.0.0".build-arguments]
2530
cyclonedx-bom-version = "6.0.0"
26-
# Find the flask-appbuilder version in the applicable constraints.txt file, then find the authlib version.
27-
# https://github.com/dpgaspar/Flask-AppBuilder/blob/release/5.0.0/requirements/extra.txt#L7
31+
# flask-appbuilder==5.0.0 is pinned in https://github.com/apache/superset/blob/6.0.0/requirements/base.txt (search for `flask-appbuilder==`),
32+
# which in turn pins authlib in https://github.com/dpgaspar/Flask-AppBuilder/blob/release/5.0.0/requirements/extra.txt (search for `authlib==`)
2833
authlib-version = "1.2.1"
29-
python-version = "3.11"
30-
uv-version = "0.7.3"
31-
nodejs-version = "20.20.2"
34+
# Upstream CI tests 3.10, 3.11 and 3.12, choosing the newest Python version
35+
python-version = "3.12"
36+
# Independent of Superset, use the latest release: https://github.com/astral-sh/uv/releases
37+
uv-version = "0.11.18"
38+
# https://github.com/apache/superset/blob/6.0.0/superset-frontend/.nvmrc
39+
nodejs-version = "20.18.3"
40+
# Independent of Superset, use the latest release: https://github.com/nvm-sh/nvm/releases
41+
nvm-version = "v0.40.4"
42+
43+
[versions."6.1.0".local-images]
44+
"shared/statsd-exporter" = "0.28.0"
45+
stackable-devel = "1.0.0"
46+
vector = "0.55.0"
47+
48+
[versions."6.1.0".build-arguments]
49+
cyclonedx-bom-version = "6.0.0"
50+
# flask-appbuilder==5.0.2 is pinned in https://github.com/apache/superset/blob/6.1.0/requirements/base.txt (search for `flask-appbuilder==`),
51+
# which in turn pins authlib in https://github.com/dpgaspar/Flask-AppBuilder/blob/release/5.0.2/requirements/extra.txt (search for `authlib==`)
52+
authlib-version = "1.2.1"
53+
# Upstream CI tests 3.10, 3.11 and 3.12 (https://github.com/apache/superset/blob/6.1.0/.github/actions/setup-backend/action.yml)
54+
# and a py312 image variant is published. We use 3.12
55+
python-version = "3.12"
56+
# Independent of Superset, use the latest release: https://github.com/astral-sh/uv/releases
57+
uv-version = "0.11.18"
58+
# https://github.com/apache/superset/blob/6.1.0/superset-frontend/.nvmrc
59+
nodejs-version = "22.22.0"
60+
# Independent of Superset, use the latest release: https://github.com/nvm-sh/nvm/releases
3261
nvm-version = "v0.40.4"
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/usr/bin/env bash
2+
# Determine the upstream-tested tool/dependency versions for a given Apache Superset
3+
# version, to fill in the `[versions."X.Y.Z".build-arguments]` section of
4+
# superset/boil-config.toml.
5+
#
6+
# Usage: ./upstream-versions.sh <superset-version>
7+
# Example: ./upstream-versions.sh 6.1.0
8+
#
9+
# Sources used:
10+
# nodejs-version -> superset-frontend/.nvmrc at the Superset tag
11+
# flask-appbuilder -> requirements/base.txt at the Superset tag (informational; must
12+
# match the pin in superset/stackable/constraints/<version>/)
13+
# authlib-version -> requirements/extra.txt at the matching Flask-AppBuilder release
14+
# python-version -> `ARG PY_VER` in the upstream Dockerfile (their default image),
15+
# plus the CI-tested versions from .github/actions/setup-backend.
16+
# Picking among the CI-tested versions is a human decision.
17+
# uv/nvm-version -> independent of Superset, latest GitHub release
18+
19+
set -euo pipefail
20+
21+
VERSION=${1:?Usage: $0 <superset-version> (e.g. 6.1.0)}
22+
RAW="https://raw.githubusercontent.com"
23+
24+
fetch() {
25+
curl --fail --silent --show-error --location "$1"
26+
}
27+
28+
latest_release() {
29+
fetch "https://api.github.com/repos/$1/releases/latest" \
30+
| sed -nE 's/.*"tag_name": *"([^"]+)".*/\1/p' | head -1
31+
}
32+
33+
# Node.js: pinned by upstream in superset-frontend/.nvmrc (strip the leading `v`)
34+
nodejs=$(fetch "$RAW/apache/superset/$VERSION/superset-frontend/.nvmrc" | tr -d 'v[:space:]')
35+
36+
# Flask-AppBuilder: pinned in requirements/base.txt
37+
fab=$(fetch "$RAW/apache/superset/$VERSION/requirements/base.txt" \
38+
| sed -nE 's/^flask-appbuilder==([0-9.]+).*/\1/p' | head -1)
39+
40+
# Authlib: pinned by Flask-AppBuilder in requirements/extra.txt
41+
authlib=$(fetch "$RAW/dpgaspar/Flask-AppBuilder/release/$fab/requirements/extra.txt" \
42+
| sed -nE 's/^authlib==([0-9.]+).*/\1/p' | head -1)
43+
44+
# Python: the upstream image default (ARG PY_VER in the Dockerfile) ...
45+
py_default=$(fetch "$RAW/apache/superset/$VERSION/Dockerfile" \
46+
| sed -nE 's/^ARG PY_VER=([0-9]+\.[0-9]+).*/\1/p' | head -1)
47+
# ... and all CI-tested versions (the previous/current/next aliases)
48+
py_tested=$(fetch "$RAW/apache/superset/$VERSION/.github/actions/setup-backend/action.yml" \
49+
| sed -nE 's/.*PYTHON_VERSION=([0-9]+\.[0-9]+).*/\1/p' | sort -uV | xargs | sed 's/ /, /g')
50+
51+
# uv and nvm are independent of Superset, use the latest release
52+
uv=$(latest_release astral-sh/uv)
53+
nvm=$(latest_release nvm-sh/nvm)
54+
55+
cat <<EOF
56+
Superset $VERSION
57+
flask-appbuilder: $fab (informational, must match stackable/constraints/$VERSION/constraints.txt)
58+
authlib-version: $authlib
59+
python-version: $py_default (upstream image default; CI-tested: $py_tested)
60+
nodejs-version: $nodejs
61+
uv-version: $uv (latest release)
62+
nvm-version: $nvm (latest release)
63+
EOF
64+
65+
# Sanity check: the vendored constraints must pin the same Flask-AppBuilder version,
66+
# otherwise the authlib version derived above is based on the wrong FAB release.
67+
constraints="$(dirname "$0")/stackable/constraints/$VERSION/constraints.txt"
68+
if [ -f "$constraints" ]; then
69+
local_fab=$(sed -nE 's/^flask-appbuilder==([0-9.]+).*/\1/p' "$constraints" | head -1)
70+
if [ "$local_fab" != "$fab" ]; then
71+
echo >&2
72+
echo "WARNING: $constraints pins flask-appbuilder==$local_fab but upstream pins $fab" >&2
73+
exit 1
74+
fi
75+
else
76+
echo >&2
77+
echo "NOTE: no constraints file at $constraints yet - create it before building" >&2
78+
fi
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# It is not yet known how and when to change this
2+
# I will try without it overridden for now
3+
# Cython==3.0.12

0 commit comments

Comments
 (0)