Skip to content

Commit 2dab4c1

Browse files
NickLarsenNZrazvanTechassi
authored
feat: Replace ubi9 with ubi10 (#1353)
* feat(ubi-rust-builder): replace ubi9 with ubi10 * feat: Use ubi10 in base images Note: This required an adjustment to the opa daemonset patch, otherwise compilation fails due to gcc-15 requirements. Along the road to fixing this, we found some relevant links which might be useful in future: - [Github Repo](https://github.com/daemontools/daemontools) (shows daemontools 0.76 is 12 years old) - [daemontools Homepage](https://cr.yp.to/daemontools.html) - [Debian bug report](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066623) - [Debian patches)(https://salsa.debian.org/debian/daemontools/-/tree/debian/latest/debian/patches?ref_type=heads) - [Reverted patch and GCC-15 fix](https://salsa.debian.org/debian/daemontools/-/commit/3e20831dfabe9dac4c5b6de3ae3945491280c80b#8756c63497c8dc39f7773438edf53b220c773f67) * feat(airflow/wip): use a newer uv version, and install the correct python version using it WIP: Still need to fix the build layers, but this appears to work fine (tested the oldest and newest versions via the getting_started guide) * chore: fix typo in upload script * chore(wip): Upload script for nvm WIP: We might not need this, but I made it and it works. * chore: Move lint config into the right place * chore(airflow): replace python/pip package installations with uv for consistency * chore(airflow): Replace source with . * chore(airflow): Remove unneeded comments * uvx migrate-to-uv * chore(superset/opa-authorizer): Add description and format the file * chore(superset): Upgrade uv version * chore(superset): Use uv instead of pip * fix(superset): Add patch to pin the sax package to 1.2.4 * chore(mirror): Allow uv image to be mirrored * chore: Use mirrored uv image * chore(airflow): Add hint about updating git-sync * chore(airflow):Remove unused args * chore(superset):Remove unused args * chore: Update changelog * chore: Remove unused upload script Note: this came from 01d1d59 * Apply suggestions from code review --------- Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Co-authored-by: Techassi <git@techassi.dev>
1 parent 5b12040 commit 2dab4c1

22 files changed

Lines changed: 2921 additions & 4338 deletions

File tree

.github/ISSUE_TEMPLATE/update-base-ubi-rust-builders.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ Add/Change/Remove anything that isn't applicable anymore
5151
> This list should be completed by the assignee(s), once respective PRs have been merged. Once all items have been
5252
> checked, the issue can be moved into _Development: Done_.
5353
54-
- [ ] Done for [ubi9-rust-builder/Dockerfile](https://github.com/stackabletech/docker-images/blob/main/ubi9-rust-builder/Dockerfile)
54+
- [ ] Done for [ubi10-rust-builder/Dockerfile](https://github.com/stackabletech/docker-images/blob/main/ubi10-rust-builder/Dockerfile)
5555
- [ ] Can build the image locally
5656
- [ ] Can build an operator image
5757

5858
<details>
5959
<summary>Testing instructions</summary>
6060

6161
```shell
62-
docker build -t oci.stackable.tech/sdp/ubi9-rust-builder . -f ubi9-rust-builder/Dockerfile
62+
docker build -t oci.stackable.tech/sdp/ubi10-rust-builder . -f ubi10-rust-builder/Dockerfile
6363

6464
# Change directory into the an operator repository and ensure the image can build
6565
docker build . -f docker/Dockerfile

.github/workflows/mirror.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- registry.k8s.io/sig-storage/csi-provisioner
1616
- registry.k8s.io/git-sync/git-sync
1717
- registry-1.docker.io/library/golang
18+
- ghcr.io/astral-sh/uv
1819
image-index-manifest-tag:
1920
description: |
2021
The image index manifest tag, like 1.0.14 or v1.0.14

.github/workflows/ubi-rust-builder.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
branches:
99
- main
1010
paths:
11-
- ubi9-rust-builder/**
1211
- ubi10-rust-builder/**
1312
- .github/actions/**
1413
- .github/workflows/ubi-rust-builder.yml
@@ -25,7 +24,7 @@ jobs:
2524
fail-fast: false
2625
matrix:
2726
runner: ["ubuntu-latest", "ubicloud-standard-8-arm-ubuntu-2404"]
28-
ubi-version: ["ubi9"]
27+
ubi-version: ["ubi10"]
2928
runs-on: ${{ matrix.runner }}
3029
steps:
3130
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -65,7 +64,7 @@ jobs:
6564
strategy:
6665
fail-fast: false
6766
matrix:
68-
ubi-version: ["ubi9"]
67+
ubi-version: ["ubi10"]
6968
runs-on: ubuntu-latest
7069
needs: ["build"]
7170
steps:

.scripts/upload_new_maven_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --uploa
7171

7272
echo "Successfully uploaded Maven $VERSION to Nexus"
7373
echo "https://repo.stackable.tech/service/rest/repository/browse/packages/maven/"
74-
echo "https://github.com/prometheus/maven/releases/tag/$VERSION"
74+
echo "https://github.com/apache/maven/releases/tag/maven-$VERSION"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
1717
- airflow: Bump celery version to 5.5.3 for Airflow 3.x ([#1343]).
1818
- testing-tools: refactoring: Split image into multiple images, remove unnecessary components and switch to UBI as base image ([#1354]).
1919
- hive: fixed 4.0.1 shaded hive-metastore-opa-authorizer jar by relocating dependencies ([#1356]).
20+
- Use ubi10 as the base image for all products ([#1353]).
2021

2122
### Removed
2223

@@ -30,6 +31,7 @@ All notable changes to this project will be documented in this file.
3031
[#1356]: https://github.com/stackabletech/docker-images/pull/1356
3132
[#1357]: https://github.com/stackabletech/docker-images/pull/1357
3233
[#1358]: https://github.com/stackabletech/docker-images/pull/1358
34+
[#1353]: https://github.com/stackabletech/docker-images/pull/1353
3335

3436
## [25.11.0] - 2025-11-07
3537

airflow/Dockerfile

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
2+
# check=error=true;skip=InvalidDefaultArgInFrom,SecretsUsedInArgOrEnv
23
# Disabled error checks:
34
# - SecretsUsedInArgOrEnv : OPA_AUTH_MANAGER is a false positive and breaks the build.
4-
# check=error=true;skip=InvalidDefaultArgInFrom,SecretsUsedInArgOrEnv
55

66
ARG GIT_SYNC_VERSION
7+
ARG UV_VERSION
78

89
# For updated versions check https://github.com/kubernetes/git-sync/releases
910
# which should contain a image location (e.g. registry.k8s.io/git-sync/git-sync:v3.6.8)
1011
FROM oci.stackable.tech/sdp/git-sync/git-sync:${GIT_SYNC_VERSION} AS gitsync-image
1112

13+
FROM oci.stackable.tech/sdp/astral-sh/uv:${UV_VERSION} AS uv-image
14+
1215
FROM local-image/shared/statsd-exporter AS statsd_exporter-builder
1316

1417
FROM local-image/vector AS opa-auth-manager-builder
1518

1619
ARG OPA_AUTH_MANAGER
1720
ARG PYTHON_VERSION
18-
ARG UV_VERSION
21+
ARG STACKABLE_USER_UID
1922

2023
COPY airflow/opa-auth-manager/${OPA_AUTH_MANAGER} /tmp/opa-auth-manager
2124

2225
WORKDIR /tmp/opa-auth-manager
2326

24-
RUN <<EOF
25-
microdnf update
26-
microdnf install python${PYTHON_VERSION}-pip
27-
microdnf clean all
28-
29-
pip${PYTHON_VERSION} install --no-cache-dir uv==${UV_VERSION}
27+
COPY --from=uv-image --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/
3028

29+
RUN <<EOF
3130
# This folder is required by the tests to set up an sqlite database
3231
mkdir /root/airflow
3332

@@ -43,10 +42,8 @@ ARG PRODUCT_VERSION
4342
ARG PYTHON_VERSION
4443
ARG TARGETARCH
4544
ARG STACKABLE_USER_UID
46-
ARG NODEJS_VERSION
4745
ARG S3FS_VERSION
4846
ARG CYCLONEDX_BOM_VERSION
49-
ARG UV_VERSION
5047

5148
# Airflow "extras" packages are listed here: https://airflow.apache.org/docs/apache-airflow/stable/extra-packages-ref.html
5249
# They evolve over time and thus belong to the version-specific arguments.
@@ -62,8 +59,9 @@ ARG AIRFLOW_EXTRAS_EXTERNAL_SERVICES=""
6259
ARG AIRFLOW_EXTRAS_LOCALLY_INSTALLED_SOFTWARE=""
6360
ARG AIRFLOW_EXTRAS_OTHER=""
6461

65-
RUN microdnf module enable -y nodejs:${NODEJS_VERSION} && \
66-
microdnf update && \
62+
COPY --from=uv-image --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/
63+
64+
RUN microdnf update && \
6765
microdnf install \
6866
cyrus-sasl-devel \
6967
# Needed for kerberos
@@ -78,10 +76,6 @@ RUN microdnf module enable -y nodejs:${NODEJS_VERSION} && \
7876
libpq-devel \
7977
openldap-devel \
8078
openssl-devel \
81-
python${PYTHON_VERSION} \
82-
python${PYTHON_VERSION}-devel \
83-
python${PYTHON_VERSION}-pip \
84-
python${PYTHON_VERSION}-wheel \
8579
# The airflow odbc provider can compile without the development files (headers and libraries) (see https://github.com/stackabletech/docker-images/pull/683)
8680
unixODBC \
8781
# Needed for Airflow UI assets
@@ -111,14 +105,10 @@ AIRFLOW_EXTRAS="$AIRFLOW_EXTRAS_CORE,$AIRFLOW_EXTRAS_META,$AIRFLOW_EXTRAS_PROVID
111105
# Removing duplicates
112106
AIRFLOW_EXTRAS=$(echo "$AIRFLOW_EXTRAS" | tr ',' '\n' | awk 'NF > 0 {if (!seen[$0]++) print $0}' | tr '\n' ',' | sed 's/,$//')
113107

114-
python${PYTHON_VERSION} -m venv --system-site-packages /stackable/app
115-
116-
source /stackable/app/bin/activate
108+
uv venv --python "${PYTHON_VERSION}" --system-site-packages /stackable/app
109+
. /stackable/app/bin/activate
117110

118-
# Upgrade pip to the latest version
119-
# Also install uv to get support for build constraints
120-
pip install --no-cache-dir --upgrade pip
121-
pip install --no-cache-dir uv==${UV_VERSION}
111+
# Another project manager
122112
uv tool install hatch
123113

124114
cd "$(/stackable/patchable --images-repo-root=src checkout airflow ${PRODUCT_VERSION})"
@@ -225,14 +215,15 @@ COPY --from=gitsync-image --chown=${STACKABLE_USER_UID}:0 /git-sync ${HOME}/git-
225215

226216
COPY airflow/licenses /licenses
227217

218+
COPY --from=uv-image --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/
219+
228220
# Update image and install needed packages
229221
RUN <<EOF
230222
microdnf update
231223

232224
# git: Needed for the gitsync functionality
233225
# openldap: Needed for authentication of clients against LDAP servers
234226
# openssh-clients: We need the openssh libs for the gitsync functionality (the clone target could be e.g. git@github.com:org/repo.git)
235-
# python: Airflow needs Python
236227
microdnf install \
237228
ca-certificates \
238229
cyrus-sasl \
@@ -242,8 +233,6 @@ microdnf install \
242233
openldap-clients \
243234
openssh-clients \
244235
openssl-libs \
245-
openssl-pkcs11 \
246-
python${PYTHON_VERSION} \
247236
socat \
248237
unixODBC
249238
microdnf clean all
@@ -253,6 +242,13 @@ rm -rf /var/cache/yum
253242
# It is used as an init alternative in the entrypoint
254243
curl -o /usr/bin/tini "https://repo.stackable.tech/repository/packages/tini/tini-${TINI_VERSION}-${TARGETARCH}"
255244

245+
# There is currently no way to tell `uv` where to write to, and it assumes `$HOME` for the XDG paths.
246+
export XDG_DATA_HOME=/usr/local/share
247+
export XDG_CACHE_HOME=/var/cache
248+
uv venv --python "${PYTHON_VERSION}" --system-site-packages /stackable/app
249+
chown -R "${STACKABLE_USER_UID}:0" /stackable/app/bin
250+
. /stackable/app/bin/activate
251+
256252
# fix missing permissions
257253
chmod a+x /entrypoint.sh
258254
chmod a+x /run-airflow.sh

airflow/boil-config.toml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ stackable-devel = "1.0.0"
55

66
[versions."2.9.3".build-arguments]
77
python-version = "3.9"
8-
git-sync-version = "v4.4.1"
8+
git-sync-version = "v4.4.1" # When changing this version, you will need to use the mirror workflow to get the image into our registry
99
s3fs-version = "2024.9.0"
1010
cyclonedx-bom-version = "6.0.0"
1111
tini-version = "0.19.0"
12-
uv-version = "0.7.8"
12+
uv-version = "0.9.10" # When changing this version, you will need to use the mirror workflow to get the image into our registry
1313
airflow-extras-other = "async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,ldap,google,google_auth,microsoft.azure,odbc,pandas,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv,trino"
1414
opa-auth-manager = "airflow-2"
15-
nodejs-version = "20"
1615

1716
[versions."2.10.5".local-images]
1817
"shared/statsd-exporter" = "0.28.0"
@@ -21,14 +20,13 @@ stackable-devel = "1.0.0"
2120

2221
[versions."2.10.5".build-arguments]
2322
python-version = "3.12"
24-
git-sync-version = "v4.4.1"
23+
git-sync-version = "v4.4.1" # When changing this version, you will need to use the mirror workflow to get the image into our registry
2524
s3fs-version = "2024.9.0"
2625
cyclonedx-bom-version = "6.0.0"
2726
tini-version = "0.19.0"
28-
uv-version = "0.7.8"
27+
uv-version = "0.9.10" # When changing this version, you will need to use the mirror workflow to get the image into our registry
2928
airflow-extras-other = "async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,ldap,google,google_auth,microsoft.azure,odbc,pandas,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv,trino"
3029
opa-auth-manager = "airflow-2"
31-
nodejs-version = "20"
3230

3331
[versions."3.0.1".local-images]
3432
"shared/statsd-exporter" = "0.28.0"
@@ -37,14 +35,13 @@ stackable-devel = "1.0.0"
3735

3836
[versions."3.0.1".build-arguments]
3937
python-version = "3.12"
40-
git-sync-version = "v4.4.1"
38+
git-sync-version = "v4.4.1" # When changing this version, you will need to use the mirror workflow to get the image into our registry
4139
s3fs-version = "2024.9.0"
4240
cyclonedx-bom-version = "6.0.0"
4341
tini-version = "0.19.0"
44-
uv-version = "0.7.8"
42+
uv-version = "0.9.10" # When changing this version, you will need to use the mirror workflow to get the image into our registry
4543
airflow-extras-other = "async,amazon,celery,cncf-kubernetes,docker,elasticsearch,fab,ftp,grpc,hashicorp,http,ldap,google,microsoft-azure,odbc,pandas,postgres,redis,sendgrid,sftp,slack,ssh,statsd,trino"
4644
opa-auth-manager = "airflow-3"
47-
nodejs-version = "20"
4845

4946
[versions."3.0.6".local-images]
5047
"shared/statsd-exporter" = "0.28.0"
@@ -53,30 +50,29 @@ stackable-devel = "1.0.0"
5350

5451
[versions."3.0.6".build-arguments]
5552
python-version = "3.12"
56-
git-sync-version = "v4.4.1"
53+
git-sync-version = "v4.4.1" # When changing this version, you will need to use the mirror workflow to get the image into our registry
5754
s3fs-version = "2024.9.0"
5855
cyclonedx-bom-version = "6.0.0"
5956
tini-version = "0.19.0"
60-
uv-version = "0.7.8"
57+
uv-version = "0.9.10" # When changing this version, you will need to use the mirror workflow to get the image into our registry
6158

6259
# Airflow extras are defined in separate lists to make them easier to check against the links below. The lists will be concatenated and duplicates removed in the dockerfile.
6360
# See https://airflow.apache.org/docs/apache-airflow/3.0.6/extra-packages-ref.html#core-airflow-extras
64-
airflow-extras-core="async,graphviz,kerberos,otel,sentry,standard,statsd"
61+
airflow-extras-core = "async,graphviz,kerberos,otel,sentry,standard,statsd"
6562

6663
# See https://airflow.apache.org/docs/apache-airflow/3.0.6/extra-packages-ref.html#meta-airflow-package-extras
67-
airflow-extras-meta="aiobotocore,cloudpickle,github-enterprise,google-auth,graphviz,ldap,leveldb,pandas,polars,rabbitmq,s3fs,saml,uv"
64+
airflow-extras-meta = "aiobotocore,cloudpickle,github-enterprise,google-auth,graphviz,ldap,leveldb,pandas,polars,rabbitmq,s3fs,saml,uv"
6865

6966
# See https://airflow.apache.org/docs/apache-airflow/3.0.6/extra-packages-ref.html#apache-software-extras
70-
airflow-extras-provider-apache="apache-beam,apache-cassandra,apache-drill,apache-druid,apache-flink,apache-hdfs,apache-hive,apache-iceberg,apache-impala,apache-kafka,apache-kylin,apache-livy,apache-pig,apache-pinot"
67+
airflow-extras-provider-apache = "apache-beam,apache-cassandra,apache-drill,apache-druid,apache-flink,apache-hdfs,apache-hive,apache-iceberg,apache-impala,apache-kafka,apache-kylin,apache-livy,apache-pig,apache-pinot"
7168

7269
# See https://airflow.apache.org/docs/apache-airflow/3.0.6/extra-packages-ref.html#external-services-extras
73-
airflow-extras-external-services="airbyte,alibaba,apprise,amazon,asana,atlassian-jira,microsoft-azure,cloudant,cohere,databricks,datadog,dbt-cloud,dingding,discord,facebook,github,google,hashicorp,openai,opsgenie,pagerduty,pgvector,pinecone,qdrant,salesforce,sendgrid,segment,slack,snowflake,tableau,tabular,telegram,vertica,weaviate,yandex,ydb,zendesk"
70+
airflow-extras-external-services = "airbyte,alibaba,apprise,amazon,asana,atlassian-jira,microsoft-azure,cloudant,cohere,databricks,datadog,dbt-cloud,dingding,discord,facebook,github,google,hashicorp,openai,opsgenie,pagerduty,pgvector,pinecone,qdrant,salesforce,sendgrid,segment,slack,snowflake,tableau,tabular,telegram,vertica,weaviate,yandex,ydb,zendesk"
7471

7572
# See https://airflow.apache.org/docs/apache-airflow/3.0.6/extra-packages-ref.html#locally-installed-software-extras
76-
airflow-extras-locally-installed-software="arangodb,celery,cncf-kubernetes,docker,edge3,elasticsearch,exasol,fab,git,github,influxdb,jenkins,mongo,microsoft-mssql,neo4j,odbc,openfaas,oracle,postgres,presto,redis,samba,singularity,teradata,trino"
73+
airflow-extras-locally-installed-software = "arangodb,celery,cncf-kubernetes,docker,edge3,elasticsearch,exasol,fab,git,github,influxdb,jenkins,mongo,microsoft-mssql,neo4j,odbc,openfaas,oracle,postgres,presto,redis,samba,singularity,teradata,trino"
7774

7875
# See https://airflow.apache.org/docs/apache-airflow/3.0.6/extra-packages-ref.html#other-extras
79-
airflow-extras-other="common-compat,common-io,common-messaging,common-sql,ftp,grpc,http,imap,jdbc,microsoft-psrp,microsoft-winrm,openlineage,opensearch,papermill,sftp,smtp,sqlite,ssh"
76+
airflow-extras-other = "common-compat,common-io,common-messaging,common-sql,ftp,grpc,http,imap,jdbc,microsoft-psrp,microsoft-winrm,openlineage,opensearch,papermill,sftp,smtp,sqlite,ssh"
8077

8178
opa-auth-manager = "airflow-3"
82-
nodejs-version = "20"

druid/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ LABEL org.opencontainers.image.description="${DESCRIPTION}"
131131

132132
# https://docs.openshift.com/container-platform/4.16/openshift_images/create-images.html#defining-image-metadata
133133
# https://github.com/projectatomic/ContainerApplicationGenericLabels/blob/master/vendor/redhat/labels.md
134-
LABEL io.openshift.tags="ubi9,stackable,druid,sdp"
134+
LABEL io.openshift.tags="ubi10,stackable,druid,sdp"
135135
LABEL io.k8s.description="${DESCRIPTION}"
136136
LABEL io.k8s.display-name="${NAME}"
137137

hbase/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ LABEL org.opencontainers.image.description="${DESCRIPTION}"
9292

9393
# https://docs.openshift.com/container-platform/4.16/openshift_images/create-images.html#defining-image-metadata
9494
# https://github.com/projectatomic/ContainerApplicationGenericLabels/blob/master/vendor/redhat/labels.md
95-
LABEL io.openshift.tags="ubi9,stackable,hbase,sdp,nosql"
95+
LABEL io.openshift.tags="ubi10,stackable,hbase,sdp,nosql"
9696
LABEL io.k8s.description="${DESCRIPTION}"
9797
LABEL io.k8s.display-name="${NAME}"
9898

hive/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ LABEL org.opencontainers.image.description="${DESCRIPTION}"
173173

174174
# https://docs.openshift.com/container-platform/4.16/openshift_images/create-images.html#defining-image-metadata
175175
# https://github.com/projectatomic/ContainerApplicationGenericLabels/blob/master/vendor/redhat/labels.md
176-
LABEL io.openshift.tags="ubi9,stackable,hive,sdp"
176+
LABEL io.openshift.tags="ubi10,stackable,hive,sdp"
177177
LABEL io.k8s.description="${DESCRIPTION}"
178178
LABEL io.k8s.display-name="${NAME}"
179179

0 commit comments

Comments
 (0)