Repository navigation
Fix airflowctl config lint filters matching partial config names - #75690
Merged
Merged
Conversation
The lint filters were declared as plain strings, so the membership tests in the command body compared a name against a string rather than against a list. Any name that happened to be a prefix of what the user typed slipped through: `--option auth_backends` also reported `auth_backend`, and the mirror case on `--ignore-option` silently suppressed warnings the user still wanted to see. Five such pairs exist in CONFIGS_CHANGES today. The comma-separated lists the docstring has always advertised only appeared to work because substring matching happened to accept them; the verbose output joined the same strings character by character. airflow-core already parses these four arguments with string_list_type, which was defined here but left unused.
The fixture comment called every collision a prefix match and cited sql_alchemy_conn/sql_alchemy_connect_args, a pair the fixture never contains, so it said nothing true about what each entry is for. The other edits bring the new tests in line with the rest of the file and with the testing standards, which ask for autospec on mocks.
rjgoyln
marked this pull request as ready for review
October 26, 2026 19:35
rjgoyln
requested review from
bugraoz93,
dheerajturaga,
henry3260 and
potiuk
as code owners
October 26, 2026 19:35
Contributor
|
Merged from main, please let it run and I'll review afterwards :) |
Contributor
Author
|
OK. Thanks! |
shahar1
approved these changes
Oct 27, 2026
Contributor
Backport successfully created: airflow-ctl/v0-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
shahar1
pushed a commit
that referenced
this pull request
Oct 27, 2026
…artial config names (#75690) (#75736) The lint filters were declared as plain strings, so the membership tests in the command body compared a name against a string rather than against a list. Any name that happened to be a prefix of what the user typed slipped through: `--option auth_backends` also reported `auth_backend`, and the mirror case on `--ignore-option` silently suppressed warnings the user still wanted to see. Five such pairs exist in CONFIGS_CHANGES today. The comma-separated lists the docstring has always advertised only appeared to work because substring matching happened to accept them; the verbose output joined the same strings character by character. airflow-core already parses these four arguments with string_list_type, which was defined here but left unused. (cherry picked from commit 91fbcbf) Co-authored-by: rjgoyln <151457491+rjgoyln@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.
Continues #70940, closed by the open PR limit.
Summary
airflowctl config lintparses--section,--option,--ignore-sectionand--ignore-optionas plain strings, so each filter matches any config name that is a substring of its value:--option auth_backendsalso reportsauth_backend.--ignore-option auth_backendsalso hides theauth_backendwarning.--ignore-section api --verboseprintsIgnored sections: a, p, i.Five option names in
CONFIGS_CHANGESare substrings of another. The comma-separated lists the docstring documents only worked through the same substring match.Parsing all four with
string_list_typematches airflow-core'sairflow config lint.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines