Skip to content

Commit 3f3222d

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-4.0.1-opa-authorizer
2 parents 5166dda + 006f967 commit 3f3222d

File tree

20 files changed

+215
-283
lines changed

20 files changed

+215
-283
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,21 @@ All notable changes to this project will be documented in this file.
1414

1515
- airflow: Extend list of providers for 3.0.6 ([#1336])
1616
- airflow: Bump celery version to 5.5.3 for Airflow 3.x ([#1343]).
17+
- testing-tools: refactoring: Split image into multiple images, remove unnecessary components and switch to UBI as base image ([#1354]).
1718
- hive: fixed 4.0.1 shaded hive-metastore-opa-authorizer jar by relocating dependencies ([#1356]).
1819

20+
### Removed
21+
22+
- hive: Remove `4.0.0` ([#1340]).
23+
- opensearch: Remove the `performance-analyzer` plugin from the OpenSearch image ([#1357]).
24+
1925
[#1336]: https://github.com/stackabletech/docker-images/pull/1336
2026
[#1337]: https://github.com/stackabletech/docker-images/pull/1337
21-
[#1343]: https://github.com/stackabletech/docker-images/pull/1343
2227
[#1340]: https://github.com/stackabletech/docker-images/pull/1340
28+
[#1343]: https://github.com/stackabletech/docker-images/pull/1343
29+
[#1354]: https://github.com/stackabletech/docker-images/pull/1354
2330
[#1356]: https://github.com/stackabletech/docker-images/pull/1356
31+
[#1357]: https://github.com/stackabletech/docker-images/pull/1357
2432

2533
## [25.11.0] - 2025-11-07
2634

opensearch/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ ARG OPENSEARCH_NEURAL_SEARCH_PLUGIN_VERSION
3030
ARG OPENSEARCH_NOTIFICATIONS_CORE_PLUGIN_VERSION
3131
ARG OPENSEARCH_NOTIFICATIONS_PLUGIN_VERSION
3232
ARG OPENSEARCH_OBSERVABILITY_PLUGIN_VERSION
33-
ARG OPENSEARCH_PERFORMANCE_ANALYZER_PLUGIN_VERSION
3433
ARG OPENSEARCH_REPORTS_SCHEDULER_PLUGIN_VERSION
3534
ARG OPENSEARCH_SEARCH_RELEVANCE_PLUGIN_VERSION
3635
ARG OPENSEARCH_SECURITY_ANALYTICS_PLUGIN_VERSION
@@ -128,7 +127,6 @@ rm -r jdk
128127
"org.opensearch.plugin:opensearch-notifications-core:${OPENSEARCH_NOTIFICATIONS_CORE_PLUGIN_VERSION}" \
129128
"org.opensearch.plugin:notifications:${OPENSEARCH_NOTIFICATIONS_PLUGIN_VERSION}" \
130129
"org.opensearch.plugin:opensearch-observability:${OPENSEARCH_OBSERVABILITY_PLUGIN_VERSION}" \
131-
"org.opensearch.plugin:performance-analyzer:${OPENSEARCH_PERFORMANCE_ANALYZER_PLUGIN_VERSION}" \
132130
"org.opensearch.plugin:opensearch-reports-scheduler:${OPENSEARCH_REPORTS_SCHEDULER_PLUGIN_VERSION}" \
133131
"org.opensearch.plugin:opensearch-search-relevance:${OPENSEARCH_SEARCH_RELEVANCE_PLUGIN_VERSION}" \
134132
"org.opensearch.plugin:opensearch-security-analytics:${OPENSEARCH_SECURITY_ANALYTICS_PLUGIN_VERSION}" \
@@ -152,9 +150,7 @@ find /stackable/opensearch-${PRODUCT_VERSION}/config -type f -exec chmod 660 {}
152150

153151
EOF
154152

155-
# The OpenSearch Performance Analyzer needs a JDK, not just a JRE.
156-
# With a JRE, the following exception is thrown:
157-
# java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine
153+
# The upstream image is built with a bundled JDK and not just a JRE, so we also ship OpenSearch with a JDK.
158154
FROM local-image/jdk-base AS final
159155

160156
ARG PRODUCT_VERSION

opensearch/boil-config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jdk-base = "21"
2020
"opensearch-notifications-core-plugin-version" = "3.1.0.0"
2121
"opensearch-notifications-plugin-version" = "3.1.0.0"
2222
"opensearch-observability-plugin-version" = "3.1.0.0"
23-
"opensearch-performance-analyzer-plugin-version" = "3.1.0.0"
2423
"opensearch-reports-scheduler-plugin-version" = "3.1.0.0"
2524
"opensearch-search-relevance-plugin-version" = "3.1.0.0"
2625
"opensearch-security-analytics-plugin-version" = "3.1.0.0"

rust/boil/src/build/cli.rs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct BuildArguments {
2828
/// The image version being built.
2929
#[arg(
3030
short, long,
31-
value_parser = parse_image_version,
31+
value_parser = BuildArguments::parse_image_version,
3232
default_value_t = Self::default_image_version(),
3333
help_heading = "Image Options"
3434
)]
@@ -112,15 +112,33 @@ pub struct BuildArguments {
112112
pub strip_architecture: bool,
113113

114114
/// Loads the image into the local image store.
115+
///
116+
/// DEPRECATED: Use -- --load instead.
115117
#[arg(long, help_heading = "Build Options")]
118+
#[deprecated(since = "0.1.7", note = "Use -- --load instead")]
116119
pub load: bool,
117120

118121
/// Dry run. This does not build the image(s) but instead prints out the bakefile.
119122
#[arg(short, long, alias = "dry")]
120123
pub dry_run: bool,
124+
125+
/// Arguments passed after '--' which are directly passed to the Docker command.
126+
///
127+
/// Care needs to be taken, because these arguments can override/modify the behaviour defined
128+
/// via the generated Bakefile. A few save arguments include but are not limited to: --load,
129+
/// --no-cache, --progress.
130+
#[arg(raw = true)]
131+
pub rest: Vec<String>,
121132
}
122133

123134
impl BuildArguments {
135+
fn parse_image_version(input: &str) -> Result<Version, ParseImageVersionError> {
136+
let version = Version::from_str(input).context(ParseVersionSnafu)?;
137+
ensure!(version.build.is_empty(), ContainsBuildMetadataSnafu);
138+
139+
Ok(version)
140+
}
141+
124142
fn default_image_version() -> Version {
125143
"0.0.0-dev".parse().expect("must be a valid SemVer")
126144
}
@@ -151,13 +169,6 @@ pub enum ParseImageVersionError {
151169
ContainsBuildMetadata,
152170
}
153171

154-
pub fn parse_image_version(input: &str) -> Result<Version, ParseImageVersionError> {
155-
let version = Version::from_str(input).context(ParseVersionSnafu)?;
156-
ensure!(version.build.is_empty(), ContainsBuildMetadataSnafu);
157-
158-
Ok(version)
159-
}
160-
161172
#[derive(Debug, PartialEq, Snafu, EnumDiscriminants)]
162173
pub enum ParseHostPortError {
163174
#[snafu(display("unexpected empty input"))]

rust/boil/src/build/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub enum Error {
4848
}
4949

5050
/// This is the `boil build` command handler function.
51-
pub fn run_command(args: BuildArguments, config: Config) -> Result<(), Error> {
51+
pub fn run_command(args: Box<BuildArguments>, config: Config) -> Result<(), Error> {
5252
// TODO (@Techassi): Parse Dockerfile instead to build the target graph
5353
// Validation
5454
ensure!(
@@ -77,10 +77,12 @@ pub fn run_command(args: BuildArguments, config: Config) -> Result<(), Error> {
7777
// or by building the image ourself.
7878

7979
// Finally invoke the docker buildx bake command
80+
#[allow(deprecated)]
8081
let mut child = Command::new("docker")
8182
.arg("buildx")
8283
.arg("bake")
8384
.arg_if(args.load, "--load")
85+
.args(args.rest)
8486
.arg("--file")
8587
.arg("-")
8688
.stdin(Stdio::piped())

rust/boil/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub enum Command {
2727
///
2828
/// Requires docker with the buildx extension.
2929
#[command(alias = "some-chicken")]
30-
Build(BuildArguments),
30+
Build(Box<BuildArguments>),
3131

3232
/// Display various structured outputs in JSON format.
3333
Show(ShowArguments),

testing-tools/Dockerfile

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
22
# check=error=true
33

4-
# Manifest list digest because of multi architecture builds ( https://www.redhat.com/architect/pull-container-image#:~:text=A%20manifest%20list%20exists%20to,system%20on%20a%20specific%20architecture )
5-
# https://hub.docker.com/_/python/tags
6-
# In Docker Hub, open up the tag and look for Index Digest. Otherwise do:
7-
# docker pull python:3.12-slim-bullseye and see the digest that appears in the output.
8-
FROM python:3.12-slim-bullseye@sha256:411fa4dcfdce7e7a3057c45662beba9dcd4fa36b2e50a2bfcd6c9333e59bf0db
4+
# Find the latest version at https://catalog.redhat.com/en/software/containers/ubi10/ubi-minimal/66f1504a379b9c2cf23e145c#get-this-image
5+
# IMPORTANT: Make sure to use the "Manifest List Digest" that references the images for multiple architectures
6+
# rather than just the "Image Digest" that references the image for the selected architecture.
7+
FROM registry.access.redhat.com/ubi10/ubi-minimal@sha256:28ec2f4662bdc4b0d4893ef0d8aebf36a5165dfb1d1dc9f46319bd8a03ed3365
98

109
ARG PRODUCT_VERSION
10+
ARG PYTHON_VERSION
1111
ARG RELEASE_VERSION
12-
ARG KEYCLOAK_VERSION
1312
ARG STACKABLE_USER_UID
1413
ARG STACKABLE_USER_GID
1514
ARG STACKABLE_USER_NAME
@@ -25,50 +24,54 @@ LABEL name="Stackable Testing Tools" \
2524
# https://github.com/hadolint/hadolint/wiki/DL4006
2625
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
2726

28-
# This is needed so that krb5-user installs without prompting for a realm.
29-
ENV DEBIAN_FRONTEND=noninteractive
3027

28+
# We configure microdnf to not install weak dependencies in this file
29+
# Not doing this caused the content of images to become unpredictable because
30+
# based on which packages get updated by `microdnf update` new weak dependencies
31+
# might be installed that were not present earlier (the ubi base image doesn't
32+
# seem to install weak dependencies)
33+
# This also affects the packages that are installed in our Dockerfiles (java as prime
34+
# example).
35+
# https://github.com/stackabletech/docker-images/pull/533
36+
COPY stackable-base/stackable/dnf.conf /etc/dnf/dnf.conf
3137

32-
COPY testing-tools/python /stackable/python
33-
COPY testing-tools/licenses /licenses
38+
# Default curl configuration to avoid forgetting settings and to declutter the Dockerfiles
39+
COPY stackable-base/stackable/curlrc /root/.curlrc
3440

41+
# Base requirements for all testing-tools images
42+
COPY testing-tools/requirements.txt /stackable/requirements.txt
43+
COPY testing-tools/licenses /licenses
3544

3645
RUN <<EOF
37-
apt-get update
38-
apt-get install -y --no-install-recommends \
39-
build-essential \
40-
ca-certificates \
41-
curl \
42-
gzip \
43-
jq \
44-
`# krb5-user/libkrb5-dev are needed for Kerberos support. ` \
45-
krb5-user \
46-
libkrb5-dev \
47-
kubernetes-client \
48-
libssl-dev \
49-
libxml2-dev \
50-
libxslt1-dev \
46+
microdnf update
47+
48+
microdnf install \
49+
gcc \
50+
make \
5151
pkg-config \
52-
python3-certifi \
53-
python3-idna \
54-
python3-semver \
55-
python3-thrift \
56-
python3-toml \
57-
python3-urllib3 \
52+
openssl-devel \
53+
libxml2-devel \
54+
libxslt-devel \
55+
python${PYTHON_VERSION} \
56+
python${PYTHON_VERSION}-devel \
57+
python${PYTHON_VERSION}-pip \
58+
jq \
59+
gzip \
60+
curl \
5861
tar \
5962
zip \
60-
unzip \
61-
`# Java 11 seems like the best middle-ground for all tools` \
62-
openjdk-11-jdk-headless
63+
unzip
6364

64-
apt-get clean
65-
rm -rf /var/lib/apt/lists/*
65+
microdnf clean all
66+
rm -rf /var/cache/yum
6667

67-
curl --fail -L https://repo.stackable.tech/repository/packages/keycloak/keycloak-${KEYCLOAK_VERSION}.tar.gz | tar -xzC /stackable
68-
ln -s /stackable/keycloak-${KEYCLOAK_VERSION} /stackable/keycloak
68+
python3.12 -m pip install --no-cache-dir --upgrade pip
69+
python3.12 -m pip install --no-cache-dir -r /stackable/requirements.txt
6970

70-
pip install --no-cache-dir --upgrade pip
71-
pip install --no-cache-dir -r /stackable/python/requirements.txt
71+
ln -s /usr/bin/python3.12 /usr/bin/python
72+
73+
# Added only temporarily to create the user and group, removed again below
74+
microdnf install shadow-utils
7275

7376
groupadd --gid ${STACKABLE_USER_GID} --system ${STACKABLE_USER_NAME}
7477
useradd \
@@ -80,11 +83,12 @@ useradd \
8083
--home-dir /stackable \
8184
${STACKABLE_USER_NAME}
8285

86+
microdnf remove shadow-utils
87+
microdnf clean all
88+
8389
chown -R ${STACKABLE_USER_UID}:0 /stackable
8490
EOF
8591

86-
ENV PATH=/stackable/keycloak/bin:$PATH
87-
8892
USER ${STACKABLE_USER_UID}
8993

9094
ENV STACKABLE_PRODUCT_VERSION=${PRODUCT_VERSION}

testing-tools/boil-config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
[versions."0.2.0".build-arguments]
2-
keycloak-version = "26.3.5"
1+
[versions."0.3.0".build-arguments]
2+
python-version = "3.12"

testing-tools/hive/Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
2+
# check=error=true
3+
4+
FROM local-image/testing-tools
5+
6+
ARG PRODUCT_VERSION
7+
ARG RELEASE_VERSION
8+
ARG STACKABLE_USER_UID
9+
10+
LABEL name="Stackable Testing Tools - Hive" \
11+
maintainer="info@stackable.tech" \
12+
vendor="Stackable GmbH" \
13+
version="${PRODUCT_VERSION}" \
14+
release="${RELEASE_VERSION}" \
15+
summary="Stackable tools for Hive integration tests." \
16+
description="Hive-specific testing tools image based on testing-tools base image."
17+
18+
# https://github.com/hadolint/hadolint/wiki/DL4006
19+
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
20+
21+
USER root
22+
23+
COPY testing-tools/hive/requirements.txt /stackable/hive/requirements.txt
24+
25+
RUN <<EOF
26+
microdnf update
27+
28+
microdnf install \
29+
krb5-workstation \
30+
krb5-devel
31+
32+
microdnf clean all
33+
rm -rf /var/cache/yum
34+
35+
pip install --no-cache-dir -r /stackable/hive/requirements.txt
36+
EOF
37+
38+
USER ${STACKABLE_USER_UID}
39+
40+
ENV STACKABLE_PRODUCT_VERSION=${PRODUCT_VERSION}
41+
42+
WORKDIR /stackable
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[versions."0.3.0".local-images]
2+
testing-tools = "0.3.0"

0 commit comments

Comments
 (0)