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

chore(dependency): upgrade spring boot from 2.7.x to 3.0.x and spring cloud from 2021.0.x to 2022.0.x #1133

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j-sandy
Copy link
Contributor

@j-sandy j-sandy commented Jan 16, 2025

Upgrading spring boot 2.7.18 to 3.0.13 and spring cloud 2021.0.8 to 2022.0.5. Spring cloud release 2022.0.x is compatible with spring boot 3.0.x. https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases

======================================================
refactor(dependency): replace javax with jakarta, spring from 5.x to 6.x and rxjava with rxjava3 during upgrade of spring boot 3.0.x

Spring Boot 3.0 has migrated from Java EE to Jakarta EE APIs for all dependencies. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes#third-party-library-upgrades So, replacing the imports with javax to jakarta.

WebMvcConfigurerAdapter class has been deprecated in Spring 5.0 and subsequently removed from spring 6.0. So, replacing it with WebMvcConfigurer interface for direct implementation. https://docs.spring.io/spring-framework/docs/5.0.0.RELEASE/javadoc-api/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.html

Spring boot 3.x deprecated and removed rxjava, and rxjava3 has been added. So, update the dependency. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#rxjava

Due to rxjava3 upgrade, encountered below errors:

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/executor/BakePoller.groovy: 34: unable to resolve class rx.functions.Action0
Implicitly compiled files were not subject to annotation processing.

 @ line 34, column 1.
   import rx.functions.Action0
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/executor/BakePoller.groovy: 35: unable to resolve class rx.schedulers.Schedulers
 @ line 35, column 1.
   import rx.schedulers.Schedulers
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 33: unable to resolve class rx.Scheduler
 @ line 33, column 1.
   import rx.Scheduler
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 34: unable to resolve class rx.functions.Action0
 @ line 34, column 1.
   import rx.functions.Action0
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 35: unable to resolve class rx.schedulers.Schedulers
 @ line 35, column 1.
   import rx.schedulers.Schedulers
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 59: unable to resolve class rx.functions.Action0
 @ line 59, column 21.
         new Action0() {
                       ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 59: unable to resolve class rx.functions.Action0
 @ line 59, column 21.
         new Action0() {
                       ^

7 errors

> Task :rosco-core:compileGroovy FAILED

So, refactored the code to accomodate changes required by rxjava2 and rxjava3 following the changelogs.
https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0
https://github.com/ReactiveX/RxJava/wiki/What%27s-different-in-3.0

… cloud from 2021.0.x to 2022.0.x

Upgrading spring boot 2.7.18 to 3.0.13 and spring cloud 2021.0.8 to 2022.0.5.
Spring cloud release 2022.0.x is compatible with spring boot 3.0.x.
https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases

======================================================
refactor(dependency): replace javax with jakarta, spring from 5.x to 6.x and rxjava with rxjava3 during upgrade of spring boot 3.0.x

Spring Boot 3.0 has migrated from Java EE to Jakarta EE APIs for all dependencies.
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes#third-party-library-upgrades
So, replacing the imports with `javax` to `jakarta`.

`WebMvcConfigurerAdapter` class has been deprecated in Spring 5.0 and subsequently removed from spring 6.0. So, replacing it with `WebMvcConfigurer` interface for direct implementation.
https://docs.spring.io/spring-framework/docs/5.0.0.RELEASE/javadoc-api/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.html

Spring boot 3.x deprecated and removed rxjava, and rxjava3 has been added. So, update the dependency.
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#rxjava

Due to rxjava3 upgrade, encountered below errors:
```
/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/executor/BakePoller.groovy: 34: unable to resolve class rx.functions.Action0
Implicitly compiled files were not subject to annotation processing.

 @ line 34, column 1.
   import rx.functions.Action0
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/executor/BakePoller.groovy: 35: unable to resolve class rx.schedulers.Schedulers
 @ line 35, column 1.
   import rx.schedulers.Schedulers
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 33: unable to resolve class rx.Scheduler
 @ line 33, column 1.
   import rx.Scheduler
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 34: unable to resolve class rx.functions.Action0
 @ line 34, column 1.
   import rx.functions.Action0
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 35: unable to resolve class rx.schedulers.Schedulers
 @ line 35, column 1.
   import rx.schedulers.Schedulers
   ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 59: unable to resolve class rx.functions.Action0
 @ line 59, column 21.
         new Action0() {
                       ^

/rosco/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/jobs/local/JobExecutorLocal.groovy: 59: unable to resolve class rx.functions.Action0
 @ line 59, column 21.
         new Action0() {
                       ^

7 errors

> Task :rosco-core:compileGroovy FAILED
```
So, refactored the code to accomodate changes required by rxjava2 and rxjava3 following the changelogs.
https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0
https://github.com/ReactiveX/RxJava/wiki/What%27s-different-in-3.0
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.

1 participant