Skip to content

Clarify local emulator connection message and prompt - #300

Merged
Mike Krüger (mkrueger) merged 2 commits into
mainfrom
dev/mkrueger/fix/emulator-connection-label
Nov 17, 2026
Merged

Mike Krüger (mkrueger) merged 2 commits into
mainfrom
dev/mkrueger/fix/emulator-connection-label

Conversation

@mkrueger

@mkrueger Mike Krüger (mkrueger) commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Identify local Cosmos DB emulator connections by their endpoint rather than the emulator-returned account ID (such as cosmosdev).
  • Show emulator in the interactive prompt instead of 127 or localhost, including database and container scopes.
  • Preserve cloud account labels and update the localization catalog and navigation documentation.

Validation

  • Shell and test projects built successfully with no warnings or errors using a separate output directory because a running shell locks the default executable.
  • All 44 focused connection/prompt tests passed, including the process-level emulator connection regression.
  • Localization catalog verification and git diff --check passed.
  • The process-level emulator connection test passed against the local emulator.

Scope

This does not address the separate missing-command-output issue from the screenshot. No breaking changes or migration steps.

Backport

Backport to rel/1.2: #301. Merge this PR first, then the backport.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues were identified for the emulator connection-labeling changes.

No open issues 🎉

What changed in this PR

Clarifies how the shell identifies local Cosmos DB emulator connections while preserving cloud account labels.

Changes:

  • Shows the emulator endpoint in connection success messages and emulator in prompts across account, database, and container scopes.
  • Adds regression tests for emulator labels and unchanged cloud account behavior.
  • Updates localized messages, the localization catalog, and navigation documentation.
File Description
l10n/​CosmosDBShell.json Adds the emulator connection message to the catalog.
docs/​navigation.md Documents emulator connection messages and prompt labels.
CosmosDBShell/​lang/​en.ftl Defines the localized emulator connection message.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​ShellInterpreter.cs Selects connection success messages based on the endpoint.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​CosmosShellPrompt.cs Uses emulator for local emulator prompt labels.
CosmosDBShell.Tests/​Shell/​CosmosShellPromptTests.cs Tests emulator and cloud labels across connected scopes.
CosmosDBShell.Tests/​CommandTests/​ConnectCommandTests.cs Tests emulator endpoint messages and preserved cloud messages.

Review effort: Balanced

@github-code-quality

github-code-quality Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

main be6892a dev/mkrueger/fix/emu... cf422ce +/-
75% 75% 0%
View coverage of the 2 most impacted files.
File main be6892a dev/mkrueger/fix/emu... cf422ce +/-
D:\a\CosmosDBSh...lInterpreter.cs 80% 80% 0%
D:\a\CosmosDBSh...sShellPrompt.cs 55% 60% +5%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 17, 2026 12:34 UTC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 12:25
Mike Krüger (mkrueger) added a commit that referenced this pull request Nov 17, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit cf422ce)

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.

🟢 Approval recommended

The emulator connection-message and prompt-label changes have no active review issues.

No open issues 🎉

Review effort: Balanced

@mkrueger
Mike Krüger (mkrueger) enabled auto-merge (squash) November 17, 2026 12:35
@mkrueger
Mike Krüger (mkrueger) merged commit cbfbd31 into main Nov 17, 2026
13 checks passed
@mkrueger
Mike Krüger (mkrueger) deleted the dev/mkrueger/fix/emulator-connection-label branch November 17, 2026 12:41
Mike Krüger (mkrueger) added a commit that referenced this pull request Nov 17, 2026
* Clarify local emulator connection message and prompt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit f40607a)

* Update emulator connection integration test expectation for #300

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit cf422ce)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants