Skip to content

Fix airflow config get-value silently succeeding on a missing option - #72145

Open
Eason09053360 wants to merge 1 commit into
apache:mainfrom
Eason09053360:fix-config-get-value-silent-missing-option
Open

Fix airflow config get-value silently succeeding on a missing option#72145
Eason09053360 wants to merge 1 commit into
apache:mainfrom
Eason09053360:fix-config-get-value-silent-missing-option

Conversation

@Eason09053360

Copy link
Copy Markdown
Contributor

airflow config get-value exited 0 with nothing on stdout when the option did not exist, so a script capturing its output could not tell a missing option from an empty one. The parser's "not found" warning also landed on stdout, corrupting the value the command exists to produce.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

`airflow config get-value` swallowed the lookup failure and exited 0 with
nothing on stdout, so a script capturing its output could not tell a missing
option from an empty one. The parser's "not found" warning also landed on
stdout, corrupting the one stream the command exists to produce.

The exception was swallowed in the first place to avoid the double
deprecation warning that a has_option() pre-check triggered (apache#40319). That
constraint still holds, and so does the need to let a genuine lookup failure
-- a failed *_cmd, an unreachable secrets backend -- reach the user with its
own message rather than being reported as a missing option.
@potiuk

potiuk commented Aug 27, 2026

Copy link
Copy Markdown
Member

First of all This is user facing change so newsfragment should be added explaining the behaviour change (which otherwise makes sense).

But more importantly - you need to make a wider chaeck in all similar methods and see what behaviour is there - and raise this change proposal to devlist, describing a general change in the interface (config get-value is part of the public interface). Also you should consult airflow-ctl behaviour and make sure those are synchronized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants