Skip to content

Upgrade dependencies to support Spring Boot 3.0.0-M4 and Spring Cloud 2022.0.0-M4#30504

Merged
moarychan merged 15 commits into
Azure:feature/spring-cloud-azure-6.xfrom
moarychan:moary/upgrade-spring-boot-to-3.0.0-M4
Sep 5, 2022
Merged

Upgrade dependencies to support Spring Boot 3.0.0-M4 and Spring Cloud 2022.0.0-M4#30504
moarychan merged 15 commits into
Azure:feature/spring-cloud-azure-6.xfrom
moarychan:moary/upgrade-spring-boot-to-3.0.0-M4

Conversation

@moarychan

@moarychan moarychan commented Aug 17, 2022

Copy link
Copy Markdown
Member

This original branch feature/spring-cloud-azure-6.x is our target branch to support Spring Boot 3, the major version 6.x will be a milestone version for Spring Cloud Azure developers, and the main branch will keep supporting the release version of Spring Boot.

We are preparing a Spring Cloud Azure milestone version based on Spring Boot 3.0.0-M4 and Spring Cloud 2022.0.0-M4 version. The Spring Data Cosmos and Spring Cloud Aapconfiguration parts will be excluded in the first Spring Cloud Azure milestone plan due to not compatibility with Spring Boot M4, they may be in the second milestone version.

@moarychan

Copy link
Copy Markdown
Member Author

Hi @rickle-msft , could you help to fix this test class BlobBaseAPITest failure?
[ERROR] BlobBaseAPITest » Runtime PlaybackOnly has expired. Test must be reenabled https://dev.azure.com/azure-sdk/public/_build/results?buildId=1790627&view=logs&j=db7f3316-29bb-5f13-7d13-93829baced1b&t=80498dcb-de51-5a57-0f05-1252d7fcc56a&l=7718

@moarychan

Copy link
Copy Markdown
Member Author

Hi @kushagraThapar, could you help to fix this below failure in the Cosmos ci pipeline?

[ERROR] Error occurred during initialization of boot layer [ERROR] java.lang.module.FindException: Unable to derive module descriptor for /mnt/vss/_work/1/.m2/repository/io/micrometer/micrometer-core/1.10.0-M3/micrometer-core-1.10.0-M3.jar https://dev.azure.com/azure-sdk/public/_build/results?buildId=1790628&view=logs&j=c1fb1ddd-7688-52ac-4c5f-1467e51181f3&t=270374a4-721a-5366-7f60-bad5b1983827&l=27

@moarychan

Copy link
Copy Markdown
Member Author

/azp run java - spring - tests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@moarychan

Copy link
Copy Markdown
Member Author

Hi @sima-zhu we ran into the below issue when using the Spring Boot 3.0.0-M4 dependencies, could you help to release the newest version for the SDK azure-storage-file-share to support us as we move forward with the Spring Cloud Azure milestone release?

NoSuchMethod 'reactor.core.scheduler.Scheduler reactor.core.scheduler.Schedulers.elastic()' https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1793583&view=logs&j=9e025025-7104-51a5-7583-c78a51c691cc&t=942208af-db0c-5a9f-4ec0-d792ce77c137&l=1850

@moarychan

moarychan commented Aug 19, 2022

Copy link
Copy Markdown
Member Author

Hi, @ZejiaJiang we ran into the same below issue when using the Spring Boot 3.0.0-M4 dependencies, could you help to release the newest version for the SDK azure-messaging-servicebus to support us as we move forward with the Spring Cloud Azure milestone release?

java.lang.NoSuchMethodError: 'reactor.core.scheduler.Scheduler reactor.core.scheduler.Schedulers.elastic()' 2022-08-19T08:16:33.2000903Z at com.azure.messaging.servicebus.ServiceBusClientBuilder.getOrCreateConnectionProcessor(ServiceBusClientBuilder.java:680)
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1793583&view=logs&j=9e025025-7104-51a5-7583-c78a51c691cc&t=942208af-db0c-5a9f-4ec0-d792ce77c137&l=1848

@kushagraThapar

Copy link
Copy Markdown
Member

@moarychan - micrometer is a common module which is used across multiple azure SDKs. Wondering if the issue is only with cosmos CI pipeline, or with micrometer in general.
Is the issue with a specific micrometer version? If so, we can update it.

@geagin

geagin commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

Hi @moarychan , we've already release the latest version SDK for azure-messaging-servicebus which is v7.10.1 on 8/18/2022.

You can try it. I think it will work.

@moarychan

moarychan commented Aug 23, 2022

Copy link
Copy Markdown
Member Author

Hi @moarychan , we've already release the latest version SDK for azure-messaging-servicebus which is v7.10.1 on 8/18/2022.

You can try it. I think it will work.

Thanks for your update! @JimSuplizio @srnagar please help set up the pipeline to sync this difference. Thanks!

@moarychan moarychan added this to the 2022-09 milestone Aug 23, 2022
@moarychan moarychan self-assigned this Aug 23, 2022
@moarychan

Copy link
Copy Markdown
Member Author

/azp run java - spring - tests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@moarychan

Copy link
Copy Markdown
Member Author

@moarychan - micrometer is a common module which is used across multiple azure SDKs. Wondering if the issue is only with cosmos CI pipeline, or with micrometer in general. Is the issue with a specific micrometer version? If so, we can update it.

Hi @kushagraThapar , I can not reproduce the error [ERROR] java.lang.module.FindException: Unable to derive module descriptor for /mnt/vss/_work/1/.m2/repository/io/micrometer/micrometer-core/1.10.0-M3/micrometer-core-1.10.0-M3.jar, but I can reproduce the below exception, could you help to take a look?
image

