Skip to content

refactor: Search pipeline run refactoring and baseline unit tests#105

Open
yuechao-qin wants to merge 1 commit intomasterfrom
ycq/search-pipeline-run-query-params
Open

refactor: Search pipeline run refactoring and baseline unit tests#105
yuechao-qin wants to merge 1 commit intomasterfrom
ycq/search-pipeline-run-query-params

Conversation

@yuechao-qin
Copy link
Collaborator

@yuechao-qin yuechao-qin commented Feb 24, 2026

TL;DR

Refactored the list method in PipelineRunsApiService_Sql to improve code organization and added comprehensive test coverage for pipeline run operations.

What changed?

Functional

None.

Other

  • Extracted filter parsing logic into separate helper functions _resolve_filter_value and _build_filter_where_clauses
  • Moved pipeline run response creation logic into a dedicated _create_pipeline_run_response method
  • Added constants _PAGE_TOKEN_OFFSET_KEY and _PAGE_TOKEN_FILTER_KEY for page token field names
  • Added comprehensive test suite covering listing, filtering, pagination, annotation CRUD operations, and helper functions

How to test?

uv run pytest tests/test_api_server_sql.py

Run the new test suite in tests/test_api_server_sql.py which includes:

  • Tests for listing pipeline runs with various filters and pagination
  • Tests for pipeline name resolution and execution stats inclusion
  • Tests for annotation management (set, delete, list)
  • Tests for filter parsing and page token handling
  • Edge cases like empty results and unsupported filters

Why make this change?

  1. Refactoring upfront — structural changes land here so upstream PR diffs only show new functionality, not mixed refactoring noise.
  2. Baseline tests — establishing coverage now means each upstream PR's test additions map directly to its new features, making review clearer.

@yuechao-qin yuechao-qin force-pushed the ycq/search-pipeline-run-query-params branch from 962d30e to 44babd7 Compare February 25, 2026 04:25
@yuechao-qin yuechao-qin changed the title refactor: Search pipeline run using Pydantic query parameter refactor: Search pipeline run refactoring and baseline unit tests Feb 27, 2026
@yuechao-qin yuechao-qin force-pushed the ycq/search-pipeline-run-query-params branch from e853104 to f0a5c13 Compare February 27, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants