microsoft / microsoft/vscode-documentdb
Remove one-time cleanup of legacy `activeDiscoveryProviderIds` globalState key (~6 months after 0.9.2)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Description
Background
The pre-0.9.0 Service Discovery visibility model used an opt-in allow-list stored in the activeDiscoveryProviderIds globalState key. Since v0.9.0 the model is an opt-out deny-list (hiddenDiscoveryProviderIds) and the legacy key is no longer read (see src/services/discoveryProviderVisibility.ts).
The upgrade is intentionally non-migrated (opt-in → opt-out; documented inline), but the legacy key was left behind as dead data. To clean it up, PR #832 (milestone 0.9.2) added a one-time, best-effort cleanup that deletes the stale key on activation.
What to do (this issue)
Once the vast majority of users have upgraded past 0.8.x — target a release ~6 months out (around early 2027) — remove the temporary cleanup so it doesn't run forever:
- Delete
removeLegacyActiveDiscoveryProviderIds()insrc/services/discoveryProviderVisibility.ts. - Remove its call in
ClustersExtension.registerDiscoveryServices()(src/documentdb/ClustersExtension.ts). - Remove the
LEGACY_ACTIVE_DISCOVERY_PROVIDER_IDS_KEYconstant and any dedicated test.
Context
- Cross-version upgrade behavior and the deliberate no-migration decision are documented in
discoveryProviderVisibility.ts. - Introduced by #832.
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
Read the upgrade notes and cleanup implementation in src/services/discoveryProviderVisibility.ts, then inspect ClustersExtension.registerDiscoveryServices() in src/documentdb/ClustersExtension.ts. Remove the temporary cleanup call, function, constant, and dedicated test described in the issue. Run the relevant test suite and verify no references to the legacy key remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100