Add tasks clear command to airflowctl#66852
Conversation
| mail_folder: str = "INBOX", | ||
| mail_filter: str = "All", | ||
| not_found_mode: str = "raise", | ||
| overwrite: bool = True, |
There was a problem hiding this comment.
related to this PR - #66850
Could you please remove these unrelated chnages
| const utc = parsed.toISOString(); | ||
| setDisplayDate(local); | ||
| onChange?.({ ...event, target: { ...event.target, value: utc } } as unknown as ChangeEvent<HTMLInputElement>); | ||
| }; |
Add TasksOperations and TaskInstancesOperations to the API layer, a tasks clear command to airflowctl, and register the tasks command group in the CLI. The clear command supports optional --start-date and --end-date flags in ISO format. Closes apache#66176
e6a0496 to
ba07330
Compare
|
Sorry I mixed up. Should be good now |
|
Fixed the CI/static-check failures from the What changed:
Verification:
Drafted-by: Claude Code (Opus 4.7); reviewed by @kyupark before posting |
|
CI |
Include `tasks` in the capture snapshot list so CI help-image checks stay in sync after adding `tasks clear`. Co-authored-by: Cursor <cursoragent@cursor.com>
|
CI is green now |
There was a problem hiding this comment.
Thanks! Good to add the image help script but we need to move the logic to operations.py as the cli command will be autogenerated we need to add help text to yaml definition
https://github.com/apache/airflow/blob/main/airflow-ctl/src/airflowctl/ctl/help_texts.yaml
|
|
||
| @provide_api_client(kind=ClientKind.CLI) | ||
| def clear(args, api_client=NEW_API_CLIENT) -> None: | ||
| """Clear task instances for a Dag.""" |
There was a problem hiding this comment.
This should be in operations.py since we can call with single endpoint and we don't need to maintain this much LoC
Add a
tasks clearcommand to airflowctl, allowing users to clear task instances via the CLI.Supports
--dag-id,--task-id,--start-date, and--end-dateflags. Uses thePOST /api/v2/dags/{dag_id}/clearTaskInstancesendpoint.closes: #66176
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines