Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shuyangli
Copy link
Member

@shuyangli shuyangli commented Dec 18, 2025

This moves the workflow evaluation episodes by task name queries from the UI (direct ClickHouse calls) to the backend (Rust API endpoints).

Backend changes:

  • Add GroupedWorkflowEvaluationRunEpisodeWithFeedbackRow type to workflow_evaluation_queries.rs
  • Add list_workflow_evaluation_run_episodes_by_task_name and count_workflow_evaluation_run_episode_groups_by_task_name trait methods
  • Implement ClickHouse queries with complex CTEs for grouping by task_name
  • Add unit tests using MockWorkflowEvaluationQueries
  • Add e2e database tests in tests/e2e/db/workflow_evaluation_queries.rs
  • Add route handlers at /internal/workflow-evaluations/episodes-by-task-name and /internal/workflow-evaluations/episodes-by-task-name/count
  • Add e2e endpoint tests (require gateway restart)

Frontend changes:

  • Generate and export TypeScript bindings for new types
  • Add listWorkflowEvaluationRunEpisodesByTaskName and countWorkflowEvaluationRunEpisodeGroupsByTaskName methods to TensorZeroClient
  • Update route.tsx to use new client methods instead of direct ClickHouse calls
  • Delete unused getWorkflowEvaluationRunEpisodesByTaskName and countWorkflowEvaluationRunEpisodesByTaskName functions from workflow_evaluations.server.ts
  • Delete GroupedWorkflowEvaluationRunEpisodeWithFeedback Zod schema and type
  • Remove corresponding test for deleted function

Important

Migrate workflow evaluation episode queries from frontend to backend, adding new Rust API endpoints and updating frontend to use these endpoints.

  • Backend Changes:
    • Add GroupedWorkflowEvaluationRunEpisodeWithFeedbackRow type in workflow_evaluation_queries.rs.
    • Implement list_workflow_evaluation_run_episodes_by_task_name and count_workflow_evaluation_run_episodes_by_task_name in workflow_evaluation_queries.rs.
    • Add route handlers in internal.rs for /internal/workflow-evaluations/episodes-by-task-name and /internal/workflow-evaluations/episodes-by-task-name/count.
    • Add unit tests in workflow_evaluation_queries.rs and e2e tests in tests/e2e/db/workflow_evaluation_queries.rs.
  • Frontend Changes:
    • Generate TypeScript bindings for new types.
    • Add methods to TensorZeroClient for listing and counting episodes by task name.
    • Update route.tsx to use new client methods.
    • Remove deprecated functions from workflow_evaluations.server.ts.
  • Misc:
    • Update imports in index.ts to include new TypeScript bindings.

This description was created by Ellipsis for dbb1834. You can customize this summary. It will automatically update as commits are pushed.

@shuyangli shuyangli force-pushed the sl/migrate-workflow-eval-apis branch from 6c30994 to 544ffff Compare December 19, 2025 19:14
@shuyangli shuyangli force-pushed the sl/migrate-workflow-eval-apis branch 4 times, most recently from 6b9c70e to 6e976dd Compare December 19, 2025 19:49
@shuyangli shuyangli requested a review from virajmehta December 19, 2025 19:49
@shuyangli shuyangli marked this pull request as ready for review December 19, 2025 19:50
@shuyangli
Copy link
Member Author

/merge-queue

@shuyangli shuyangli enabled auto-merge December 19, 2025 19:50
@shuyangli shuyangli changed the title Migrate getWorkflowEvaluationRunEpisodesByTaskName and countWorkflowE… Migrate get/countWorkflowEvaluationRunEpisodesByTaskName Dec 19, 2025
@github-actions
Copy link
Contributor

🚀 Merge queue workflow triggered!

View the run: https://github.com/tensorzero/tensorzero/actions/runs/20380888929

@shuyangli shuyangli force-pushed the sl/migrate-workflow-eval-apis branch from 6e976dd to dbb1834 Compare December 19, 2025 22:01
…valuationRunEpisodesByTaskName to backend

This moves the workflow evaluation episodes by task name queries from the
UI (direct ClickHouse calls) to the backend (Rust API endpoints).

Backend changes:
- Add GroupedWorkflowEvaluationRunEpisodeWithFeedbackRow type to workflow_evaluation_queries.rs
- Add list_workflow_evaluation_run_episodes_by_task_name and
  count_workflow_evaluation_run_episode_groups_by_task_name trait methods
- Implement ClickHouse queries with complex CTEs for grouping by task_name
- Add unit tests using MockWorkflowEvaluationQueries
- Add e2e database tests in tests/e2e/db/workflow_evaluation_queries.rs
- Add route handlers at /internal/workflow-evaluations/episodes-by-task-name
  and /internal/workflow-evaluations/episodes-by-task-name/count
- Add e2e endpoint tests (require gateway restart)

Frontend changes:
- Generate and export TypeScript bindings for new types
- Add listWorkflowEvaluationRunEpisodesByTaskName and
  countWorkflowEvaluationRunEpisodeGroupsByTaskName methods to TensorZeroClient
- Update route.tsx to use new client methods instead of direct ClickHouse calls
- Delete unused getWorkflowEvaluationRunEpisodesByTaskName and
  countWorkflowEvaluationRunEpisodesByTaskName functions from workflow_evaluations.server.ts
- Delete GroupedWorkflowEvaluationRunEpisodeWithFeedback Zod schema and type
- Remove corresponding test for deleted function
@shuyangli shuyangli added this pull request to the merge queue Dec 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 20, 2025
@virajmehta virajmehta added this pull request to the merge queue Dec 21, 2025
@virajmehta
Copy link
Member

python install timed out last time

Merged via the queue into main with commit dcc5c52 Dec 21, 2025
54 checks passed
@virajmehta virajmehta deleted the sl/migrate-workflow-eval-apis branch December 21, 2025 04:29
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.

4 participants