Unity catalog explorer#1871
Conversation
| ) { | ||
| this.disposables.push( | ||
| this.connectionManager.onDidChangeState(() => { | ||
| this.catalogsCache = undefined; |
There was a problem hiding this comment.
do we need to clean the childrenCache here as well?
| return cached; | ||
| } | ||
| const result = await loader(); | ||
| this.childrenCache.set(key, result); |
There was a problem hiding this comment.
A transient API blip turns this into a sticky error state that survives until the user manually refreshes that exact node. Detect error/empty results and skip caching, or attach a TTL here.
There was a problem hiding this comment.
Done, skipping caching results with error nodes
| schemaName: string | ||
| ): Promise<UnityCatalogTreeNode[]> { | ||
| const [tablesResult, volumesResult, functionsResult, modelsResult] = | ||
| await Promise.allSettled([ |
There was a problem hiding this comment.
For workspaces with thousands of tables in a schema this is a heavy initial load, and loadSchemaChildren (loaders.ts:107) fires four such drains in parallel before the user sees anything. Consider adding a max-items cap with a "load more" sentinel
| "databricks.unityCatalog.showDetail", | ||
| showDetail | ||
| ), | ||
| treeView.onDidChangeSelection(async (event) => { |
There was a problem hiding this comment.
Performance concern for big catalogs:
Selection auto-opens the detail panel on every keyboard arrow — onDidChangeSelection fires on every focus change, not just clicks. Arrow-key browsing through a large tree will repeatedly create + post to the webview, and on schema/table selection will kick off loadNodeEnrichments (4 parallel API calls each). Consider gating this on an explicit user action or introduce a debounce.
| } | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| const stored: StoredFavoriteNode = {...node} as StoredFavoriteNode; |
There was a problem hiding this comment.
This will carry stale metadata as it deep-copies the whole node and stores it in workspace state.
Owner/comment/format/storageLocation will silently age until the table is re-fetched; renamed or deleted favorites will display indefinitely. Store only {kind, fullName, version?} and rehydrate from a fresh fetch when the Favorites root is expanded.
There was a problem hiding this comment.
I haven't found API for loading UC resources in bulk by fullnames, meaning if we rehydrate from a fresh fetch it will be N calls (where N is the number of pinned/favorite nodes). this might not be an issue, assuming most users might have 2-5 favorite resources
| }>; | ||
| } | ||
|
|
||
| async function loadChildrenForNode( |
There was a problem hiding this comment.
Does this re-implement loaders.ts:loadSchemaChildren for the no-cache path? Consider deduplicating; otherwise the two implementations will drift
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Changes
Unity Catalog Features
Tree View
filterOnType)Node Types
Context Menu Actions
catalog.schema.table) for all nodes; copies just column name for columnsToolbar
Error Handling
Tests
UnityCatalogTreeDataProvider.test.ts