Eason09053360 opened a new pull request, #72941: URL: https://github.com/apache/airflow/pull/72941
## Why `airflow tasks clear -t/--task-regex` is documented as a regex, but since #47360 dropped regex support from `partial_subset`, the CLI has passed the pattern through as a plain substring match. A pattern such as `'^runme_[02]$'` silently clears nothing and exits 0, while `--dag-regex` on the same command still uses `re.search`. ## What `task_clear` now filters task ids with `re.search` itself and passes the matched set to `partial_subset`, which stays non-regex for its API and UI callers. An invalid pattern exits with a one-line `Invalid --task-regex` error instead of a traceback. As in Airflow 2, an unescaped `.` now matches any character; `--dag-regex` combined with `--task-regex` still crashes and is tracked in #66884. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Fable 5.1) Generated-by: Claude Code (Fable 5.1) 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]
