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

Fix Cosmos DB local debugging #4340

Merged
merged 8 commits into from
Feb 17, 2025

Conversation

marrobi
Copy link
Member

@marrobi marrobi commented Feb 7, 2025

Introduce functionality to assign the Cosmos DB Built-in Data Contributor role when configuring local debugging to so that cosmos data can be read.

Always use Entra ID credentials unless a key is manually specified.

Copy link

github-actions bot commented Feb 7, 2025

Unit Test Results

608 tests   608 ✅  6s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 5bb2154.

♻️ This comment has been updated with latest results.

@marrobi marrobi marked this pull request as ready for review February 13, 2025 17:21

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • devops/scripts/setup_local_debugging.sh: Language not supported
Comments suppressed due to low confidence (3)

api_app/api/dependencies/database.py:29

  • The removal of the dynamic key fetching logic using CosmosDBManagementClient means that the key must always be available in the configuration. This could cause issues if the key is not provided.
if STATE_STORE_KEY:

api_app/api/dependencies/database.py:47

  • The removal of the MANAGED_IDENTITY_CLIENT_ID check might affect the behavior if the managed identity is required but not explicitly checked.
credential = await get_credential_async()

api_app/api/dependencies/database.py:29

  • Ensure that the new connection logic, especially the use of STATE_STORE_KEY and managed identity, is covered by tests.
if STATE_STORE_KEY:
@marrobi marrobi changed the title Local Debugging: Cosmos DB Data Contributor role assignment Fix Cosmos DB local debugging Feb 13, 2025
Copy link
Collaborator

@ShakutaiGit ShakutaiGit left a comment

Choose a reason for hiding this comment

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

LGTM

@marrobi
Copy link
Member Author

marrobi commented Feb 17, 2025

/test

Copy link

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/13367437668 (with refid 19491064)

(in response to this comment from @marrobi)

@marrobi marrobi enabled auto-merge (squash) February 17, 2025 10:55
@marrobi
Copy link
Member Author

marrobi commented Feb 17, 2025

Copy link

🤖 pr-bot 🤖

✅ Marking tests as complete (for commit 5bb2154)

(in response to this comment from @marrobi)

@marrobi marrobi merged commit 71fc2c0 into microsoft:main Feb 17, 2025
12 checks passed
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.

3 participants