feat: Create Pydantic models for Search Pipeline Run API#106
Open
yuechao-qin wants to merge 1 commit intoycq/search-pipeline-run-query-paramsfrom
Open
feat: Create Pydantic models for Search Pipeline Run API#106yuechao-qin wants to merge 1 commit intoycq/search-pipeline-run-query-paramsfrom
yuechao-qin wants to merge 1 commit intoycq/search-pipeline-run-query-paramsfrom
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Feb 24, 2026
Volv-G
reviewed
Feb 25, 2026
Volv-G
approved these changes
Feb 25, 2026
Collaborator
Volv-G
left a comment
There was a problem hiding this comment.
looks good, just 1 question on the design choice
yuechao-qin
commented
Feb 25, 2026
78fdccf to
f7dc9bc
Compare
962d30e to
44babd7
Compare
f7dc9bc to
b5f0ba9
Compare
44babd7 to
e853104
Compare
This was referenced Feb 26, 2026
e853104 to
f0a5c13
Compare
b5f0ba9 to
88b265f
Compare
88b265f to
9a0930e
Compare
f0a5c13 to
b57b335
Compare
Ark-kun
reviewed
Mar 3, 2026
Ark-kun
reviewed
Mar 3, 2026
Ark-kun
reviewed
Mar 3, 2026
Ark-kun
reviewed
Mar 3, 2026
b57b335 to
9fc3134
Compare
9a0930e to
fdbdc71
Compare
morgan-wowk
approved these changes
Mar 5, 2026
Collaborator
morgan-wowk
left a comment
There was a problem hiding this comment.
Reviewed thoroughly. Nice job
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.

TL;DR
Added a new
filter_queryparameter to the pipeline runs API with Pydantic validation models, while maintaining backward compatibility with the existingfilterparameter.What's new?
JSON definition for
filter_query:{ // logical (any predicate) "<and|or>": [ // leaf {"key_exists": {"key": "<KEY>"}}, // leaf {"value_contains": {"key": "<KEY>", "value_substring": "<VALUE>"}}, // leaf {"value_in": {"key": "<KEY>", "values": ["<V1>", "<V2>", "..."]}}, // leaf {"value_equals": {"key": "<KEY>", "value": "<VALUE>"}}, // leaf {"time_range": {"key": "system/pipeline_run.date.created_at", "start_time": "<START_DATE>", "end_time": "<END_DATE>"}}, // logical (leaf only) {"not": {"<LEAF_PREDICATE>": {}}}, // logical (any predicate) {"<and|or>": [...]}, ... ] }Example JSON for
filter_query:{ "and": [ {"key_exists": {"key": "team"}}, {"value_equals": {"key": "env", "value": "prod"}}, {"value_in": {"key": "region", "values": ["us-east", "us-west", "eu-west"]}}, {"not": {"key_exists": {"key": "deprecated"}}}, {"or": [{"value_contains": {"key": "name", "value_substring": "nightly"}}]} ] }What changed?
API
GET /api/pipeline_runs/Functional
filter_queryif used in API will return an HTTP 501 (unimplemented error)filterorfilter_query(mutual exclusive) can be in the API, else it returns a HTTP 422.Other
filter_queryparameter toListPipelineRunsParamsthat accepts structured JSON queriesfilter_query_models.pyfor validating filter queries, including:key_exists,value_equals,value_contains,value_in,time_rangeand,or,notfilter_querywith proper error handlingHow to test?
filter_queryparameter with valid JSON structures like{"and": [{"key_exists": {"key": "team"}}]}filterandfilter_querysimultaneously returns a 422 errorfilter_querytriggers proper validation errorsfilter_queryusage returns a 501 "not yet implemented" responseWhy make this change?
This PR introduces the Pydantic models and API wiring that upstream PRs depend on to implement the Search Pipeline Run API.