feat: Annotation search for Pipeline Runs#70
Open
yuechao-qin wants to merge 6 commits intoTangleML:masterfrom
Open
feat: Annotation search for Pipeline Runs#70yuechao-qin wants to merge 6 commits intoTangleML:masterfrom
yuechao-qin wants to merge 6 commits intoTangleML:masterfrom
Conversation
Contributor
|
Ark-kun
reviewed
Jan 29, 2026
| | false | false | EXISTS(key='X' AND value='Y') | Has X=Y | | ||
| | false | true | EXISTS(key='X' AND value!='Y') | Has X with value not Y | | ||
| | true | false | NOT EXISTS(key='X' AND value='Y') | Doesn't have X=Y | | ||
| | true | true | NOT EXISTS(key='X' AND value='Y') | Same (value.negate ignored) | |
Contributor
There was a problem hiding this comment.
Same (value.negate ignored)
I consider this to be a code smell.
I do not mean that you have to change the behavior here. Rather I think that this might indicates a problem with the approach.
| class ListPipelineJobsResponse: | ||
| pipeline_runs: list[PipelineRunResponse] | ||
| next_page_token: str | None = None | ||
| debug_where_clause: str | None = ( |
Collaborator
Author
|
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.
TODO
Description
Closes #45
Implemented a new API to search annotations for runs.
Background
Annotations are
key-valuepairs. The following examples of annotations (e.g.key = value):env=productionteam=backendThis PR allows searches for key/value strings.
Features
/api/pipeline_runs/) to search key/value in annotations.(key=key1 and value=value1) or (key=key2 and value=value2)(key=key1 and value=value1) and (key=key2 and value=value2)Use Cases and Examples
1. Key equals a string
Find runs where annotation key equals "environment":
{"annotation_filters": [{"key": {"operator": "equals", "text": "environment"}}]}2. Key equals string AND value in set
Find runs where key equals "environment" AND value is "prod" or "staging":
{ "annotation_filters": [ { "key": {"operator": "equals", "text": "environment"}, "value": {"operator": "in_set", "texts": ["prod", "staging"]} } ] }3. Complex: (key equals AND value contains) AND key NOT contains
Find runs where (key equals "environment" AND any value contains "prod") AND key NOT contains "team":
{ "operator": "and", "annotation_filters": [ { "key": {"operator": "equals", "text": "environment"}, "value": {"operator": "contains", "text": "prod"} }, {"key": {"operator": "contains", "text": "team", "negate": true}} ] }Test Plan
uv run pytest tests/test_pipeline_run_search.py -v/api/pipeline_runs/<ID>/annotations/<KEY>/)/api/pipeline_runs/<ID>/annotations/)/api/pipeline_runs/search/)Video of E2E Testing
Screen.Recording.2026-01-28.at.1.18.33.PM.mov