set up ResourceContainer for Flink database and Kafka cluster child resources#3292
Merged
Dave Shoup (shouples) merged 15 commits intomainfrom Mar 10, 2026
Merged
Conversation
4 tasks
d5c9efc to
9b4450d
Compare
4 tasks
4384847 to
2d0df9f
Compare
2d0df9f to
2daefec
Compare
2daefec to
6b8d9b8
Compare
… from ResourceContainer; update tests and createTestResource params
…to models/containers
…n with FlinkDatabaseResourceContainer
…BaseViewProviderData in downstream branch
6b8d9b8 to
ec16f3d
Compare
|
There was a problem hiding this comment.
Pull request overview
Refactors Flink Database container tree-item state management into a reusable ResourceContainer abstract base class, and introduces a Kafka-cluster-oriented container type to support upcoming Topics/Consumer Groups view work.
Changes:
- Added
ResourceContainerbase class to unify loading/error/children state transitions across container TreeItems. - Migrated Flink Database containers to
src/models/containers/and updated the Flink Database view provider + tests to usesetLoading()/setLoaded()/setError(). - Introduced
KafkaClusterResourceContainer(and label enum) plus unit tests, and updated unit-test helpers to support simpler resource creation.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/testResources/base.ts | Makes name optional in test resource helpers and improves fallback searchable text. |
| src/viewProviders/flinkDatabase.ts | Uses new container state transition methods instead of mutating fields directly. |
| src/viewProviders/flinkDatabase.test.ts | Updates tests to use setLoaded() rather than assigning children directly. |
| src/models/flinkDatabaseResourceContainer.ts | Removes the previous Flink-specific container implementation (moved/refactored under containers/). |
| src/models/flinkDatabaseResourceContainer.test.ts | Removes old Flink container tests (replaced by new container tests). |
| src/models/containers/resourceContainer.ts | Adds the new shared container base class encapsulating loading/error/children behavior. |
| src/models/containers/resourceContainer.test.ts | Adds comprehensive unit tests for ResourceContainer state transitions and helper methods. |
| src/models/containers/kafkaClusterResourceContainer.ts | Adds Kafka-cluster flavored container subclass and label enum for Topics view containers. |
| src/models/containers/kafkaClusterResourceContainer.test.ts | Adds unit tests validating constructor/id/loggerName behavior for Kafka cluster containers. |
| src/models/containers/flinkDatabaseResourceContainer.ts | Reintroduces Flink DB container as a thin subclass of ResourceContainer. |
| src/models/containers/flinkDatabaseResourceContainer.test.ts | Adds focused constructor tests for the Flink DB container subclass. |
| src/commands/utils/udfRegistration.test.ts | Updates imports to new Flink container location and tightens a Kafka cluster type import. |
| src/commands/flinkDatabaseView.ts | Updates imports to the new Flink container module path. |
| src/commands/flinkDatabaseView.test.ts | Updates imports to the new Flink container module path. |
| src/commands/flinkArtifacts.test.ts | Updates imports to the new Flink container module path. |
James Robinson (jlrobins)
approved these changes
Mar 10, 2026
Contributor
James Robinson (jlrobins)
left a comment
There was a problem hiding this comment.
Looks like a good step towards being able to simplify complex views like FlinkDatabaseViewProvider into managing a list of per-element-type containers that then know the per-element-type smarts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary of Changes
This PR takes most of the state management that
FlinkDatabaseResourceContainerhandled to extend into aResourceContainerabstract base class, allowing a Kafka cluster flavored version that will be used in a downstream branch for "Consumer Group" and "Topics" containers.Closes #3230
Associated PRs
ResourceContainerfor Flink database and Kafka cluster child resources #3292 👈Optional: Any additional details or context that should be provided?
While this seems like backpedaling from removing the
ContainerTreeItem, the new abstract class helps with icon and context value transitions instead of effectively being aTreeItemwith a searchablechildrenarray.Pull request checklist
Please check if your PR fulfills the following (if applicable):
Tests
Release notes