Introduce "Service Discovery" for MongoDB (RU) resources#245
Merged
Conversation
Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Introduce "Service Discovery" for MongoDB (RU) resources
Introduce "Service Discovery" for MongoDB (RU) resources
Sep 5, 2025
…unt in discovery view
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
tnaum-ms
approved these changes
Sep 5, 2025
sajeetharan
previously approved these changes
Sep 5, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces Service Discovery for Azure Cosmos DB MongoDB Request Unit (RU) provisioned accounts, creating a new discovery provider alongside the existing vCore provider. The implementation provides a complete discovery mechanism that allows users to discover and connect to RU MongoDB resources through the VS Code extension's Discovery View.
- Adds dedicated Azure Cosmos DB MongoDB (RU) discovery provider with RU-specific Azure APIs
- Refactors shared Azure wizard components into reusable modules
- Updates provider IDs and telemetry for better distinction between vCore and RU resources
Reviewed Changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/tree/discovery-view/DiscoveryBranchDataProvider.ts |
Adds auto-promotion logic for new RU provider and legacy provider renaming |
src/plugins/service-azure-mongo-ru/ |
New RU discovery provider implementation with tree items, wizard steps, and utilities |
src/plugins/service-azure-mongo-vcore/ |
Updates vCore provider to use refactored shared components and new provider ID |
src/plugins/api-shared/azure/wizard/ |
Refactored shared Azure wizard components for reuse across providers |
src/documentdb/ClustersExtension.ts |
Registers the new RU discovery provider |
l10n/bundle.l10n.json |
Adds localized strings for RU-specific UI elements |
khelanmodi
approved these changes
Sep 5, 2025
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.
This PR implements a new Service Discovery provider for Azure Cosmos DB MongoDB (RU) resources, creating a parallel discovery mechanism alongside the existing vCore provider.
Overview
The implementation adds support for discovering and connecting to Azure Cosmos DB MongoDB Request Unit (RU) provisioned accounts through the VS Code extension's Discovery View. This complements the existing vCore discovery while using RU-specific Azure APIs.
Key Features
Implementation Details
Core Components Added
AzureMongoRUDiscoveryProvider- Main provider class extending the discovery interfaceAzureMongoRUServiceRootItem- Root tree node with Azure sign-in handlingAzureMongoRUSubscriptionItem- Subscription-level resource discoveryMongoRUResourceItem- Individual RU cluster tree items with authenticationSelectRUClusterStep- RU cluster selection wizard stepAzureMongoRUExecuteStep- Connection establishment logicruClusterHelpers- RU-specific credential extraction utilitiesAPI Integration
The key difference from vCore discovery is the Azure API usage:
vCore (existing):
RU (new):
Authentication Flow
RU clusters use connection string-based authentication extracted directly from Azure:
databaseAccounts.get()databaseAccounts.listConnectionStrings()ClustersClientRegistration & Availability
The provider is registered in
ClustersExtension.registerDiscoveryServices()without feature flags, making it immediately available alongside existing discovery options:Quality Assurance
The implementation provides a complete, production-ready discovery mechanism for RU resources that integrates seamlessly with the existing extension architecture.
Fixes #244.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
update.code.visualstudio.comnode /home/REDACTED/work/vscode-documentdb/vscode-documentdb/node_modules/.bin/vscode-test(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.