Skip to content

Manual localhost connection creation does not detect existing DocumentDB Local entries #858

Closed

Description

Found during the 0.10.0-bug-bash-1 bug bash.

Summary

When a user manually adds a localhost connection, the extension does not check whether it already has a matching DocumentDB Local connection. This allows duplicate entries for the same local service.

Steps to reproduce

  1. Start DocumentDB Local through Local Quick Start so its connection is present in the Connections view.
  2. Manually add a connection that targets the same localhost endpoint.
  3. Complete the connection flow.

Expected

The extension detects the matching DocumentDB Local entry and prevents the duplicate, focuses the existing connection, or clearly asks the user whether to retain a separate configuration.

Actual

A second connection can be added for the same local endpoint.

Impact

Duplicate local connections make the Connections view harder to understand and can lead users to manage the wrong entry.

Suggested fix

Before saving a manually added localhost connection, compare its normalized endpoint with existing DocumentDB Local entries. Account for equivalent host forms such as localhost, 127.0.0.1, and IPv6 loopback where applicable, along with the port and relevant connection options.

Activity

  1. tnaum-ms commented on Aug 4, 2026

    @tnaum-ms
    CollaboratorAuthor

    Additional bug-bash context: checked all issues created on 2026-08-04 and searched existing localhost connection reports. No matching duplicate-detection issue was found. The intended comparison should normalize loopback host aliases and retain enough connection settings to avoid collapsing genuinely different configurations.

  2. added
    bug
    and removed
    bug
    on Aug 4, 2026
  3. tnaum-ms commented on Aug 5, 2026

    @tnaum-ms
    CollaboratorAuthor

    A user might really want to have another connection saved for the 'localhost' connection, so we should allow it. We should have a modal dialog that explains what's happening, and offer actions:

    • open the one in DocumentDB Local,
    • save anyway.
  4. added 4 commits that reference this issue on Aug 6, 2026
    aae1d6e
    08a5318
    f8faa3a
    2803a38
  5. tnaum-ms commented on Aug 6, 2026

    @tnaum-ms
    CollaboratorAuthor

    Fixed by #866, merged into feature/local-quickstart as 2803a38: adding a localhost connection by hand now detects the managed instance and offers Open Existing / Add Anyway / cancel, with normalized loopback host comparison.

    Closing by hand rather than automatically: #866 targeted feature/local-quickstart, not the default branch, so GitHub ignores closing keywords and creates no link. Ships with 0.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions