pierrejeambrun opened a new pull request, #73547:
URL: https://github.com/apache/airflow/pull/73547
Clearing a task group could silently skip task instances beyond the first
page of results.
Marking a task group already resolves the whole group server-side, but
**clearing** enumerated the group's task instances through the paginated
task-instance listing on the client and only ever sent the first page (default
50) as `task_ids`. A group with more tasks than the page size had the rest
dropped from both the dry-run preview and the actual clear.
The clear endpoint (`POST /dags/{dag_id}/clearTaskInstances`) now accepts an
optional `task_group_id` and resolves the group's tasks server-side from the
dag structure via `iter_tasks()` (so nested sub-groups are included) — the same
mechanism the mark-as-group endpoint uses. The clear-group dialog sends
`task_group_id` instead of enumerating, so nothing is capped. `task_group_id`
and `task_ids` are mutually exclusive.
The dialog is visually unchanged — only its data source changes (it no
longer pre-fetches the group's task list), so there is no visual difference to
screenshot.
closes: #59235
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 4.8)
Generated-by: Claude Code (Opus 4.8) 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]