Skip to content

Fix config update --option/--ignore-option never matching options - #70240

Merged
potiuk merged 5 commits into
apache:mainfrom
SreeramaYeshwanthGowd:fix-config-update-option-matching
Jul 30, 2026
Merged

Fix config update --option/--ignore-option never matching options#70240
potiuk merged 5 commits into
apache:mainfrom
SreeramaYeshwanthGowd:fix-config-update-option-matching

Conversation

@SreeramaYeshwanthGowd

Copy link
Copy Markdown
Contributor

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.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {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.

`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.
@SreeramaYeshwanthGowd
SreeramaYeshwanthGowd force-pushed the fix-config-update-option-matching branch from 4400fc9 to b346222 Compare July 22, 2026 23:42
@SreeramaYeshwanthGowd SreeramaYeshwanthGowd changed the title Fix config update --option/--ignore-option never matching options Fix config update --option/--ignore-option never matching options Jul 23, 2026
@uranusjr

Copy link
Copy Markdown
Member

This needs a bugfix newsfragment. Otherwise I think this is good.

@SreeramaYeshwanthGowd

Copy link
Copy Markdown
Contributor Author

Thanks @uranusjr! Added the bugfix newsfragment

@potiuk potiuk added this to the Airflow 3.3.1 milestone Jul 30, 2026
@potiuk potiuk added the backport-to-v3-3-test Backport to v3-3-test label Jul 30, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@potiuk
potiuk merged commit 9fecfd5 into apache:main Jul 30, 2026
6 checks passed
@boring-cyborg

boring-cyborg Bot commented Jul 30, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

vatsrahul1001 added a commit that referenced this pull request Jul 31, 2026
… options (#70240) (#70757)

(cherry picked from commit 9fecfd5)

Co-authored-by: SreeramaYeshwanthGowd <yeshwanthgowdsreerama@gmail.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
… options (#70240) (#70757)

(cherry picked from commit 9fecfd5)

Co-authored-by: SreeramaYeshwanthGowd <yeshwanthgowdsreerama@gmail.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
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.

3 participants