Skip to content

Conversation

dalaoqi
Copy link
Contributor

@dalaoqi dalaoqi commented Jul 14, 2025

The changes update the OpenJDK base image from 17-buster to 17-bullseye:

  • Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of
    openjdk:17-buster - Updates tests/docker/ducker-ak script to use the
    new default image - Updates documentation in tests/README.md with the
    new image name examples

Reviewers: Federico Valeri fedevaleri@gmail.com, TengYao Chi
kitingiao@gmail.com, Ken Huang s7133700@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@github-actions github-actions bot added triage PRs from the community tests Test fixes (including flaky tests) small Small PRs labels Jul 14, 2025
Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dalaoqi
Could you run a random e2e test locally and paste the result?
Thanks

@github-actions github-actions bot removed the triage PRs from the community label Jul 16, 2025
@dalaoqi
Copy link
Contributor Author

dalaoqi commented Jul 16, 2025

@frankvicky
Here's the result of "tests/kafkatest/tests/client/consumer_test.py::OffsetValidationTest"
image

Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dalaoqi: LGTM

@frankvicky frankvicky requested a review from chia7712 July 16, 2025 09:36
Copy link
Contributor

@fvaleri fvaleri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left one comment for you to consider. Thanks.

I would also like to mention that, currently, the image build is broken due to stale apt-get sources list in the openjdk:17-buster base image:

 > [stage-1  3/60] RUN apt update && apt install -y sudo git netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim python3-pip python3-dev libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute iproute2 iputils-ping && apt-get -y clean:        
0.267                                                                                                                                                                                                                                                                                      
0.267 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.                                                                                                                                                                                                      
0.267                                                                                                                                                                                                                                                                                      
0.362 Ign:1 http://deb.debian.org/debian buster InRelease
0.362 Ign:2 http://security.debian.org/debian-security buster/updates InRelease
0.367 Ign:3 http://deb.debian.org/debian buster-updates InRelease
0.369 Err:4 http://security.debian.org/debian-security buster/updates Release
0.369   404  Not Found [IP: 151.101.66.132 80]
0.375 Err:5 http://deb.debian.org/debian buster Release
0.375   404  Not Found [IP: 151.101.2.132 80]
0.380 Err:6 http://deb.debian.org/debian buster-updates Release
0.380   404  Not Found [IP: 151.101.2.132 80]
0.384 Reading package lists...
0.391 E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file.
0.391 E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
0.391 E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.

# Therefore, use openjdk:17-buster instead.
ARG jdk_version=openjdk:17-buster
# Therefore, use openjdk:17-bullseye instead.
ARG jdk_version=openjdk:17-bullseye
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the default value here since we are taking that from the build script where we also have a default value?

If we also update the README.md using a placeholder (e.g. <JDK_IMAGE>), in the next base image update we would only need to update the default image name in one place. Wdyt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

@chia7712
Copy link
Member

I would also like to mention that, currently, the image build is broken due to stale apt-get sources list in the openjdk:17-buster base image:

Yes, that's why I created this ticket 😄

@fvaleri
Copy link
Contributor

fvaleri commented Jul 16, 2025

I would also like to mention that, currently, the image build is broken due to stale apt-get sources list in the openjdk:17-buster base image:

Yes, that's why I created this ticket 😄

