Repository navigation
Conversation
Both commands advertised -o/--output in their help but never read the value: apache#12704 replaced the table rendering with a fixed confirmation message and left ARG_OUTPUT in the argument table. apache#13071 removed the same orphaned flag from pools import/export but missed set and delete, so the help has promised a format choice it cannot deliver ever since. Dropping the flag makes the help truthful and brings the pools group in line with connections and variables, where only list and get take -o.
Eason09053360
requested review from
bugraoz93,
dheerajturaga,
henry3260 and
potiuk
as code owners
September 9, 2026 18:39
potiuk
approved these changes
Sep 9, 2026
imrichardwu
pushed a commit
to imrichardwu/airflow
that referenced
this pull request
Sep 11, 2026
…e#72833) Both commands advertised -o/--output in their help but never read the value: apache#12704 replaced the table rendering with a fixed confirmation message and left ARG_OUTPUT in the argument table. apache#13071 removed the same orphaned flag from pools import/export but missed set and delete, so the help has promised a format choice it cannot deliver ever since. Dropping the flag makes the help truthful and brings the pools group in line with connections and variables, where only list and get take -o. Co-authored-by: Eason09053360 <185830721+Eason09053360@users.noreply.github.com>
xvega
pushed a commit
to xvega/airflow
that referenced
this pull request
Sep 13, 2026
…e#72833) Both commands advertised -o/--output in their help but never read the value: apache#12704 replaced the table rendering with a fixed confirmation message and left ARG_OUTPUT in the argument table. apache#13071 removed the same orphaned flag from pools import/export but missed set and delete, so the help has promised a format choice it cannot deliver ever since. Dropping the flag makes the help truthful and brings the pools group in line with connections and variables, where only list and get take -o. Co-authored-by: Eason09053360 <185830721+Eason09053360@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
airflow pools setandairflow pools deleteadvertise-o/--outputin their help, but neither command reads the value. The flag is accepted and silently ignored:pools get -o jsonandpools list -o jsonhonour the flag as expected; onlysetanddeletedo not.Why the flag is there. Before #12704 both commands rendered the affected pool as a table via
_tabulate_pools(..., tablefmt=args.output). That refactor replaced the rendering with a fixed confirmation message but leftARG_OUTPUTin the argument table. #13071 removed the same orphaned flag frompools import/exportand missedset/delete, so the help has promised a format choice it cannot deliver ever since.What this PR does. Drops
ARG_OUTPUTfrom thepools setandpools deletedefinitions incli_config.py. The command functions are untouched; they never used the value. After the change thepoolsgroup matchesconnectionsandvariables, where only the read commands (list,get) take-o. The CLI reference page is generated from the argument table, so it updates on its own.Behaviour change to be aware of. An invocation that passes
-o/--outputto these two commands now fails with argparse'sunrecognized argumentserror (exit code 2) instead of exiting 0 with the plain confirmation message. Invocations without the flag are unchanged. I have not added a newsfragment since the flag never had an effect; happy to add one if maintainers consider this user-facing.Why not make the flag work instead. The
airflowctl pools create/deletesuccessors do render the affected pool with-o, and the core commands are already marked@deprecated_for_airflowctlpointing at them. Restoring table rendering here would change the default stdout of everypools set/pools deletecall, a larger blast radius than removing a no-op flag from a deprecated surface. If maintainers prefer restoring the rendering, I can do that instead.Testing. Added a parametrized parser test in
test_cli_parser.pynext to the other argparse-rejection tests, asserting exit code 2 and theunrecognized arguments: --output jsonmessage for both commands. With the fix reverted and only the test kept, exactly those two cases fail.related: #12704, #13071
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5.1) following the guidelines