KAFKA-18841: Enable to test docker image locally#19028
Conversation
Signed-off-by: PoAn Yang <payang@apache.org>
frankvicky
left a comment
There was a problem hiding this comment.
Thanks for the patch.
I have a comment.
|
|
||
| archive_group = parser.add_mutually_exclusive_group(required=True) | ||
| archive_group.add_argument("--kafka-url", "-u", dest="kafka_url", help="Kafka url to be used to download kafka binary tarball in the docker image") | ||
| archive_group.add_argument("--kafka-archive", "-a", dest="kafka_archive", help="Kafka archive to be used to extract kafka binary tarball in the docker image") |
There was a problem hiding this comment.
There is documentation on top of this file. Should we update it to reflect the change?
There was a problem hiding this comment.
Updated it. Thanks.
Signed-off-by: PoAn Yang <payang@apache.org>
|
lgtm. Thanks a lot for the contribution! |
### Case 1: no --kafka-url and --kafka-archive
Should fail. One of argument (--kafka-url/--kafka-archive) is required.
```
> python docker_build_test.py apache/kafka --image-tag KAFKA-18841
--image-type jvm --build
usage: docker_build_test.py [-h] [--image-tag TAG] [--image-type
{jvm,native}] [--build] [--test] (--kafka-url KAFKA_URL |
--kafka-archive KAFKA_ARCHIVE) image
docker_build_test.py: error: one of the arguments --kafka-url/-u
--kafka-archive/-a is required
```
### Case 2: --kafka-url with native
```
> python docker_build_test.py apache/kafka --image-tag KAFKA-18841
--image-type native --kafka-url
https://dist.apache.org/repos/dist/dev/kafka/4.0.0-rc0/kafka_2.13-4.0.0.tgz
--build
```
### Case 3: --karka-url with jvm
```
> python docker_build_test.py apache/kafka --image-tag KAFKA-18841
--image-type jvm --kafka-url
https://dist.apache.org/repos/dist/dev/kafka/4.0.0-rc0/kafka_2.13-4.0.0.tgz
--build
```
### Case 4: --kafka-archive with native
```
> ./gradlew clean releaseTarGz
> cd docker
> python docker_build_test.py apache/kafka --image-tag KAFKA-18841
--image-type native --kafka-archive
</absolute/path/to/core/build/distributions/kafka_2.13-4.1.0-SNAPSHOT.tgz>
--build
```
### Case 5: --kafka-archive with jvm
```
> ./gradlew clean releaseTarGz
> cd docker
> python docker_build_test.py apache/kafka --image-tag KAFKA-18841
--image-type jvm --kafka-archive
</absolute/path/to/core/build/distributions/kafka_2.13-4.1.0-SNAPSHOT.tgz>
--build
```
Reviewers: Vedarth Sharma <vesharma@confluent.io>, Chia-Ping Tsai
<chia7712@gmail.com>, TengYao Chi <frankvicky@apache.org>
---------
Signed-off-by: PoAn Yang <payang@apache.org>
|
Heya @FrankYang0529 and @frankvicky! I am trying to generate the Docker JVM image as part of the 4.2 release and I am running into hanging builds (example: https://github.com/apache/kafka/actions/runs/20923061294/job/60113456146). The last successful release (i.e. 4.1.1) used the previous version of the Docker Build Test workflow which doesn't have this change. I also used the previous version of the workflow (the one used in 4.1.1) and it doesn't hang with the 4.2 binaries. If you have spare cycles it would be quite useful to get some additional eyes on what might be causing the issue! I have already generated the |
Case 1: no --kafka-url and --kafka-archive
Should fail. One of argument (--kafka-url/--kafka-archive) is required.
Case 2: --kafka-url with native
Case 3: --karka-url with jvm
Case 4: --kafka-archive with native
Case 5: --kafka-archive with jvm
Reviewers: Vedarth Sharma vesharma@confluent.io, Chia-Ping Tsai
chia7712@gmail.com, TengYao Chi frankvicky@apache.org