yi-wang-ai opened a new pull request, #74001: URL: https://github.com/apache/airflow/pull/74001
Clearing a Dag run or using the core CLI currently leaves task-state checkpoints behind, even though clearing through the task-instance endpoint discards them. Move deletion into `clear_task_instances()` so those paths and downstream clearing share the same default. Add `keep_task_state` to single and bulk Dag-run clear requests, and `--keep-task-state` to `airflow dags clear` and `airflow tasks clear`. Preserve dry-run behavior and untouched scopes. Update resumable-task documentation and regenerate OpenAPI and its clients. Expose “Keep task state and resume” in both single and bulk Dag-run clear dialogs, using the existing saved default. Both dialogs explicitly send the selected value on confirmation. Validation on PostgreSQL with Breeze/Python 3.12: - Captured the default-clear regression failing before the fix; explicit preservation options also failed with HTTP 422. - Related API, CLI, and task-instance suite: 1,057 passed, four skipped. - Additional Dag/model and clear-path suite: 335 passed, including downstream checkpoint deletion. - UI request tests: nine passed, including default false, explicit true, saved defaults, and overriding a saved true default. UI lint, TypeScript checking, and the production build passed. - Changed-file pre-commit checks and applicable manual checks passed. The OpenAPI hook hard-codes Python 3.10; its generator was run successfully in the available Python 3.12 Breeze environment instead. - Repository-wide checks remain incomplete: unrelated provider generators attempted separate Python 3.10 image builds, which were stopped. No repository-wide pass is claimed. The pre-existing limitation for custom state-store backends is unchanged. closes: #72929 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — OpenAI Codex (GPT-6) Generated-by: OpenAI Codex (GPT-6) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
