feat: add filterQuery support to mcp catalog#2283
feat: add filterQuery support to mcp catalog#2283google-oss-prow[bot] merged 5 commits intokubeflow:mainfrom
Conversation
3df3e4c to
bbdbd79
Compare
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
f9d6ac5 to
e1a7c7b
Compare
pboyd
left a comment
There was a problem hiding this comment.
A few nits, but this looks really good.
/lgtm
| RestEntityCatalogModel CatalogRestEntityType = "CatalogModel" | ||
| RestEntityCatalogArtifact CatalogRestEntityType = "CatalogArtifact" | ||
| RestEntityMCPServer CatalogRestEntityType = "MCPServer" | ||
| RestEntityMCPServerTool CatalogRestEntityType = "MCPServerTool" |
There was a problem hiding this comment.
Should these replace the versions in models?
There was a problem hiding this comment.
the other way around 😁
| ApplyListFilters: applyMCPServerToolListFilters, | ||
| IsNewEntity: func(entity models.MCPServerTool) bool { return entity.GetID() == nil }, | ||
| HasCustomProperties: func(entity models.MCPServerTool) bool { return entity.GetCustomProperties() != nil }, | ||
| EntityMappingFuncs: filter.NewCatalogEntityMappings(), |
There was a problem hiding this comment.
Is PreserveHistoricalTimes still needed?
There was a problem hiding this comment.
I think it is, forgot to add it to the server tool. If you mean in general if we need it, I think we do so that if a timestamp is present in the yaml data we keep it
There was a problem hiding this comment.
I just meant for MCPServerToolRepository specifically.
| if err != nil { | ||
| statusCode := http.StatusInternalServerError | ||
| if strings.Contains(fmt.Sprintf("%v", err), "not found") { | ||
| statusCode = http.StatusNotFound | ||
| } else if strings.Contains(fmt.Sprintf("%v", err), "invalid") { | ||
| statusCode = http.StatusBadRequest | ||
| } | ||
| return ErrorResponse(statusCode, err), err | ||
| } |
There was a problem hiding this comment.
Would ErrorToStatus (pkg/api/error.go) help here?
|
|
||
| // FindMCPServers - List MCP servers. | ||
| func (m *MCPCatalogServiceAPIService) FindMCPServers(ctx context.Context, name string, q string, sourceLabel []string, filterQuery string, namedQuery string, includeTools bool, toolLimit int32, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) { | ||
| var err error |
There was a problem hiding this comment.
It's not hurting anything, but this doesn't seem to be needed.
| var err error |
|
|
||
| // FindMCPServerTools - List MCP server tools. | ||
| func (m *MCPCatalogServiceAPIService) FindMCPServerTools(ctx context.Context, serverID string, filterQuery string, pageSize string, orderBy model.OrderByField, sortOrder model.SortOrder, nextPageToken string) (ImplResponse, error) { | ||
| var err error |
There was a problem hiding this comment.
This one too.
| var err error |
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pboyd The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
depends on #2278
This PR introduces enhanced filtering capabilities to the MCP catalog service, allowing users to search and filter catalog items more effectively.
Key Changes:
How Has This Been Tested?
test data
Merge criteria:
DCOcheck)ok-to-testhas been added to the PR.