microsoft / microsoft/vscode-documentdb
Remove legacy Local Emulators tree and storage zone
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
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
emulatorConfigurationis retained for local TLS behavior. - The copied records use
storageZone: Clusters, so normal folder/path reconstruction works. LocalEmulatorsItemis hidden only after migration completes.- Original Emulator-zone records are intentionally retained as rollback data.
The old architecture still remains:
StorageZone.Emulators/ConnectionType.Emulatorsare public storage variants.LocalEmulatorsItemand 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
localEmulatorspath 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
- Define the final migration/removal policy for original Emulator-zone data, including upgrade and rollback expectations.
- Ensure migration is durable and idempotent for all existing records, folders, secrets, auth configuration, and deep-link races.
- Route every new local connection to
StorageZone.Clustersregardless of migration state. - Remove
LocalEmulatorsItem, its empty-state action, and Emulator-specific folder creation/navigation. - Remove Emulator-zone branches from rename, move, update credentials, update connection string, delete, reveal, URI handling, and duplicate detection.
- Remove
StorageZone.Emulators/ deprecatedConnectionType.Emulatorsonce no persisted compatibility read is required. - Simplify connection presentation and TLS behavior to depend on
emulatorConfiguration, not storage location. - Remove obsolete migration flags and rollback code when the supported upgrade window permits it.
- 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.
emulatorConfigurationremains 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing migration handling, startup and tree-empty checks, and all command paths involving StorageZone.Emulators, ConnectionType.Emulators, and LocalEmulatorsItem. Review the focused migration tests for empty, successful, partial/retry, folder-flattening, and concurrent/deep-link cases; done means local connections use Clusters with emulatorConfiguration and the legacy tree and obsolete Emulator-zone branches are removed or explicitly bounded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- databases, devtools
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100