@kushagraThapar

kushagraThapar commented Aug 23, 2022

Copy link
Copy Markdown
Member

@moarychan - so I looked at the issue, and seems like it is happening only with Java 11 and not with Java 8. Looks like related to micrometer module 1.10.0-M3.
The error states that it is not able to find module descriptor for this library version, is it possible that the issue is happening because we are updating the micrometer-core version to a milestone version, and not a GA version?

Worth asking this question on micrometer repository - https://github.com/micrometer-metrics/micrometer/releases/tag/v1.10.0-M3

ccing @alzimmermsft who might know about this issue or has any ideas / suggestions.

@moarychan

Copy link
Copy Markdown
Member Author

I don't understand the reason for excluding the appconfiguration and cosmos spring libraries from the generate_from_source_pom and their respective ci.yml files. It seems that if these libraries are also going to need to be updated to this later version of spring, that these should be building as normal and not being excluded.

@JimSuplizio thanks for your update!
We plan to roll out the millestone version of Spring Cloud Azure 6.0 as soon as possible, there is currently not much effort to upgrade the test cosmos and appconfiguration spring modules, so we want to exclude them first, this is a temporary solution, the excluded changes will be reverted soon. At the same time, @stliu is promoting the migration of Spring-related modules to sdk/spring, including appconfiguration and cosmos spring libraries, so that we can manage and maintain them in a unified and timely manner.

@check-enforcer

Copy link
Copy Markdown

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run java - [service] - ci

@moarychan

Copy link
Copy Markdown
Member Author

This is the first PR to support Spring Boot 3, the below are main change categories:

  1. Code changes:
    1.1 Upgrade dependencies align with Spring Boot 3.0.0-M4 and Spring Cloud 2022.0.0-M4
    1.2 Change imported package, migrates to jakata api, more detail from here https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0
    1.3 Commented out azure-spring-data-cosmos and its test modules in sdk/cosmos/pom.xml, because no Spring Data 3-based dependency is available.
    1.4 Commented out azure-spring-cloud-appconfiguration-config and its associated modules in sdk/appconfiguration/pom.xml, because no compatible version is available.
    1.5 Commented out spring-cloud-azure-starter-data-cosmos module in sdk/spring/pom.xml because there is no azure-spring-data-cosmos compatible version available, and also it will not be managed in spring-cloud-azure-dependencies.

  2. Known issues left:
    2.1 Spring Data for Azure Cosmos DB SQL API needs to be upgraded for Spring Data 3, more detail from here [FEATURE REQ] Spring Data Cosmos supports Spring Boot 3 and Spring Data 3 #30458.
    2.2 Azure Spring Cloud Feature Management Web needs to be upgraded for Spring Data 3, more detail from here [FEATURE REQ] azure-spring-cloud-feature-management-web:2.8.0 cannot work with Spring Boot 3.0.0.M3 #30465.
    2.3 No compatible dependency for wiremock, more detail from here Jetty 11 support wiremock/wiremock#1760

  3. Next
    3.1 Migrate the Spring-related modules from the non-spring directory into sdk/spring, this action should include the appconfiguration and cosmos spring libraries.
    3.2 Update reference doc and samples. The samples update is WIP, more detail from here Update samples to use Spring Cloud Azure 6.0.0-beta.1 Azure-Samples/azure-spring-boot-samples#470.
    3.3 Support Spring Cloud Azure 6.x in Spring Initialzr. more detail from here [FEATURE REQ] Make the Spring Cloud Azure 6.0.0 beta 3 available in Spring Initlizar #30357.

@moarychan

Copy link
Copy Markdown
Member Author

Hi @saragluna The code of the Spring Cloud Azure side is ready for supporting Spring Boot 3, please help review it, thanks!

@saragluna saragluna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we don't depend on the Spring Data Cosmos lib, we should also remove the code. We can always add them back instead of leaving them commented out in this PR.

Comment thread eng/jacoco-test-coverage/pom.xml Outdated
Comment thread eng/jacoco-test-coverage/pom.xml Outdated
Comment thread eng/scripts/generate_from_source_pom.py Outdated
Comment thread eng/versioning/external_dependencies.txt Outdated
Comment thread eng/versioning/version_client.txt
@azure-sdk

azure-sdk commented Sep 1, 2022

Copy link
Copy Markdown
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-core
azure-core-test
spring-cloud-azure-autoconfigure
azure-json-gson
azure-monitor-opentelemetry-exporter

Comment thread sdk/appconfiguration/tests.yml Outdated
Comment on lines +55 to +61
# Exclude artifacts list when build from source.These artifacts may be not compatible with current dependencies.
exclude_artifacts_list = [
'azure-spring-data-cosmos',
'azure-spring-data-cosmos-test',
'spring-cloud-azure-starter-data-cosmos'
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We'd better remove these in the next PR.

Comment thread eng/scripts/generate_from_source_pom.py
Comment thread sdk/cosmos/ci.yml Outdated
Comment thread sdk/cosmos/ci.yml Outdated
Comment thread sdk/cosmos/ci.yml Outdated
Comment thread sdk/cosmos/pom.xml Outdated
Comment thread sdk/cosmos/tests.yml Outdated
Comment thread sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml
Comment thread sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml
Comment thread sdk/cosmos/azure-cosmos/pom.xml
Comment thread sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml
Comment thread sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml Outdated
Comment thread sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE REQ] Make the Spring CLoud Azure support Spring Boot 3.0

6 participants