Add ability to group pipelines into "folders"#6229
Conversation
…ndependent of deployment status, deprecate 'description' Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
…a' field Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
|
so this is not per user, it's per pipeline manager. |
|
I'm a bit confused why we went with folders when users were asking for tags and in the issue everyone seemed to like tags? |
gz
left a comment
There was a problem hiding this comment.
lets just build the version people asked for (tags) from the beginning no need to confuse users with different models
| @@ -0,0 +1,6 @@ | |||
| -- Add metadata field to the pipeline table. | |||
| -- This is arbitrary, optional text provided by the user. | |||
| ALTER TABLE pipeline ADD COLUMN metadata TEXT NOT NULL DEFAULT ''; | |||
There was a problem hiding this comment.
I don't think it's good to have a catch-all JSON element this. We're already strictly structured, we dont have to switch to the dark side of using unstructured data on top of a relational database.
| pub struct PipelineInfo { | ||
| pub id: PipelineId, | ||
| pub name: String, | ||
| /// Deprecated: use `metadata` instead. |
There was a problem hiding this comment.
I don't think we need to mark it deprecated; nothing has changed we weren't using it before we dont need to use it now?
There was a problem hiding this comment.
I want to discuss this more with Simon once he's back; I think it's benefitial to fold the "description" column into the "metadata" column model I propose here
| && program_config.is_none()) | ||
| ); | ||
|
|
||
| // Metadata-only fast path. `metadata` is a free-form client-side annotation |
There was a problem hiding this comment.
I dont understand how it can be free form and at the same time serve as a web-ui folder structure.
If we use if for that IMO it deserves an well structured field that is reserved for use by webconsole so we dont have arbitrary clients overwriting/using it differently.
The model I am proposing is not "unstructured", it just doesn't bind relational structure to the shape structure for a family of pipeline information fields with similar semantics - they are not used by the backend, not relevant to backend or pipeline deployment lifecycle, only used by the clients - "description", "tags", "path". JSON operations on a small dataset (for the number of pipelines) are fine in Postgres. Are you saying you would prefer a e.g. "tags" column in PipelineDescriptor, with the same semantics as the "metadata" field I added? (can be changed without triggering pipeline version updates, when the pipeline is running)? |
Two points I want to make here:
|
|
The customer did not ask for tags specifically, they listed tags and folders as ways to solve their UX problem. I need to discuss tags with Anna because the feature is not trivial - good location to show and edit tags, and e.g. version can be displayed as another tag, which could improve the design and UX |
|
Whether tags or folders, the feature is likely to be used by tooling around Feldera some of our customers have built, not just web-console |
They see the change immediately - within the polling period of web-console, which is 2 seconds now |
|
What I would like to do is merge this PR with folders as a simpler solution, and then open a separate PR for user-defined tags and search-by-tag. Tags and folders are orthogonal, both are optional, both are useful. |
snkas
left a comment
There was a problem hiding this comment.
My design suggestion for the backend is:
- Adding a pipeline field
tags, of typeVec<String> - Adding a pipeline table field
tagswith typeVARCHAR[]orTEXT[] - The
tagsfield can be edited like any other field usingPATCH /v0/pipelines/<name> - Only tricky part is allowing the tags to be editable while the pipeline is running.
I can get to it sometime mid next week.
Reasoning for my design:
- In future, the backend can potentially filter by tag without having to do JSON parsing
- In future, the tags can still be migrated as the type is known to the database, without having to do JSON operations
- Having a separate
pipeline_tagtable is likely too much as they are always part of the pipeline - Deprecating
descriptionshould be a separate PR - It seems unnecessary to have
metadataas nested, as what is "metadata" is not as well defined, and at least for now besides tags I'm not sure how much more of these fields we would add
The above does assume that we don't support for instance defining colors of tags, as that would require them to become independently management objects with their own API endpoint.
|
Regarding tags vs. nested directory structure: it seems to be most simple to just have tags, as it allows a pipeline to belong to multiple groups, and it is a concept users are already familiar with (e.g., GitHub). Directory structure is also a big departure from the current list. |
|
NACK from me on folders too. Folders are used in environments where there is a natural filesystem hierarchy for projects and a mix of content types (e.g. workspace, catalogs, schemas and separate files for sql like in dbt and other warehouse cloud products). It's not a good fit here. Tags are the most appropriate here. There's many other things in the backlog we should get to first, but let's go through UI design here as well before implementing anything. |
|
I'll remove the folders and make this PR pipeline-manager only. Tags will be waiting for the UI design |
mythical-fred
left a comment
There was a problem hiding this comment.
The backend (pipeline-manager) changes are well-structured and thoroughly tested — the PipelineFieldUpdates struct with exhaustive destructuring is a nice pattern, and the metadata-only fast-path that skips version/refresh_version bumps is well-reasoned.
However, the web-console side adds ~1,060 lines of new behavioral code (DraggableTreeView, PipelineTreeView, SidebarPipelineTreeView, plus the Table.svelte rewrite) with zero tests. This is a hard-rule violation — behavior changes without tests get REQUEST_CHANGES, no exceptions. See inline comments for specifics.
Gerd's concerns about the metadata field design are still open; I won't duplicate them here.
| @@ -0,0 +1,588 @@ | |||
| <script lang="ts" generics="T extends { name: string }"> | |||
There was a problem hiding this comment.
This is 588 lines of new interactive behavior — drag-and-drop, folder creation, folder renaming, expand/collapse state, multi-selection propagation. None of it has tests.
Good first targets for Vitest + @testing-library/svelte:
- Tree-building logic (
ensureFolder,sortNode) — extract into a pure function and unit-test the tree shape for various folder-path inputs. folderCheckState— pure logic over a set; easy to test without DOM.is_metadata_only-style classification on the JS side:parseMetadata,buildMetadata,getFolderPath— these are already pure functions, just not tested.- Component tests: render the tree view with a few items, simulate a drag from one row onto another, assert the
onCreateFolderForcallback fires with the correct arguments.
The recommended stack is Vitest + @testing-library/svelte — runs in Node, no browser, no flake.
| if (!metadata) { | ||
| return {} | ||
| } | ||
| try { |
There was a problem hiding this comment.
DRY: parseMetadata is duplicated here and in Table.svelte (lines ~57-64). Extract it into a shared utility (e.g. $lib/functions/pipelines/metadata.ts) — along with getFolderPath and buildMetadata — so the parsing logic lives in one place and can be unit-tested once.

pipeline-manager changes
The unused
descriptionfield is getting replaced by ametadatafield that is not bound to the pipeline deployment state; it can be used for client to store arbitrary data, such as keys for organizing the pipelines - folder paths and tags.metadatacan be updated when the pipeline is running, it does not triggerversionnorrefresh_versionincrements.web-console changes
The new tree view UI supports intuitive drag&drop actions to organize the pipelines into folders - grab pipeiine by the handle icon on the left, drag one pipeline onto another to create a new folder, drag folder or pipeline into another folder or a scope to move it there.
The new view drops per-column sorting because it does not seem to be very useful, and forces lexicographical ordering of pipelines.
Also added the tree view and search to pipeline edit page for feature parity.
I implemented the folder UI before tags UI because it needs additional UI/UX design; folders are a more straightforward feature. The
metadatafield enables seamlessly adding the tag functionality later.Screencast.from.2026-05-14.02-39-31.webm
Testing: manual