-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Description
The GET /api/published_components/ endpoint currently supports only basic substring matching (name_substring, published_by_substring). To support the new homepage Components tab (TangleML/tangle-ui#1963) with filtering comparable to the pipeline runs list, the endpoint needs richer filtering capabilities.
Current state
| Param | Type | Description |
|---|---|---|
name_substring |
string |
Case-insensitive name match |
published_by_substring |
string |
Case-insensitive publisher match |
digest |
string |
Exact digest match |
include_deprecated |
bool |
Include deprecated components |
No support for combining filters, boolean logic, input/output search, or date filtering.
Proposed changes
Phase 1: Extend simple query params
Add these additional query parameters to the existing endpoint:
| Param | Type | Description |
|---|---|---|
description_substring |
string | null |
Case-insensitive search in component description |
input_name_substring |
string | null |
Search across component input names |
output_name_substring |
string | null |
Search across component output names |
input_type_substring |
string | null |
Search across component input types |
output_type_substring |
string | null |
Search across component output types |
This matches the frontend's existing search filter options (Name, Input Name, Input Type, Output Name, Output Type) which are currently performed client-side only.
Phase 2 (future): filter_query support
Adopt the same filter_query JSON predicate system used by GET /api/pipeline_runs/ with component-specific system keys:
system/component.name— ValueContains, ValueEqualssystem/component.description— ValueContainssystem/component.published_by— ValueContains, ValueEqualssystem/component.deprecated— ValueEqualssystem/component.input_names— ValueContainssystem/component.output_names— ValueContains
This is a larger effort and can be deferred. Phase 1 covers the immediate needs.
Implementation notes
- Input/output names and types are stored inside the component spec (YAML/JSON blob in the
componenttable) - For Phase 1, consider denormalizing searchable fields (description, input names, output names) to columns on
PublishedComponentRowor using JSON column queries - Alternatively, query the
component.specJSON column directly (depends on DB engine support)
Relevant files
component_library_api_server.py—PublishedComponentService.list()methodbackend_types_sql.py—PublishedComponentRowandComponentmodels