Commits
Click on a commit to change the comparison rangeAdd bulk delete endpoint for flow runs
adds a bulk delete endpoint for flow runs using the same filter used by the `POST /filter` read endpoint
### key features
- **filter-based deletion**: uses the standard `FlowRunFilter` for maximum flexibility - delete by IDs, states, tags, or any criteria
- **batch processing**: processes flow runs efficiently with proper resource cleanup
- **background log cleanup**: schedules log deletion as background tasks to avoid blocking the response
### api
- **endpoint**: `POST /flow_runs/bulk_delete`
- **request body**:
  - `flow_runs`: standard `FlowRunFilter` object (e.g., `{"id": {"any_": [id1, id2]}}`)
  - `limit`: maximum number of flow runs to delete (1-200, default: 200)
- **response**: `FlowRunBulkDeleteResponse` with deleted flow run IDs
### implementation
- reuses existing `FlowRunFilter` schema - the same filter used for querying flow runs
- uses hard deletion (unlike cloud's soft deletion)
- properly handles concurrency slot cleanup
- background tasks handle log deletion
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com> Add comprehensive tests for bulk delete endpoint
- test_bulk_delete_by_ids: Tests deletion by specific flow run IDs
- test_bulk_delete_by_tags: Tests deletion by tag filtering
- test_bulk_delete_limit: Tests that the limit parameter is enforced
- test_bulk_delete_validation: Tests parameter validation
- test_bulk_delete_with_concurrency_slots: Tests concurrency slot cleanup
All tests pass ā
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com> Remove type hints from test fixtures
Following project convention - test fixtures don't have type hints
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>