-
Notifications
You must be signed in to change notification settings - Fork 177
Upgrade to Spring 6 and Spring-Boot 3 #5541
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
base: develop
Are you sure you want to change the base?
Upgrade to Spring 6 and Spring-Boot 3 #5541
Conversation
ac89bf2 to
9dc38df
Compare
|
@hmottestad Any guidance on how to get the tests to run all the way through? |
|
... They do not fail, they just time out |
|
There is a brittle test in the ShaclSail. Sorry about that. I've been trying to make it robust, but there are just too many edge cases. The reason why the build(11) is stuck is that you need to have a build that uses Java 11. We are stuck on 11 until our next major version, but if you just want the tests to pass you can add your own GitHub action that has the same name and just doesn't do anything. |
|
I understand we are stuck on Java 11 as the target version until the next major version at least, but why is using Java 11 required for building? |
|
I tried removing version jdk version 11 from all matrix parameter expressions in the github actions, assuming that that's where the required check When you say, 'adding a github action with that name', do you mean a file ? |
|
I just managed to merge main into develop, so if you rebase your branch onto develop your build should be a lot more stable. The requirement for java(11) is configured in the GitHub repo setting somewhere by the webmasters at Eclipse Foundation, once we permanently move to a newer Java version we can ask them to change it for us. I think it's enough to just match the name, I don't know if it needs any steps or not. |
49fca46 to
272f027
Compare
|
Maybe it's just the space before (11) that is wrong? |
|
with the job 'build' that has strategy/matrix configuration containing '11', it works. |
|
Now all that's failing is the slow-tests job. Should we give it more than 6 hours? |
- Duplicate `spring-components` into `spring6-components` folder - rename duplicated submodules: `spring` -> `spring6` - Apply OpenRewrite recipe for spring-boot 3.5, excluding all changes related to new java language features - Align dependency versions in spring6-components with those required by spring-boot 3.5 - Fix tests of spring6-boot-sparql-web: parsing paths in the Spring Rest subsystem are now stricter, trailing slashes are not matched with a controller method that does not have the trailing slash.
Spring 6 requires Java 17. This should not change things for clients as the project still compiles for Java 11
…-spring6 is actually used
…ctions (remove Java 11)
… matrix params which succeeds
|
@hmottestad let me know if you think there is anything more I can do here |
a2cc613 to
fa50994
Compare
|
@hmottestad if I wanted to raise the chance that this makes it into the next release, what would you recommend I should do? |
|
I believe it'll have to wait for the next major release. Last we looked into this we ran into issues with Elasticsearch, Solr and Lucene needing to be upgraded too. And Elasticsearch needs a massive rewrite if we want to upgrade it since they changed their license to one that is incompatible. You can start with formatting the code, and then running the license tool to see what we need to do for IP work. |
|
ok, will do! |
|
Let me look at the dependency tree. Want to see how the conflicts look when Solr, Elasticsearch and Lucene are included. |
|
My goal with this PR was to enable building spring-boot applications that have an RDF4J storage back end, both with old and new spring-boot dependencies. The dependencies are changed for those rdf4j submodules that require it, but not for just any module's dependencies. Consequently, I think any module unchanged by this PR should continue to work as before, using old spring-boot and related libs. Only people who choose to use both (make a spring-boot 3 app using RDF4J and use old libs) will have to sort out library conflicts. So, while now is as good a time as ever to migrate everything, it is also an option to just merge this PR and allow people to start working with spring-boot 3 if their setting allows it. There are projects like that out there. Having said that, someone would have to verify the unchanged modules in the tools folder (mentioned in the PR description), just to check that nothing went wrong, but they were not touched and should work as before. |

GitHub issues resolved: #5076, #5063,
Briefly describe the changes proposed in this PR:
We don't want to break rdf4j for existing users, so we have to make new artifacts.
Approach:
spring-componentstospring6-components,s/spring/spring6/tools/server-springtotools/server-spring6Note: There is substantial code duplication between the two submodules, the changes required for spring6 are minimal. However, extracting common code requires additional work and might lead to bugs, I would be happy to leave things as is, for now.
Multiple Submodules of
toolsnot changedSome submodules of
toolswere not duplicated/adapted to spring6 and thus still use spring5:rdf4j-http-serverrdf4j-federationrdf4j-runtime-osgirdf4j-workbenchTransitively, they all depend on Spring 5, and I am not sure if they should be duplicated or updated. I am leaning toward duplicating, but it's a lot of duplication, and it would warrant some restructuring work: I'd introduce a
tools/spring5and atools/spring6intermediate pom-packaged parent for all the config changes, without changing the original artifact names for backward compatibility - thus, it will be clear how to handle the upcoming Spring 7 release.I would suggest leaving this aspect (handling other submodules of tools) out of this PR.
Github Actions bumped to Java17
GitHub CI actions have to be changed to use Java 17 instead of Java 11, as spring 6 artifacts come compiled for that version. RDF4J still compiles to 11, so it should not impact clients. Necessary changes have been made (mosly including artifacts that are shipped with JDK versions < 17).
PR Author Checklist (see the contributor guidelines for more details):
mvn process-resourcesto format from the command line)