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

Migrate spring data cosmos sample #12563

Closed

Conversation

yiliuTo
Copy link
Member

@yiliuTo yiliuTo commented Jun 28, 2020

This pr migrates a sample of spring-data-cosmosdb to sdk/cosmos/azure-spring-data-cosmosdb/samples.

@yiliuTo yiliuTo requested a review from kushagraThapar as a code owner June 28, 2020 04:38
Copy link
Member

@JimSuplizio JimSuplizio left a comment

Choose a reason for hiding this comment

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

//CC @kushagraThapar
Is this even the correct place to put this? If this is a sample shouldn't it be under sdk/spring/azure-spring-boot-samples with the rest of them? The way this PR is, right now, is not something I want being checked in. sdk/spring samples notwithstanding, this is another thing that's using the spring boot BOM which should not outside of the sdk/spring/azure-spring-boot-samples directory.

Also, what's the difference between this and what's in sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb

@kushagraThapar
Copy link
Member

@JimSuplizio - These set of samples are not related to azure-spring-boot-samples, but rather just a sample set of azure-spring-data-cosmosdb.

The difference between what is present here and what is present is azure-spring-boot-samples is that the latter one uses azure-spring-boot-starter projects as for samples.
Whereas this uses just the azure-spring-data-cosmosdb for the samples project.

That being said, I am also thinking, do we really need the samples project here, or can we have it somewhere else in a central location - like in azure-samples repo: https://github.com/Azure-Samples

@jialindai @yiliuTo @saragluna thoughts ?

@yiliuTo
Copy link
Member Author

yiliuTo commented Jun 30, 2020

Hi @kushagraThapar , I agree with you that this sample is not related with those in azure-spring-boot project, and it's better to be placed here. As for your concern about moving this sample to a central repo, I think reserving this sample here can help guide the use of the azure-spring-data-cosmosdb project. Besides, in this stage of repo migration, how about we focusing on moving this whole spring-data-cosmosdb project to SDK repo first?

@kushagraThapar
Copy link
Member

Hi @kushagraThapar , I agree with you that this sample is not related with those in azure-spring-boot project, and it's better to be placed here. As for your concern about moving this sample to a central repo, I think reserving this sample here can help guide the use of the azure-spring-data-cosmosdb project. Besides, in this stage of repo migration, how about we focusing on moving this whole spring-data-cosmosdb project to SDK repo first?

I agree on moving it as it is. I was wondering whether we should just leave it and not move it at all :) And we can worry about it later.

But since the PR is already opened let's get it in now :)

@JimSuplizio
Copy link
Member

/CC @mitchdenny

Right now, I kind of have a problem with this particular change for the following reasons:

  1. This isn't hooked up to build anywhere
  2. sdk/cosmos/azure-spring-data-cosmosdb/samples/example/pom.xml is using spring-data-cosmosdb-samples as its parent and which is using the spring boot BOM as its parent. Using the spring BOM defeats the centralized versioning and we allowed this for modules under spring because it was contained and, with this, it's no longer contained.
  3. sdk/cosmos/azure-spring-data-cosmosdb/samples/example/pom.xml is also using the current version of spring-data-cosmosdb, along with Include CHANGELOG #2 is going to ultimately cause problem.

@yiliuTo
Copy link
Member Author

yiliuTo commented Jul 1, 2020

Hi @JimSuplizio , for the point 1, I think I should add this sample as an additional module in sdk/cosmos/ci.yml. And for point 2 and 3, what is the meaning of "contained" you mentioned? Besides, since it's a sample project just like those in azure-spring-boot project, I think it's unlikely to be imported as a dependency by other modules in this SDK repo. And from this view, could it be permitted that this sample use spring boot BOM as parent instead of azure-client-sdk-parent?

@JimSuplizio
Copy link
Member

//CC @kushagraThapar @saragluna
This sample should be with the other spring samples under the spring directory, same with the starters and you already have a directories for azure-spring-boot-sample-cosmosdb and azure-spring-boot-starter-cosmosdb there. azure-spring-data-cosmosdb belongs next to cosmos but the samples and starter need to be under sdk\spring.

To be 100% clear, I will not accept any library/sample/starter that parents off of spring-boot-starter-parent outside of the spring subdirectory.

@kushagraThapar
Copy link
Member

@yiliuTo - The way these samples are configured (with pom file hierarchies and taking dependencies on spring-boot-bom) it does not fit the engineering pattern in azure-sdk-for-java.
So we have two options to fix this:

  1. either we fix it in the current PR, which would require some big changes in the sample code (we can discuss that in more detail)
  2. or we close this PR and I can bring back the samples when we move to track 2.

I like the second option better and would like to close this PR.

@JimSuplizio @jialindai @saragluna - let me know your thoughts ?

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

The pom structure needs to be fixed before we get this in.

@jialindai
Copy link
Contributor

Guys, since we don't have one conclusion for the sample location now. I agree with @kushagraThapar that we should close this PR and revisit sample problem after track 2 work (migrate to cosmos sdk v4) which is more important.

@kushagraThapar
Copy link
Member

Guys, since we don't have one conclusion for the sample location now. I agree with @kushagraThapar that we should close this PR and revisit sample problem after track 2 work (migrate to cosmos sdk v4) which is more important.

Thanks @jialindai for your input, @yiliuTo - Please close this PR.

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.

4 participants