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

Cosmos partitioning #1282

Merged
merged 19 commits into from
Oct 14, 2019
Merged

Conversation

mdrichardson
Copy link
Contributor

Fixes #1234

Description

Parity with Dotnet, adding a separate class for supporting Partitioned Containers on Cosmos.

Specific Changes

  • The new implementation no longer handles database creation. We only handle container creation.
  • Uses the new @azure/cosmos SDK
  • Implements partitioning for the user, with the option to pass in a key now gone. We utilize the ID of the item as the partition key.

Also implements these additional changes from the Dotnet PR

Testing

Added new, separate tests.

image

On a side note: I plan to eventually create a StorageBaseTests class for the JS repo, so we remove a lot of the duplicate code. Wanted to get this out for 4.6, though.

@mdrichardson
Copy link
Contributor Author

mdrichardson commented Oct 9, 2019

Note: Currently figuring out how to make the tests record so that the build passes. Got it.

Copy link
Contributor

@christopheranderson christopheranderson left a comment

Choose a reason for hiding this comment

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

I have some suggestions, but overall looks good. 👍

@mdrichardson
Copy link
Contributor Author

@christopheranderson Great feedback! I should be able to fix those tomorrow.

@coveralls
Copy link

coveralls commented Oct 9, 2019

Pull Request Test Coverage Report for Build 83263

  • 58 of 65 (89.23%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 86.958%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botbuilder-azure/src/cosmosDbPartitionedStorage.ts 57 64 89.06%
Totals Coverage Status
Change from base Build 83258: -0.02%
Covered Lines: 4801
Relevant Lines: 5306

💛 - Coveralls

@cleemullins
Copy link
Contributor

Please merge when ready.

@mdrichardson
Copy link
Contributor Author

@cleemullins Will do. Implementing @christopheranderson's recommendations now and will merge once build tests passes.

However, coveralls test coverage won't allow merge. I believe the issue is that most of the tests don't actually run since there's no Storage Emulator. Is that something we can bypass? ...I don't believe any of the JS storage tests actually run the read/write/deletes in the pipeline tests.

@garypretty
Copy link
Contributor

@mdrichardson @christopheranderson Let's discuss handling non partitioned etc tomorrow when you get online. I have some specific thoughts here.

@mdrichardson mdrichardson changed the title Cosmos partitioning [DNM: Fixing Test Recordings] Cosmos partitioning Oct 10, 2019
@mdrichardson mdrichardson changed the title [DNM: Fixing Test Recordings] Cosmos partitioning Cosmos partitioning Oct 11, 2019
@mdrichardson mdrichardson merged commit 7063d85 into microsoft:master Oct 14, 2019
@mdrichardson mdrichardson deleted the cosmosPartitioning branch October 14, 2019 18:58
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.

Port new CosmosDB Partitioned Storage from C#
5 participants