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

Upgrade to spring-boot 2.1.x #8683

Closed
29 tasks done
DanielFran opened this issue Oct 30, 2018 · 37 comments · Fixed by #9222
Closed
29 tasks done

Upgrade to spring-boot 2.1.x #8683

DanielFran opened this issue Oct 30, 2018 · 37 comments · Fixed by #9222
Labels
area: enhancement 🔧 $100 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@DanielFran
Copy link
Member

DanielFran commented Oct 30, 2018

With the launch of new spring-boot 2.1.0, it is time to continue the work started in #8047.

See: https://spring.io/blog/2018/10/30/spring-boot-2-1-0 & https:/spring-projects/spring-boot/wiki/Spring-Boot-2.1-Release-Notes

TODO:

Bonus: JDK9+ compatibility

  • Substitute @PostConstruct by InitializingBean implementation
  • Substitute @PreDestroy by DisposableBean implementation
  • JDK 11 support

@jhipster/developers please add here if I missed any evolution/impact

@mraible
Copy link
Contributor

mraible commented Oct 30, 2018

I don't think we have to upgrade to Spring Security's OIDC support, but we certainly can. It will allow users to configure more than one OIDC provider, so if they wanted to add Google or Facebook, they could.

FWIW, I also have global SSO logout working. I'll create a PR for that against the current version sometime this week.

@cbornet cbornet mentioned this issue Oct 31, 2018
1 task
@deepu105 deepu105 added the $100 https://www.jhipster.tech/bug-bounties/ label Oct 31, 2018
@mraible
Copy link
Contributor

mraible commented Oct 31, 2018

After thinking about this a bit more, I don't think we should upgrade to use Spring Security's OIDC support in a 5.x release. The property names in application.yml change and this is a breaking change. We should migrate to OIDC (from OAuth 2.0) in 6.x.

@DanielFran
Copy link
Member Author

@jhipster/developers Anyone might help to fix last issues?

@pascalgrimaud
Copy link
Member

@DanielFran : if needed, we could focus on this, this tuesday at our JHipster Day at Ippon

@jdubois
Copy link
Member

jdubois commented Nov 11, 2018

I'm definitely very interested, I'll have a look during the week.

@DanielFran
Copy link
Member Author

DanielFran commented Nov 11, 2018

