Fix config update --option/--ignore-option never matching options - #70240
Conversation
`airflow config update` filtered changes by comparing the composed `section.option` key against the bare option name the user passes, so `--option` and `--ignore-option` never matched and silently did nothing. The sibling `airflow config lint` already matches on the bare option name, so this makes `update` consistent with it.
4400fc9 to
b346222
Compare
config update --option/--ignore-option never matching options|
This needs a bugfix newsfragment. Otherwise I think this is good. |
|
Thanks @uranusjr! Added the bugfix newsfragment |
potiuk
left a comment
There was a problem hiding this comment.
Thanks — good catch, and the fix is right. update_config was building full_key = f"{section}.{option}" and comparing it against whatever the user passed to --option / --ignore-option, so a bare option name could never match and the filters silently did nothing.
I checked the intended interface against the sibling lint_config command, whose docstring gives --option check_slas, --ignore-option smtp_user and --section smtp --option smtp_user — bare option names throughout. So comparing against conf_option makes update consistent with lint, rather than inventing a new convention. The CLI help ("The option name(s) to update") says the same.
Parametrizing the test across both --option and --ignore-option with a present/absent key pair is a nice way to prove the filter works in both directions, and the newsfragment is warranted since this is a user-visible CLI fix.
Nothing further from me.
Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
airflow config updatefiltered changes by comparing the composedsection.optionkey against the bare option name the user passes, so--optionand--ignore-optionnever matched and silently did nothing. The siblingairflow config lintalready matches on the bare option name, so this makesupdateconsistent with it.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.