Oh yeah, sorry. I searched directly in open PRs, and wasn't clear we were updating to address the issue.

Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@github-actions github-actions bot added the tools label Jul 16, 2025
@@ -301,7 +301,7 @@ public void checkArgs() {
CommandLineUtils.checkInvalidArgs(parser, options, createOpt, Set.of(hmacOpt, renewTimePeriodOpt, expiryTimePeriodOpt));
CommandLineUtils.checkInvalidArgs(parser, options, renewOpt, Set.of(renewPrincipalsOpt, maxLifeTimeOpt, expiryTimePeriodOpt, ownerPrincipalsOpt));
CommandLineUtils.checkInvalidArgs(parser, options, expiryOpt, Set.of(renewOpt, maxLifeTimeOpt, renewTimePeriodOpt, ownerPrincipalsOpt));
CommandLineUtils.checkInvalidArgs(parser, options, describeOpt, Set.of(renewTimePeriodOpt, maxLifeTimeOpt, hmacOpt, renewTimePeriodOpt, expiryTimePeriodOpt));
CommandLineUtils.checkInvalidArgs(parser, options, describeOpt, Set.of(renewTimePeriodOpt, maxLifeTimeOpt, hmacOpt, expiryTimePeriodOpt));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this unrelated change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this will cause the e2e error.
The duplicate arguments will cause Set.of throws IllegalArgumentException.
We could open another patch to fix it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it would be great to create another PR to fix it with extra unit test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open #20177

dalaoqi added 2 commits July 16, 2025 21:18
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@dalaoqi dalaoqi requested a review from chia7712 July 16, 2025 13:44
tests/README.md Outdated
@@ -49,11 +49,11 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT
```
* Run tests with a specific image name
```
image_name="ducker-ak-openjdk:17-buster" bash tests/docker/run_tests.sh
image_name="ducker-ak-<JDK_IMAGE>" bash tests/docker/run_tests.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @fvaleri's suggestion is to add an example for the usage of jdk_version

@@ -49,11 +49,11 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT
```
* Run tests with a specific image name
```
image_name="ducker-ak-openjdk:17-buster" bash tests/docker/run_tests.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for another, perhaps we could use openjdk:17 for this example to avoid using the explicit os version.

@@ -14,8 +14,8 @@
# limitations under the License.

# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment should be moved to ducker-ak

Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@dalaoqi dalaoqi requested a review from chia7712 July 16, 2025 14:13
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@fvaleri fvaleri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dalaoqi thanks for the changes, just left a small improvement suggestion.

tests/README.md Outdated
```
* Run tests with a different JVM
```
bash tests/docker/ducker-ak up -j '<JDK_IMAGE>'; tests/docker/run_tests.sh
```
You can customize the OpenJDK base image using the `-j` or `--jdk` parameter. The default is `openjdk:17-bullseye`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about rewriting like this:

You can customize the OpenJDK base image using the -j or --jdk parameter, otherwise a default value will be used.

Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@@ -84,6 +86,9 @@ up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image]
or a combination of port/port-range separated by comma (like 2181,9092 or 2181,5005-5008).
By default no port is exposed. See README.md for more detail on this option.

If -j|--jdk is specified, you can customize the OpenJDK base image used for building
the ducker container. Defaults to ${default_jdk}. Example: -j openjdk:11-bullseye
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since current Kafka versions no longer support JDK 11, it would be better to use JDK 17 in this example.

Copy link
Contributor

@fvaleri fvaleri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@chia7712
Copy link
Member

the failed test is traced by https://issues.apache.org/jira/browse/KAFKA-19513

@chia7712 chia7712 merged commit 70824be into apache:trunk Jul 16, 2025
19 of 21 checks passed
@mimaison
Copy link
Member

We probably want to backport this as we now can't run system tests anymore on the existing release branches: 4.1, 4.0, etc

With buster we get the following error message when running apt update:

E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file.
E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
ERROR: process "/bin/sh -c apt update && apt install -y sudo git netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim python3-pip python3-dev libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute iproute2 iputils-ping && apt-get -y clean" did not complete successfully: exit code: 100

mimaison pushed a commit that referenced this pull request Jul 22, 2025
The changes update the OpenJDK base image from 17-buster to 17-bullseye:
- Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of
openjdk:17-buster
  - Updates tests/docker/ducker-ak script to use the new default image
- Updates documentation in tests/README.md with the new image name
examples

Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>
chia7712 pushed a commit to chia7712/kafka that referenced this pull request Jul 22, 2025
…#20165)

The changes update the OpenJDK base image from 17-buster to 17-bullseye:
- Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of
openjdk:17-buster
  - Updates tests/docker/ducker-ak script to use the new default image
- Updates documentation in tests/README.md with the new image name
examples

Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>
@chia7712
Copy link
Member

@mimaison yes, you are right. Should I backport it to 4.1 after the 4.1.0 release?

@mimaison
Copy link
Member

I've just backported it to 4.1, otherwise we can't run the system tests.

We'll also need to backport it to 4.0 for the 4.0.1 release, and possibly to 3.9 in case we ever to another bugfix release.

chia7712 pushed a commit to chia7712/kafka that referenced this pull request Jul 22, 2025
…#20165)

The changes update the OpenJDK base image from 17-buster to 17-bullseye:
- Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of
openjdk:17-buster
  - Updates tests/docker/ducker-ak script to use the new default image
- Updates documentation in tests/README.md with the new image name
examples

Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>
@chia7712
Copy link
Member

We'll also need to backport it to 4.0 for the 4.0.1 release, and possibly to 3.9 in case we ever to another bugfix release.

ok, I will backport it to 4.0 and 3.9 after fixing the conflicts on my local.

@chia7712
Copy link
Member

backport to 74d93ad

3.9 has no such issue.

dalaoqi added a commit to dalaoqi/kafka that referenced this pull request Jul 22, 2025
…#20165)

The changes update the OpenJDK base image from 17-buster to 17-bullseye:
- Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of
openjdk:17-buster
  - Updates tests/docker/ducker-ak script to use the new default image
- Updates documentation in tests/README.md with the new image name
examples

Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>
k-apol pushed a commit to k-apol/kafka that referenced this pull request Aug 8, 2025
…#20165)

The changes update the OpenJDK base image from 17-buster to 17-bullseye:
- Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of
openjdk:17-buster
  - Updates tests/docker/ducker-ak script to use the new default image
- Updates documentation in tests/README.md with the new image name
examples

Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved small Small PRs tests Test fixes (including flaky tests) tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants