Skip to content

Update Kafka image tag used in integration tests #35234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #35249
mhalbritter opened this issue May 2, 2023 · 14 comments
Closed
Tracked by #35249

Update Kafka image tag used in integration tests #35234

mhalbritter opened this issue May 2, 2023 · 14 comments
Assignees
Labels
status: superseded An issue that has been superseded by another

Comments

@mhalbritter
Copy link
Contributor

We're using 5.4.3 of confluentinc/cp-kafka, which has no ARM support. Starting with 7.x the developers added ARM support, consider switching to this.

@mhalbritter mhalbritter added the type: task A general task label May 2, 2023
@mhalbritter mhalbritter added this to the 3.1.x milestone May 2, 2023
@mhalbritter mhalbritter modified the milestones: 3.1.x, 3.x May 3, 2023
@KitBolourchi
Copy link
Contributor

Hello, I have never contributed to open source before but would love to get started and would be happy to pick this up if you recommend. Is this just updating the kafka image version that is being used to allow arm architecture support for some integrated tests?

@mhalbritter
Copy link
Contributor Author

mhalbritter commented May 15, 2023

Hey,

thanks for the offer!

There's the method org.springframework.boot.testsupport.testcontainers.DockerImageNames#kafka which returns the docker image used in our integration tests. org.springframework.boot.testsupport.testcontainers.DockerImageNames#KAFKA_VERSION is the version it uses for the image.

This issue would be to use an up-to-date image of Kafka (please use a specific version and not latest) and then run all the integration tests and see if they still pass (./gradlew build)

If all tests pass, feel free to create a pull request back to this repository.

If that sounds fine for you, I'll assign you to this issue and you can start working on it. If you need further assistance, feel free to ask!

@KitBolourchi
Copy link
Contributor

Hey Moritz, yes that sounds great. Please assign this issue to me and I will review and work on this. Thank you, I will message back here if I need any assistance, appreciate it :)

@mhalbritter
Copy link
Contributor Author

Great! Have fun!

@KitBolourchi
Copy link
Contributor

Hey @mhalbritter, I seem to be having issues with building the project with ./gradlew build as it fails every time.

I get 1189 tests, 279 failures and 8 ignores.

All of them have the issue following:

"* What went wrong:
A problem occurred configuring root project 'gradle-15620684805334644137'."

I think it has to do with how I set up the project, I simply forked this repo and git cloned it, and ran the build command. I have docker running in the background.

I have made updated the kafka image version and ran the individual KafkaContainerConnectionDetailsFactoryIntegrationTests which seem to be successful. but I should ensure ./gradew build succeeds before raising PR.

I am unsure how to build it properly and was looking to get some assistance.

@mhalbritter
Copy link
Contributor Author

Hey @KitBolourchi, you need to have Java 17 on your machine, and then ./gradlew build should work.

Could you please run ./gradlew build | tee output.txt and then upload the zipped output.txt here, so that I can take a look?

 What went wrong:
A problem occurred configuring root project 'gradle-15620684805334644137'.

is very non-descriptive :)

Thanks!

@KitBolourchi
Copy link
Contributor

KitBolourchi commented May 22, 2023

I think I was using java19, I see okay I will try with 17 and if error persists, I will put the whole output file here (sorry you're right it was not helpful)

@mhalbritter
Copy link
Contributor Author

Don't worry. Here's more documentation about how to get started and building from source.

@KitBolourchi
Copy link
Contributor

KitBolourchi commented May 22, 2023

Here is the output.text file from running ./gradlew build. I tried running with JDK17 but still no luck. I do have docker loaded in the background also. I will keep trying to fix this. It seems to be all the gradle.build scripts which are faililng for the integrated tests.

output.txt.zip

@mhalbritter
Copy link
Contributor Author

Hey, thanks for that. It looks like that the tests which execute it against multiple Maven and Gradle versions aren't working, but I don't know why yet.

Could you please upload the zipped folder spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build/reports/tests/test, which contains the output of the test run? I hope this file contains the root cause of the error.

@KitBolourchi
Copy link
Contributor

Good morning @mhalbritter, here is the zipped test reports folder.

I wasn't able to get it to build successfully last night. I tried deleting the repo and re-cloning from my fork / building from source but still no luck. Thank you for the help.

test.zip

@mhalbritter
Copy link
Contributor Author

So, the root cause seems to be this error:

> Could not open proj generic class cache for build file '/private/var/folders/6v/dyrttb6d2t5gxvrpm5crprsm0000gn/T/gradle-17968605439802548769/build.gradle' (/private/var/folders/6v/dyrttb6d2t5gxvrpm5crprsm0000gn/T/.gradle-test-kit-kitbolourchi-TEST-SNAPSHOT-7.5.1/caches/7.5.1/scripts/3hylifuc835q8ep49p5mlhzby).
   > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63

Class file version 63 is Java 19.

Are you sure you're running it with Java 17? What does java -version give you? It should say something like:

╰─$ java -version 
openjdk version "17.0.7" 2023-04-18 LTS
OpenJDK Runtime Environment (build 17.0.7+7-LTS)
OpenJDK 64-Bit Server VM (build 17.0.7+7-LTS, mixed mode)

and

╰─$ ./gradlew --version

------------------------------------------------------------
Gradle 7.6.1
------------------------------------------------------------

Build time:   2023-02-24 13:54:42 UTC
Revision:     3905fe8ac072bbd925c70ddbddddf4463341f4b4

Kotlin:       1.7.10
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.7 (BellSoft 17.0.7+7-LTS)
OS:           Linux 6.2.15-200.fc37.aarch64 aarch64

@KitBolourchi
Copy link
Contributor

Ahh you're right... my bad I thought I changed it within the properties of intellij but it was somehow still jdk19.

I just did it and it built successfully so all test ran with my updated kafka version. I will review the documentation and create a pull request for this issue.

Many thanks :)

@scottfrederick
Copy link
Contributor

Closing in favor of #35625

@scottfrederick scottfrederick closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2023
@scottfrederick scottfrederick removed this from the 3.x milestone May 24, 2023
@scottfrederick scottfrederick added status: superseded An issue that has been superseded by another and removed type: task A general task labels May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

3 participants