Actually I have an issue with AsyncLiquibase due to changes with taskexecutor and also an error with missing javassist in classpath... :(

@jdubois
Copy link
Member

jdubois commented Nov 11, 2018

As with Spring Boot 2.1 you can now start Hibernate lazily (they copied on us, 4 years later!), we should refactor or change this anyway.

@PierreBesson
Copy link
Contributor

Because of microservices we will need to wait until the end of the year for Spring Cloud Greenwich to be released : https:/spring-cloud/spring-cloud-release/milestones

So I think we should create a branch and try to get as many things working on it. We can also publish snapshots of jhipster-dependencies based on SC Greenwich milestones to be able to work on it.
Best case scenario we will be able to release Spring Boot 2.1 with jdk11 by Christmas.

@DanielFran
Copy link
Member Author

We need first to test if there is anything not working using Finchley.SR2 and maybe release an alfa release.

Then if needed, we can already target Greenwich.M1 (List of dependencies used ) or even wait to Nov-15 to target Greenwich.M2 to release a beta release.

@mraible
Copy link
Contributor

mraible commented Nov 13, 2018

Something I noticed in the 2.1 release notes today:

Elasticsearch REST Clients
As an alternative option to Jest, auto-configurations for RestClient and RestHighLevelClient are provided with configurable options from the spring.elasticsearch.rest.* namespace.

I'm not sure that we want to move away from Spring Data Jest for Elasticsearch, but if we do, this option might help with that.

@DanielFran
Copy link
Member Author

@jdubois @PierreBesson I updated spring-cloud dependency to Greenwish.M2.

@jdubois
Copy link
Member

jdubois commented Nov 19, 2018

Thanks @DanielFran ! Sorry I didn't have the time yet to work on this

@DanielFran
Copy link
Member Author

@jdubois me neither. It is just that I am stuck with taskexecutor and also an error with missing javassist in classpath... :(

@jdubois
Copy link
Member

jdubois commented Nov 26, 2018

I did quite a number of commits in the Spring Boot 2.1 branches, fixing some JDK 11 issues and Async configuration issues.

There is one big issue with Hazelcast, as it currently does not support Hibernate 5.3 (and we can't downgrade, because Hibernate 5.3 brings JDK 9 support). See hazelcast/hazelcast-hibernate#44 for more information -> we need to have the solution at hazelcast/hazelcast-hibernate#48 as using the solution at hazelcast/hazelcast-hibernate#44 (comment) is not enough for us (as we have a singleton and need to re-use it)

@cbornet
Copy link
Member

cbornet commented Nov 26, 2018

Can't we downgrade Hibernate and stay on JDK8 for now ? (I know 😞 ...)

@DanielFran
Copy link
Member Author

DanielFran commented Nov 27, 2018

ElasticSearch version is now updated and seems working.

pending issues:

@jdubois
Copy link
Member

jdubois commented Nov 27, 2018

Cassandra doesn't work as Cassandra 3.x does not support Java 9 and above. As we use CassandraUnit in our tests, which runs an embedded Cassandra, there is no way our tests can pass. Java 9+ support is scheduled for Cassandra 4, but there is no release date available as of today. The main solution to me would be to use TestContainers, like we do for Couchbase.

Now I'm going to tell unpleasant things, but as we have full statistics publicly available on https://start.jhipster.tech/#/statistics we can see that, for last month:

  • Cassandra is used by 0,33% of users
  • Couchbase is used by 0,17% of users
  • Infinispan is used by 0,64% of users

Those three options give us a lot of maintenance work, and are probably going to be blockers for our upcoming JDK 11 and Spring Boot 2.1 support. Considering that nearly nobody uses them, and also that they the 3 of them are backed by companies with tons of $$$ which do not contribute at all to the project, I think we should have a clear and open discussion on removing those options. I'll post this on the dev mailing list right now.

@murdos
Copy link
Contributor

murdos commented Dec 2, 2018

Now I'm going to tell unpleasant things, but as we have full statistics publicly available on https://start.jhipster.tech/#/statistics we can see that, for last month:

* Cassandra is used by 0,33% of users

* Couchbase is used by 0,17% of users

* Infinispan is used by 0,64% of users

Just wondering: what report are you using to retrieve these numbers?

When I use the last year report, I got this:

  • Cassandra: 1.82%
  • Couchbase: 0.99%
  • Infinispan: 1.79%

@jdubois
Copy link
Member

jdubois commented Dec 2, 2018

Just use the one from last month. We have some bad data at the beginning of the year, which explain your higher numbers.

avdev4j added a commit to avdev4j/generator-jhipster that referenced this issue Dec 4, 2018
Revert to version 2 otherwise it does not start
Remove command network.host deprecated
Move command discovery.type to environment

jhipster#8683
@avdev4j
Copy link
Contributor

avdev4j commented Dec 4, 2018

Some news about Elasticsearch :
Both spring data jest and spring data elasticSearch need 6.2.2 elasticSearch API version.
Spring boot 2.1.1.Release set (in Spring boot dependencies POM) the elasticSearch version on 6.4.3.

Unfortunatly the XContentBuilder class has been modified and do not support string() method. String method is using somewhere by spring data jest.
That's why, at startup, spring boot fire an error.

To fix it I have just open a PR (jhipster/jhipster#135) to force the ElasticSearch version on 6.2.2.

At the same time the docker image is not longer working because of version changement (2 to 2.2) and remove "-E" in command. It seems no longer support on ES 6+. #8927

Both docker and embedded ElasticSearch runs should work now.

thanks to @juliensadaoui and @pascalgrimaud for helping 👍

@DanielFran
Copy link
Member Author

I open issue VanRoy/spring-data-jest#102 to fix those issues.

@DanielFran
Copy link
Member Author

DanielFran commented Dec 4, 2018

New status:

  • Hazelcast (by @jdubois): OK
  • Couchbase: OK
  • webflux: OK (fixed testMethodNotSupported backend test: HTTP 405 error message that were diferent than previous version)

Partially fixed:

  • Elasticsearch (by @avdev4j): downgrade to 6.2.2

Still KO:

@jdubois
Copy link
Member

jdubois commented Dec 4, 2018

Thanks @DanielFran ! As discussed earlier and on the mailing list, we will remove the Infinspan/Cassandra/Couchbase options, but as cleanly as possible:

  • I will create tickets for each of them, for detailed explanation & discussion
  • If the technology is currently broken (Cassandra & Infinispan), I will remove the option as long as it's broken (the code is not deleted, only the option is removed, so you can't select it)
  • For each technology, I will try to find a team of people to manage it: if they are ready to do the upgrades, the option will stay enabled as soon as they correct the issues
  • We will try to migrate those to blueprints, but this is a lot of work so those teams should be very motivated by this migration. But this will give them much more freedom.

@DanielFran
Copy link
Member Author

About elasticsearch, actually there is no bug, spring-data-elasticsearch Lovelace-SR3 is targetting 6.2.2, so we need to keep using that version instead of 6.4.3 defined in spring-boot 2.1.1.

@DanielFran DanielFran changed the title Upgrade to spring-boot 2.1.0 Upgrade to spring-boot 2.1.x Dec 5, 2018
@Mahdihp
Copy link

Mahdihp commented Dec 5, 2018

Upgrade to spring-boot 2.1

@gmarziou
Copy link
Contributor

gmarziou commented Dec 6, 2018

@Mahdihp What are you trying to say with this comment and also #5970 (comment) ?

@PierreBesson
Copy link
Contributor

An important thing to do for JDK11 support is to upgrade the docs and recommend to install java throught the adoptopenjdk site.

@mraible
Copy link
Contributor

mraible commented Dec 14, 2018

@PierreBesson We could also just recommend SDKMAN! for Java 11 installation. That's what I use/recommend.

@PierreBesson
Copy link
Contributor

Sdkman will install the Zulu jdk, I think we should recommend the regular jdk install provided by adoptopenjdk. They also have a docker image.

@mraible
Copy link
Contributor

mraible commented Dec 14, 2018

SDKMAN allows OpenJDK as well.

$ sdk list java
================================================================================
Available Java Versions
================================================================================
     12.ea.20-open       1.0.0-rc-8-grl
   + 11.ea.26-open
     11.0.1-zulu
   * 11.0.1-open
   + 11.0.0-open
     10.0.2-zulu
     10.0.2-open
     9.0.7-zulu
     9.0.4-open
     8.0.192-zulu
     8.0.191-oracle
 > + 8.0.181-zulu
     7.0.181-zulu
     1.0.0-rc-10-grl
     1.0.0-rc-9-grl

@jdubois
Copy link
Member

jdubois commented Jan 2, 2019

I'm merging #9005 which should fix the Cassandra tests, once a new release of JHipster Dependencies is done.

-> how about a 2.1.0 release of JHipster BOM + framework, which would use Spring Boot 2.1?

@DanielFran
Copy link
Member Author

Would be awesome! 🥇

Do you think we could then create a beta version of the generator?

@jdubois
Copy link
Member

jdubois commented Jan 2, 2019

@DanielFran first I would like a green build of the Spring Boot 2.1 branch of jhipster/jhipster, and then I'll release new versions of JHipster dependencies and framework. And after that, yes we can do beta versions of the generator.

@DanielFran
Copy link
Member Author

@jhipster/developers all tasks are done!

@avdev4j
Copy link
Contributor

avdev4j commented Jan 23, 2019

Sounds great !

@DanielFran DanielFran added this to the 6.0.0 milestone Jan 29, 2019
@deepu105 deepu105 mentioned this issue Feb 9, 2019
4 tasks
@rburgst
Copy link

rburgst commented Feb 20, 2019

when can we expect an official release with spring boot 2.1?

@pascalgrimaud
Copy link
Member

@rburgst : as we work on JHipster during our free time, we can't give you a date. We hope very soon.
If you need it for your projects, you can use master branch ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: enhancement 🔧 $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.