Skip to content
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

New Baseline: Spring Boot 3 and Java 17 #24

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

ThomasVitale
Copy link
Collaborator

  • Minimum supported version of Java is now 17
  • Minimum supported version of Spring Boot is now 3.2

Spring Boot versions older than 3.2 reached EOL and will not receive any further support nor security patches. It would be a security risk to continue using EOL-ed versions in this LangChain4j project.

More information: https://spring.io/projects/spring-boot#support

@ThomasVitale
Copy link
Collaborator Author

@langchain4j what do you think? The tests are failing because the values from the environment variables are empty (e.g. the OpenAI API Key). I'm not sure why.

@langchain4j
Copy link
Owner

@ThomasVitale thank you, looks good!
Secrets (env vars) are not propagated probably because you are running it from your fork, let me try to rerun it

@ThomasVitale
Copy link
Collaborator Author

Right, that makes sense. Next time, I'll create a branch directly from here instead of a fork.
Thanks for the review!

@langchain4j
Copy link
Owner

@ThomasVitale can't make it inject secrets from the fork :( I have run it locally, tests in anthropic are failing with

TestEngine with ID 'junit-jupiter' failed to discover tests
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:628)
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1240)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1089)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:905)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
	at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
	at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
	at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

This is probably due to @RetryingTest?

@ThomasVitale
Copy link
Collaborator Author

@langchain4j I'll have a look, thanks

@ThomasVitale
Copy link
Collaborator Author

It looks like the JUnit Pioneer dependency doesn't support running with Spring Boot 3 (junit-pioneer/junit-pioneer#810). I'll see if I can find some workaround.

* Minimum supported version of Java is now 17
* Minimum supported version of Spring Boot is now 3.2

Spring Boot versions older than 3.2 reached EOL and will not receive any further support nor security patches. It would be a security risk to continue using EOL-ed versions in this LangChain4j project.

More information: https://spring.io/projects/spring-boot#support

Signed-off-by: Thomas Vitale <[email protected]>
@ThomasVitale
Copy link
Collaborator Author

@langchain4j as agreed, I updated the PR removing the JUnit Pioneer extension. I couldn't reproduce the error on a Spring Boot app created from start.spring.io, so it's probably something specific to the project setup involving Maven SureFire, Java 17 and Spring Boot 3.

Copy link
Owner

@langchain4j langchain4j left a comment

Choose a reason for hiding this comment

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

@ThomasVitale thank you!

@langchain4j langchain4j merged commit fad12ab into langchain4j:main Jun 6, 2024
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants