FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[SDK][Bot-Azure] Add CosmosDbPartitionedStorage component by VictorGrycuk · Pull Request #1024 · microsoft/botbuilder-java · GitHub

This repository was archived by the owner on Dec 4, 2023. It is now read-only.
/ botbuilder-java Public archive

[SDK][Bot-Azure] Add CosmosDbPartitionedStorage component - #1024

Merged
tracyboehrer (tracyboehrer) merged 7 commits into
microsoft:mainfrom
southworks:internal/southworks/CosmosDBPartitionedStorage/base
Feb 26, 2021
Merged

[SDK][Bot-Azure] Add CosmosDbPartitionedStorage component#1024
tracyboehrer (tracyboehrer) merged 7 commits into
microsoft:mainfrom
southworks:internal/southworks/CosmosDBPartitionedStorage/base

Conversation

Copy link
Copy Markdown
Contributor

Fixes #739

Description

Implements support for CosmosDbPartitionedStorage class and its tests.

Specific Changes

Adds the following classes:

  • CosmosDbPartitionedStorage
  • CosmosDbPartitionedStorageOptions
  • CosmosDbKeyEscape
  • Updates the pom.xml file with the necessary dependencies
  • Adds the necessary tests for the CosmosDbPartitionedStorage and CosmosDbKeyEscape classes

Testing

Unit tests of bot-azure passing correctly

mvn clean install passing correctly

Copy link
Copy Markdown
Contributor Author

tracyboehrer (@tracyboehrer) we noticed that the build is failing, most likely due to the bot-azure tests.

Those unit tests contain the following requirements to be executed:

  1. CosmosDbEmulator application:
    1. On BotBuilder-DotNet we found a commented configuration for starting CosmosDBEmulator that was added in Add 2 YAML builds for DotNet CI botbuilder-dotnet#3115. Then disabled in PR make running storage emulators disabled on build server botbuilder-dotnet#3815 because of unreliability due to time-outs. Finally re-enabled in microsoft/botbuilder-dotnet#3816 to find a solution.
    2. On BotBuilder-JS we found a cmd file that initializes the CosmosDbEmulator as a preparation of the tests, as indicates this document.
  2. CosmosDbEmulator certificates: after starting the emulator and running the unit tests for CosmosDbPartitionedStorage we go the following message:

javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This is because Java needs the CosmosDbEmulator certificate in its cacert. We solved this by following this guide, which basically involves exporting the CosmosDbEmulator certificate, and importing it to the Java cacert repository.

We don't have permissions to analyze the build pipeline, however, let us know if you need help from our side for this 😊.

Copy link
Copy Markdown
Contributor Author

tracyboehrer (@tracyboehrer) we removed the following files as they are generated during the build:

  • DocumentDB.Spatial.Sql.dll
  • Microsoft.Azure.Documents.ServiceInterop.dll

We noticed that the .gitignore is missing a configuration for these files. Do you want us to add an entry in the configuration to ignore these binaries?

tracyboehrer (tracyboehrer) commented Feb 26, 2021
edited
Loading

Copy link
Copy Markdown
Member

Victor Grycuk (@VictorGrycuk) So these unit tests require the cosmosdb emulator and that appears to be why the PR build is failing. I need to look into how DotNet is dealing with this.

Copy link
Copy Markdown
Member

Victor Grycuk (@VictorGrycuk) For the time being, I disabled running one of the unit tests for this in DevOps. This isn't a permanent solution, but we'll have to do some more research on our side. If you have the emulator installed, it will still run the unit tests as before. For DevOps, or if you try to run mvn and you DON'T have the emulator installed, you must include the following mvn options:

-Dtest=!CosmosDbPartitionStorageTests* -DfailIfNoTests=false

Not sure I really like this solution, but it does have the advantage of annoying me enough to provide motivation to solve the problem for real.

Martin Battaglino (Batta32) deleted the internal/southworks/CosmosDBPartitionedStorage/base branch March 1, 2021 12:09
This file contains hidden or 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bot-azure, CosmosDBPartitionedStorage

3 participants


Back | FazBrowse Home | New Git URL