-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
Summary
The af runs list command should support sorting and filtering parameters that the Airflow API already supports.
Current Behavior
af runs list -d code_agent -l 5Returns runs in an arbitrary order, requiring jq post-processing to sort by date.
Proposed Changes
Add these options to af runs list:
--order-by- Sort by field (e.g.,start_date,execution_date,state)--state- Filter by run state (e.g.,running,success,failed)--start-date-gte/--start-date-lte- Filter by start date range
Implementation Notes
The adapter layer already supports **kwargs pass-through, so this is a low-complexity change:
- Add Typer options to
src/astro_airflow_mcp/cli/runs.py - Pass through to
adapter.list_dag_runs() - Update tool layer in
src/astro_airflow_mcp/tools/dag_run.py
The Airflow REST API supports these parameters natively - no adapter changes needed.
Example Usage
# Most recent runs first
af runs list -d code_agent --order-by -start_date
# Only running DAGs
af runs list --state running
# Runs from today
af runs list --start-date-gte 2026-01-30Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels