Skip to content

Fix Cosmos DB local debugging#4340

Merged
marrobi merged 8 commits into
microsoft:mainfrom
marrobi:marrobi/add-cosmos-data-contributor
Feb 17, 2025
Merged

Fix Cosmos DB local debugging#4340
marrobi merged 8 commits into
microsoft:mainfrom
marrobi:marrobi/add-cosmos-data-contributor

Conversation

@marrobi

@marrobi marrobi commented Feb 7, 2025

Copy link
Copy Markdown
Member

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.

@github-actions

github-actions Bot commented Feb 7, 2025

Copy link
Copy Markdown

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

@RonShakutai RonShakutai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread devops/scripts/setup_local_debugging.sh
@marrobi

marrobi commented Feb 17, 2025

Copy link
Copy Markdown
Member Author

/test

@github-actions

Copy link
Copy Markdown

🤖 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

marrobi commented Feb 17, 2025

Copy link
Copy Markdown
Member Author

@github-actions

Copy link
Copy Markdown

🤖 pr-bot 🤖

✅ Marking tests as complete (for commit 5bb2154)

(in response to this comment from @marrobi)

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.

4 participants