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

[FEATURE REQ] Spring Data Cosmos supports Spring Boot 3 and Spring Data 3 #30458

Closed
moarychan opened this issue Aug 15, 2022 · 36 comments
Closed
Labels
azure-spring All azure-spring related issues azure-spring-cosmos Spring cosmos related issues. Client This issue points to a problem in the data-plane of the library. Cosmos feature-request This issue requires a new behavior in the product in order be resolved.
Milestone

Comments

@moarychan
Copy link
Member

moarychan commented Aug 15, 2022

Context

Problems
The latest Spring Data cosmos is incompatible with Spring Boot 3.0.0 and Spring Data 3.0.0

User scenario 1
Users can not find a Spring Cloud Azure version compatible based on Spring Data 3.0.0.

User scenario 2
Users should check the documentation to confirm which version of Spring Boot matches Spring Data Cosmos, then check the Spring Cloud Azure version mapping to confirm which version Spring Boot version matches Spring Cloud Azure, because they don't have the same versions for Spring Data Cosmos and Spring Cloud Azure.

Goal

  • Move azure-spring-data-cosmos to ask/spring, and use a unified version in Spring Cloud Azure.

    • Develop build from source integration tests feature in the main branch
    • Enable the build from source integration tests to azure-cosmos and azure-spring-data-cosmos
  • Spring Data Cosmos support Spring Data 3.0.0.

  • Support Spring Data Cosmos auto-configuration in Spring Cloud Azure autoconfigure.

  • Support Spring Data Cosmos AOT.

  • Add Spring Data Cosmos samples in Azure-samples repo.

  • Add Spring Data Support doc in the reference doc of Spring Cloud Azure.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 15, 2022
@moarychan
Copy link
Member Author

#29979

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 15, 2022
@ghost
Copy link

ghost commented Aug 15, 2022

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar, @TheovanKraay

@moarychan
Copy link
Member Author

Hi @kushagraThapar , we plan to release a milestone Spring Cloud Azure based on Spring Boot 3.0.0 milestone version, please help to take a look!

@kushagraThapar
Copy link
Member

kushagraThapar commented Aug 15, 2022

@moarychan - got it, now we won't be overriding CrudRepository APIs. This means in future we will not know of any new APIs that CrudRepository adds, which is fine, as long as our customers are okay with it.

@saragluna - I believe this change can be done by the developer who is working on spring-boot 3.0.0-M3 release, and we can help if needed. I think all we need to do is remove the @override annotations from all CrudRepository APIs, so that the code compiles. To avoid any breaking changes, we should keep those APIs as it is in SimpleCosmosRepository so that our customers can still use them.

@moarychan
Copy link
Member Author

Hi @kushagraThapar , thanks for your update.

We plan to modify this in the spring-boot-3 branch and then release a beta version for both Spring Data Cosmos and other Spring Cloud Azure libraries.

@moarychan moarychan self-assigned this Aug 17, 2022
@moarychan moarychan added this to the 2022-09 milestone Aug 17, 2022
@saragluna saragluna modified the milestones: 2022-09, 2022-10 Sep 6, 2022
@moarychan moarychan modified the milestones: 2022-10, 2022-11 Oct 9, 2022
@moarychan moarychan changed the title [FEATURE REQ] azure-spring-data-cosmos:3.25.0 cannot work with Spring Data Common 3.0.0.M3 [FEATURE REQ] Make the Spring Data Cosmos work with Spring Data Common 3 Oct 9, 2022
@yiliuTo yiliuTo assigned saragluna and unassigned moarychan Oct 9, 2022
@saragluna
Copy link
Member

saragluna commented Oct 11, 2022

@moarychan Moary Chen - got it, now we won't be overriding CrudRepository APIs. This means in future we will not know of any new APIs that CrudRepository adds, which is fine, as long as our customers are okay with it.

@saragluna - I believe this change can be done by the developer who is working on spring-boot 3.0.0-M3 release, and we can help if needed. I think all we need to do is remove the @override annotations from all CrudRepository APIs, so that the code compiles. To avoid any breaking changes, we should keep those APIs as it is in SimpleCosmosRepository so that our customers can still use them.

