fix: removed the container creation from code, added all the env variable in bicep for local setup#190
Merged
Conversation
feat: Down merge from main to dev
fix: removed the container creation from code to avoid permission issue
chore: added all the environment variable in bicep needed for local setup
Dhruvkumar-Microsoft
requested review from
Avijit-Microsoft,
Prajwal-Microsoft,
Roopan-Microsoft,
Vinay-Microsoft,
aniaroramsft and
marktayl1
as code owners
August 11, 2025 10:13
Roopan-Microsoft
approved these changes
Aug 11, 2025
added 2 commits
August 11, 2025 16:10
docs: Added changes in readme file related to SFI
Prajwal-Microsoft
approved these changes
Aug 11, 2025
Roopan-Microsoft
approved these changes
Aug 11, 2025
Ritesh-Microsoft
pushed a commit
that referenced
this pull request
Oct 10, 2025
fix: removed the container creation from code, added all the env variable in bicep for local setup
|
🎉 This PR is included in version 1.5.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Purpose
This pull request updates how Cosmos DB containers are accessed and initialized in the backend, shifting from creating containers if they don't exist to simply accessing existing ones. It also updates related tests and expands the outputs in the infrastructure Bicep file to expose more resource information.
Backend: Cosmos DB Container Access
cosmosdb.pyto useget_container_clientfor accessing containers, instead of attempting to create them withcreate_container. This simplifies the code and avoids unnecessary creation attempts._get_or_create_containermethod and replaced it with_get_container, which only fetches existing containers.PartitionKeyandexceptionsimports.Tests: Cosmos DB Initialization
cosmosdb_test.pyto mock and assert calls toget_container_clientinstead ofcreate_container, ensuring they align with the new container access logic. [1] [2] [3] [4] [5]Infrastructure: Bicep Outputs
infra/main.bicepto expose resource endpoints, names, and connection strings for Cosmos DB, Azure Blob Storage, OpenAI, AI Agent, and Application Insights, making it easier to access these values from deployment outputs.Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information