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 DB - AddAzureClientsCore should be called during registration #742

Merged
merged 5 commits into from
Sep 8, 2021

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Sep 1, 2021

Current preview build expects users to register and call AddAzureClientsCore during webjob initialization, this can be moved to be part of the Cosmos DB Extension registration.

We also detected that binding types int? do not work on runtime.

And if a user was trying to customize the ICosmosDBSerializerFactory, current code was only working if the customization happened after the AddCosmosDB call because we were registering the default implementation with AddSingleton instead of TryAddSingleton, the tests did not catch it because the order on which they were written. The PR contains the fix plus new test coverage.

Closes #741
Closes #743

@ealsur ealsur requested a review from brettsam September 1, 2021 16:54
@ealsur ealsur self-assigned this Sep 1, 2021
@ealsur ealsur merged commit 42a6dfa into Azure:dev Sep 8, 2021
@ealsur ealsur deleted the users/ealsur/leaseconnection branch September 8, 2021 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants