Skip to content

Fix config lint warnings for remove_if_equals rules - #66370

Merged
potiuk merged 1 commit into
apache:mainfrom
henry3260:config-lint-remove-if-equals
Jul 4, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
henry3260:config-lint-remove-if-equals

Conversation

@henry3260

Copy link
Copy Markdown
Member

Why

airflowctl config lint is meant to help users catch Airflow 3 migration
issues 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?
  • 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.

@parkhojeong parkhojeong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is very useful feature !

i left one comment about the test :)

@henry3260
henry3260 force-pushed the config-lint-remove-if-equals branch from b1f192d to 7f24851 Compare May 5, 2026 03:37

@parkhojeong parkhojeong left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i checked latest commit and it looks good 7f24851

@potiuk potiuk added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label May 5, 2026

@jason810496 jason810496 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! LGTM overall.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 between remove_if_equals being 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_equals behavior, 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).

@henry3260
henry3260 force-pushed the config-lint-remove-if-equals branch from 7f24851 to 0e96b61 Compare May 9, 2026 19:48
@potiuk

potiuk commented May 18, 2026

Copy link
Copy Markdown
Member

@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.

@henry3260
henry3260 force-pushed the config-lint-remove-if-equals branch from 0e96b61 to 92645e7 Compare May 18, 2026 12:50
@potiuk potiuk removed the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label May 24, 2026
@henry3260
henry3260 requested a review from jason810496 May 26, 2026 15:13
@potiuk

potiuk commented Jun 4, 2026

Copy link
Copy Markdown
Member

@henry3260 A few things need addressing before review — see our Pull Request quality criteria.

  • ❌ Other failing CI checks. See docs.

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.

@henry3260
henry3260 force-pushed the config-lint-remove-if-equals branch from 92645e7 to 74e29d8 Compare June 4, 2026 02:31
@henry3260

Copy link
Copy Markdown
Member Author

CI greens now

@potiuk potiuk added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Jun 8, 2026
@henry3260
henry3260 force-pushed the config-lint-remove-if-equals branch from 74e29d8 to 74bd5e1 Compare June 21, 2026 19:16
@potiuk
potiuk merged commit d122d03 into apache:main Jul 4, 2026
93 checks passed
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: airflow-ctl/v0-1-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
✅ airflow-ctl/v0-1-test PR Link

aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jul 4, 2026
… rules (apache#66370)

(cherry picked from commit d122d03)

Co-authored-by: Henry Chen <[email protected]>
potiuk pushed a commit that referenced this pull request Jul 30, 2026
… rules (#66370) (#69395)

(cherry picked from commit d122d03)

Co-authored-by: Henry Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl backport-to-airflow-ctl/v0-1-test ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants