-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Enhancing CosmosTemplate to Support Multi-Tenancy at a DB Level #32516
Merged
trande4884
merged 25 commits into
Azure:main
from
trande4884:trande_databaseMultiTenant
Dec 21, 2022
Merged
Enhancing CosmosTemplate to Support Multi-Tenancy at a DB Level #32516
trande4884
merged 25 commits into
Azure:main
from
trande4884:trande_databaseMultiTenant
Dec 21, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…late. With this updated CosmosFactory so that it can be extended to achieve Multi-Tenancy at the database level. The test case was updated also.
kushagraThapar
requested changes
Dec 13, 2022
...azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java
Outdated
Show resolved
Hide resolved
...azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java
Show resolved
Hide resolved
...-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactory.java
Outdated
Show resolved
Hide resolved
...-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactory.java
Show resolved
Hide resolved
…iveCosmosTemplate and adding sample to ReadMe.
trande4884
requested review from
FabianMeiswinkel,
backwind1233,
chenrujun,
hui1110,
Netyyyy,
saragluna,
stliu,
yiliuTo,
xinlian12,
moarychan,
aayush3011,
simorenoh,
fangjian0423,
jeet1995 and
Pilchie
as code owners
December 13, 2022 22:11
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
kushagraThapar
approved these changes
Dec 16, 2022
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/check-enforcer override |
billwert
pushed a commit
to billwert/azure-sdk-for-java
that referenced
this pull request
Jan 4, 2023
…e#32516) * Proof of concept that we can write to two databases from the same session. * Improving the changes to CosmosTemplate and the test case. * Moving default setNameAndCreateDatabase() logic into CosmosTemplate. * Improving unit test. * Changing function name to be a more accurate description of the functionality. * Updating changelog * Removing unused imports. * Code cleanup. * Refactoring CosmosTemplate to now store the CosmosFactory on the template. With this updated CosmosFactory so that it can be extended to achieve Multi-Tenancy at the database level. The test case was updated also. * Updating changelog. * Making the requested updates in the PR. Adding CosmosFactory to ReactiveCosmosTemplate and adding sample to ReadMe. * Making updates for PR comments. * Fixing updates to unit test. * Fixing readme * Adding file needed for readme. * Fixing snippet for readme. * Fixing snippet for readme. * Updating readme. * Adding javadoc. * Fixing unit test. * Testing. * Testing breaking out setup to be before unit test runs. * Renaming file. * Adding new test config for MultiTenantDB test. * Adding cleanup to unit test.
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for multi-tenancy at a DB level via the CosmosFactory. There is a test case added which shows how the user can extend CosmosFactory and override getDatabaseName() in order to dynamically set the DB being used by CosmosTemplate and repositories when making calls. Integration test coverage was added for this new feature.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines