Repository navigation
Fix config lint warnings for remove_if_equals rules - #66370
Conversation
parkhojeong
left a comment
There was a problem hiding this comment.
It is very useful feature !
i left one comment about the test :)
b1f192d to
7f24851
Compare
There was a problem hiding this comment.
i checked latest commit and it looks good 7f24851
There was a problem hiding this comment.
Pull request overview
This PR fixes airflowctl config lint so that config removal rules that are conditional on a specific value (remove_if_equals) actually trigger, preventing “no issues found” results when a deprecated/removed setting should be flagged during Airflow 3 migration.
Changes:
- Update
ConfigChange.message()to correctly distinguish betweenremove_if_equalsbeing unset (None) vs set to a falsey value (e.g. empty string), and to emit removal warnings only when the configured value matches. - Add parametrized tests covering
remove_if_equalsbehavior, including empty-string matching.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| airflow-ctl/src/airflowctl/ctl/commands/config_command.py | Fixes remove_if_equals handling in config-change messaging and factors out a helper for “removed” messages. |
| airflow-ctl/tests/airflow_ctl/ctl/commands/test_config_command.py | Adds coverage to ensure remove_if_equals removal rules are linted correctly (including empty-string cases). |
7f24851 to
0e96b61
Compare
|
@henry3260 — There are 1 unresolved review thread on this PR from @jason810496. Could you either push a fix or reply in each thread explaining why the feedback doesn't apply? Once you believe the feedback is addressed, mark the thread as resolved so the reviewer isn't re-pinged needlessly. Thanks! Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
0e96b61 to
92645e7
Compare
|
@henry3260 A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
92645e7 to
74e29d8
Compare
|
CI greens now |
74e29d8 to
74bd5e1
Compare
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.
|
… rules (apache#66370) (cherry picked from commit d122d03) Co-authored-by: Henry Chen <[email protected]>
… rules (#66370) (#69395) (cherry picked from commit d122d03) Co-authored-by: Henry Chen <[email protected]>
… rules (#66370) (#69395) (cherry picked from commit d122d03) Co-authored-by: Henry Chen <[email protected]>
Why
airflowctl config lintis meant to help users catch Airflow 3 migrationissues in their config. Right now, some migration rules exist in the rule
table but never actually fire, so users can get a misleading "no issues found"
result even when deprecated or removed settings should be flagged.
Also switch the check to
if self.remove_if_equals is None, because the original implementation did not distinguish between an unset value and a falsey configured value.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.