rjgoyln opened a new pull request, #70903: URL: https://github.com/apache/airflow/pull/70903
Two pieces of `airflow-ctl` did nothing but obscure the code around them. **1. A no-op exception re-raise.** `get_client` in `client.py` caught `AirflowCtlNotFoundException` only to `raise e` unchanged. This is the same pattern removed from the operations layer in #70376 — it survived there because it sits in `client.py` rather than `operations.py`. Removing it is behaviour-preserving: the clause was inside a `try`/`finally` in a `@contextlib.contextmanager`, so the exception propagates identically, `api_client.close()` still runs in the surviving `finally`, and `safe_call_command` in `cli_config.py` still handles it. **2. A redundant parser override.** `DefaultHelpParser._check_value` only called `super()`. airflow-core's namesake does real work (`check_legacy_command`), but airflow-ctl deliberately has no legacy-command mapping, so this was a degenerate copy of it. The `error()` override in the same class does real work and is untouched. No behaviour change; no newsfragment (`airflow-ctl` release managers regenerate the changelog from `git log`). The unrelated Dag run lookup deduplication that was originally drafted alongside this is split into its own PR, since it is a refactor rather than a dead-code removal and needs a different kind of review. --- ##### 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]
