Problem
Collection View import and export resolve the open collection by locating its CollectionItem in the Discovery View tree cache. This makes a Collection View action depend on the corresponding discovery tree node still existing in the current cached tree.
The lookup starts from a stable clusterId, finds a cached cluster node, then builds and traverses the collection path from that node. It does not rehydrate an unexpanded Discovery hierarchy.
This is a future-work follow-up to #861.
Kubernetes list and tree view switch
Kubernetes supports two renderings beneath a context:
- Tree view: source -> context -> namespace -> cluster
- List view: source -> context -> cluster, with namespace shown in the cluster description
Changing the mode performs a whole Discovery View refresh. That clears the parent and node cache. The same cluster retains a stable clusterId and terminal tree-ID suffix, so lookup works again once its path has been expanded in the newly selected layout.
However, an already-open Collection View can no longer resolve the collection immediately after the switch, because the new tree hierarchy has not yet been recreated and cached. Import and export can therefore fail until the user expands the relevant source, context, and cluster again.
Atlas impact
Atlas is also shipping a list and tree presentation. Its tree cache will be invalidated by equivalent full-tree refreshes, creating the same Collection View cache-lifetime dependency. Atlas additionally needs its stable clusterId to remain resolvable to the rendered cluster node in both modes.
Desired outcome
Collection View actions must not require the target collection to be present in the Discovery tree cache. They should resolve or construct the required operation context from stable identifiers and connection/session state, rather than from a cached CollectionItem.
The replacement design should:
- Support Connections, Azure Resources, Atlas, and Kubernetes discovery sources.
- Work before a discovery hierarchy has been expanded and after a full Discovery View refresh.
- Preserve import/export progress, telemetry, command correlation, and error handling.
- Keep the tree node optional, limited to tree-specific presentation only if needed.
- Define a stable provider contract for resolving a collection from
clusterId, database name, and collection name without relying on cached tree IDs.
Acceptance criteria
- Collection View import and both export actions work after switching Kubernetes between list and tree mode, without re-expanding the discovery hierarchy.
- The same actions work for Atlas in either presentation mode and after a full Discovery View refresh.
- The actions work when the Collection View was opened from a discovery provider but the corresponding cluster node is absent from the cache.
- Focused tests cover the cache-miss path and both Kubernetes layouts.
- Focused tests cover the Atlas layout(s) and stable
clusterId resolution.
Problem
Collection View import and export resolve the open collection by locating its
CollectionItemin the Discovery View tree cache. This makes a Collection View action depend on the corresponding discovery tree node still existing in the current cached tree.The lookup starts from a stable
clusterId, finds a cached cluster node, then builds and traverses the collection path from that node. It does not rehydrate an unexpanded Discovery hierarchy.This is a future-work follow-up to #861.
Kubernetes list and tree view switch
Kubernetes supports two renderings beneath a context:
Changing the mode performs a whole Discovery View refresh. That clears the parent and node cache. The same cluster retains a stable
clusterIdand terminal tree-ID suffix, so lookup works again once its path has been expanded in the newly selected layout.However, an already-open Collection View can no longer resolve the collection immediately after the switch, because the new tree hierarchy has not yet been recreated and cached. Import and export can therefore fail until the user expands the relevant source, context, and cluster again.
Atlas impact
Atlas is also shipping a list and tree presentation. Its tree cache will be invalidated by equivalent full-tree refreshes, creating the same Collection View cache-lifetime dependency. Atlas additionally needs its stable
clusterIdto remain resolvable to the rendered cluster node in both modes.Desired outcome
Collection View actions must not require the target collection to be present in the Discovery tree cache. They should resolve or construct the required operation context from stable identifiers and connection/session state, rather than from a cached
CollectionItem.The replacement design should:
clusterId, database name, and collection name without relying on cached tree IDs.Acceptance criteria
clusterIdresolution.