Skip to content

Remove legacy Local Emulators tree and storage zone #870

Description

Summary

Complete the cleanup started by the DocumentDB Local Quick Start migration. The dedicated Local Emulators tree and Emulators storage zone are retired from the normal post-migration experience, but their records, APIs, commands, and compatibility branches remain in the codebase.

Current state

The one-time migration copies each stored Emulator-zone connection into the regular Clusters zone under the shared Local Connections (Legacy) folder:

  • Migrated connections receive deterministic IDs (legacy_<originalId>).
  • Their emulatorConfiguration is retained for local TLS behavior.
  • The copied records use storageZone: Clusters, so normal folder/path reconstruction works.
  • LocalEmulatorsItem is hidden only after migration completes.
  • Original Emulator-zone records are intentionally retained as rollback data.

The old architecture still remains:

  • StorageZone.Emulators / ConnectionType.Emulators are public storage variants.
  • LocalEmulatorsItem and its nested folder rendering still exist.
  • Startup and tree-empty checks still read the Emulator zone.
  • Local connection creation and several rename/update/move commands still contain Emulator-zone routing.
  • URI handling may still write to the Emulator zone before migration completes.
  • Storage cleanup and tests continue to support both zones.
  • Partial migration exposes the legacy tree, whose synthetic localEmulators path is incompatible with Collection View's current Clusters-only lookup.

Goal

Make regular Clusters storage plus emulatorConfiguration the only persisted model for local connections, and remove the obsolete Local Emulators tree/storage architecture after a safe compatibility window.

Proposed work

  1. Define the final migration/removal policy for original Emulator-zone data, including upgrade and rollback expectations.
  2. Ensure migration is durable and idempotent for all existing records, folders, secrets, auth configuration, and deep-link races.
  3. Route every new local connection to StorageZone.Clusters regardless of migration state.
  4. Remove LocalEmulatorsItem, its empty-state action, and Emulator-specific folder creation/navigation.
  5. Remove Emulator-zone branches from rename, move, update credentials, update connection string, delete, reveal, URI handling, and duplicate detection.
  6. Remove StorageZone.Emulators / deprecated ConnectionType.Emulators once no persisted compatibility read is required.
  7. Simplify connection presentation and TLS behavior to depend on emulatorConfiguration, not storage location.
  8. Remove obsolete migration flags and rollback code when the supported upgrade window permits it.
  9. Update storage contracts, cleanup logic, telemetry, localization, documentation, and tests.

Acceptance criteria

  • Existing local connections upgrade into the regular Connections hierarchy without losing secrets, auth settings, names, or TLS behavior.
  • New local connections never write to an Emulator-specific zone.
  • No Local Emulators synthetic tree node remains.
  • All connection operations use normal Clusters-zone identity and parent-path reconstruction.
  • emulatorConfiguration remains the sole indicator for local/emulator behavior.
  • Emulator-zone APIs and dead compatibility branches are removed, or any temporarily retained read-only migration boundary is explicitly documented with a removal condition.
  • Focused migration tests cover empty, successful, partial/retry, folder-flattening, and concurrent/deep-link cases.

Out of scope

Quick Start managed instances are service-owned and in-memory rather than stored connections. Their Collection View tree resolution should be repaired separately through the Quick Start-owned tree identity/path abstraction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions