fix - passing None as data account should be handled gracefully#44939
Merged
simorenoh merged 7 commits intohotfix/azure-cosmos_4.14.4from Feb 4, 2026
Merged
fix - passing None as data account should be handled gracefully#44939simorenoh merged 7 commits intohotfix/azure-cosmos_4.14.4from
simorenoh merged 7 commits intohotfix/azure-cosmos_4.14.4from
Conversation
Member
Author
|
/azp run python - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
simorenoh
approved these changes
Jan 30, 2026
Co-authored-by: Simon Moreno <30335873+simorenoh@users.noreply.github.com>
Member
Author
|
/azp run python - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* Remove ApiKey usage * Add -TestAuth flag to verify Bearer token authentication * TEMP: Enable TestAuthOnly for pipeline testing * Remove testing logs * Additional clean up * Keep apikey fallback while migrating * Keep migration to new endpoint * Keep migration to new endpoint * Feedback --------- Co-authored-by: Alitzel Mendez <almend@microsoft.com>
Member
Author
|
/azp run python - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run python - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
simorenoh
approved these changes
Feb 2, 2026
simorenoh
approved these changes
Feb 3, 2026
tvaron3
approved these changes
Feb 3, 2026
Copilot AI
added a commit
that referenced
this pull request
Feb 3, 2026
Co-authored-by: simorenoh <30335873+simorenoh@users.noreply.github.com>
simorenoh
added a commit
that referenced
this pull request
Feb 5, 2026
* Initial plan * Port None handling changes from PR #44939 to main branch Co-authored-by: simorenoh <30335873+simorenoh@users.noreply.github.com> * Update sdk/cosmos/azure-cosmos/CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @simorenoh --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: simorenoh <30335873+simorenoh@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 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.
The _aenter_used flag was introduced in SDK 4.14.2 to optimize the async with pattern. It tracks whether the CosmosClient was initialized using the async context manager (async with CosmosClient(...) as client)
When using async with, the SDK's aenter method fetches the database account before calling force_refresh_on_startup(). The _aenter_used flag tells the SDK "the database account was already fetched, don't fetch it again."
The problem occurs when external code calls force_refresh_on_startup(None) directly: this results in an AttributeError: 'NoneType' object has no attribute '_WritableLocations'