According to https://github.com/spring-projects/spring-data-commons/wiki/Spring-Data-2022.0-(Turing)-Release-Notes-(Preview)#sorting-repositories-no-longer-inherit-from-crud-repositories, we only need to extend the respective CRUD repository explicitly.

@saragluna
Copy link
Member

saragluna commented Oct 17, 2022

#31417 to unblock the JDK 17 support. To support Spring Data Commons 3.x: we need to

  • move the spring-data-cosmos module to sdk/spring first
  • enable spring-data-cosmos to run integration tests against the source code of azure-cosmos
  • sync the change from main to the SB3 branch
  • support Spring Data Commons 3.x
  • support AOT

@saragluna saragluna modified the milestones: 2022-11, Backlog Nov 4, 2022
@saragluna
Copy link
Member

refer to this for how to support saragluna@afcfe95.

@saragluna saragluna removed their assignment Dec 5, 2022
@moarychan moarychan changed the title [FEATURE REQ] Make the Spring Data Cosmos work with Spring Data Common 3 [FEATURE REQ] Spring Data Cosmos supports Spring Boot 3 and Spring Data 3 Dec 11, 2022
@CrawX
Copy link

CrawX commented Feb 7, 2023

so we're targeting to the end of this year.

Is there any chance for a small Azure CosmosDB customer to expedite this? Like the previous reply, I don't want to be stuck on Spring Boot 2.x until the end of the year and would be looking into alternatives outside of CosmosDB if there is no way. For reference, Spring Boot 3.0.0 went GA on 24th of November last year.

@TheovanKraay
Copy link
Member

We have discussed this and re-prioritized.
We are now targeting H1 this year (by end of June 2023) to support Cosmos DB in Spring Boot 3.

@ehp246
Copy link

ehp246 commented Feb 7, 2023

I say that's moving to the right direction. Thanks.

@nagaraju1692
Copy link

As per the project requirement , I have to migrate spring boot application from Spring boot 2.7.6 to 3.0.0 version.

I have modified the below changes from my existing application.

Changed the java version from java 11 to 17.
I have modified the spring boot starter parent version from 2.7.6 to 3.0.0 version.
I am able to build the application ,While starting the server getting the issue as below.

Issue Description::

APPLICATION FAILED TO START

Description:

Field empRepository in com.example.SpringBootDemo.Service.EmpService required a bean of type 'com.example.SpringBootDemo.repository.EmpRepository' that could not be found.

The injection point has the following annotations:

@org.springframework.beans.factory.annotation.Autowired(required=true)
Action:

Consider defining a bean of type 'com.example.SpringBootDemo.repository.EmpRepository' in your configuration.

Process finished with exit code 1

I am able to replicate this issue , Please find the below repository git hub code.

https://github.com/nagaraju1692/SpringBootDemoCosmosDB

@Netyyyy
Copy link
Member

Netyyyy commented May 8, 2023

As per the project requirement , I have to migrate spring boot application from Spring boot 2.7.6 to 3.0.0 version.

I have modified the below changes from my existing application.

Changed the java version from java 11 to 17. I have modified the spring boot starter parent version from 2.7.6 to 3.0.0 version. I am able to build the application ,While starting the server getting the issue as below.

Issue Description::

APPLICATION FAILED TO START

Description:

Field empRepository in com.example.SpringBootDemo.Service.EmpService required a bean of type 'com.example.SpringBootDemo.repository.EmpRepository' that could not be found.

The injection point has the following annotations:

@org.springframework.beans.factory.annotation.Autowired(required=true) Action:

Consider defining a bean of type 'com.example.SpringBootDemo.repository.EmpRepository' in your configuration.

Process finished with exit code 1

I am able to replicate this issue , Please find the below repository git hub code.

https://github.com/nagaraju1692/SpringBootDemoCosmosDB

Hi @nagaraju1692, thank you for your issue. I saw you still use azure-spring-boot-starter-cosmos which not update anymore, recommend you use spring-cloud-azure-starter-data-cosmos instead, here is the migration guide.

For some reason, spring data cosmos haven't supported Spring Boot 3 yet, you could still use Spring Boot 2.x with spring-cloud-azure-starter-data-cosmos latest version 4.7.0.

BTW, Spring data cosmos support for Spring Boot 3 will be released recently, please pay attention to our latest information when it is published.

@katperi
Copy link

katperi commented May 8, 2023

We have discussed this and re-prioritized. We are now targeting H1 this year (by end of June 2023) to support Cosmos DB in Spring Boot 3.

Is there any update on when CosmosDB will be supported in Spring Boot 3?

@kushagraThapar
Copy link
Member

@katperi - the work is currently in progress and will be done soon. Current ETA is June 2023.

@edgarla
Copy link

edgarla commented Jun 8, 2023

Hi guys, it is June 2023!

Do you have any update on this topic?

is it on track?

@kushagraThapar
Copy link
Member

@edgarla yes, it is on track, will be released in this month's release schedule. will keep you posted once the release is done.

@christian-ehmke
Copy link

Dear team, when do you plan to release the Spring Boot 3.0 support?

@kushagraThapar
Copy link
Member

@christian-ehmke - its on-track and still planned to be released for this month end.
@saragluna can provide the exact timeline of the release.

@jsanmarco
Copy link

jsanmarco commented Jun 26, 2023

Any update on this? Are you guys still on track? what is the ETA?
Thanks,
Juan

@saragluna
Copy link
Member

saragluna commented Jun 26, 2023

Sorry for the late reploy. We are preparing the release this week. It will be out before the end of this month.

@christian-ehmke
Copy link

@kushagraThapar and @saragluna: Are hierarchical partition keys also part of the upcoming release?

@saragluna
Copy link
Member

The Spring Cloud Azure 5.3.0 has been released.

@saragluna
Copy link
Member

@kushagraThapar and @saragluna: Are hierarchical partition keys also part of the upcoming release?

@kushagraThapar could help with this question.

@christian-ehmke
Copy link

@saragluna: ok cool, but what about "com.azure:azure-spring-data-cosmos"?

@saragluna
Copy link
Member

Sorry for didn’t clarify it, the spring data cosmos is managed by spring cloud azure now. Its version is 5.3.0 too. Check this bom file https://repo1.maven.org/maven2/com/azure/spring/spring-cloud-azure-dependencies/5.3.0/spring-cloud-azure-dependencies-5.3.0.pom.

@christian-ehmke
Copy link

@saragluna Thank you so much.
@kushagraThapar can you tell me if "hierarchical partition keys" are available in this release as well. I know this is not release to this issue.

@TheovanKraay
Copy link
Member

@christian-ehmke support for hierarchical partition keys in Spring Data is not included in this release. It is being worked on currently.

@christian-ehmke
Copy link

@christian-ehmke support for hierarchical partition keys in Spring Data is not included in this release. It is being worked on currently.

Thank you for the update! Is there already a release plan/date for this feature?

@TheovanKraay
Copy link
Member

@christian-ehmke support for hierarchical partition keys in Spring Data is not included in this release. It is being worked on currently.

Thank you for the update! Is there already a release plan/date for this feature?

@christian-ehmke no firm date yet, as hierarchical partition keys is not a concept that is part of the core Spring Data framework. So, it will need some API design (and we are in that phase). But, we are working on it. Is this feature a dependency for your current/future development?

@christian-ehmke
Copy link

christian-ehmke commented Jun 28, 2023

@christian-ehmke support for hierarchical partition keys in Spring Data is not included in this release. It is being worked on currently.

Thank you for the update! Is there already a release plan/date for this feature?

@christian-ehmke no firm date yet, as hierarchical partition keys is not a concept that is part of the core Spring Data framework. So, it will need some API design (and we are in that phase). But, we are working on it. Is this feature a dependency for your current/future development?

@TheovanKraay: Yes we are going to use hierarchical partition keys and we plan to use the Spring ecosystem/abstractions to use it. I think we will address this topic again with your representative at our client. Thank you so much for your fast reply!

@kushagraThapar
Copy link
Member

Closing this issue, as spring data cosmos supports spring boot 3 and spring data 3 now, thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring All azure-spring related issues azure-spring-cosmos Spring cosmos related issues. Client This issue points to a problem in the data-plane of the library. Cosmos feature-request This issue requires a new behavior in the product in order be resolved.
Projects
Archived in project
Development

No branches or pull requests