Eason09053360 opened a new pull request, #72340: URL: https://github.com/apache/airflow/pull/72340
`DAG.cli()` turns a Dag file into its own CLI entry point (`python my_dag.py tasks test ...`). The subcommands it exposes are picked by matching command names against a hardcoded list — a construct where a stale name matches nothing and disappears without any error. Two of those names were stale: - `dags backfill` — moved out to the top-level `backfill create` command - `tasks run` — removed Both had been silently dropping out of the Dag CLI. The names now live in `DAG_CLI_DAGS_SUBCOMMANDS` / `DAG_CLI_TASKS_SUBCOMMANDS` so a test can check them against the real command tables. While in there, `_remove_dag_id_opt` built each command's `args` as a generator expression, which can only be walked once. `get_parser` is cached so this normally goes unnoticed, but any rebuild produced subcommands with every argument missing — `dags pause` went from 6 parsed attributes down to 2, and `set_is_paused` would then fail on the absent `args.treat_dag_id_as_regex`. Both failure modes are silent, so each gets a regression test. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5) Generated-by: Claude Code (Opus 5) 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]
