-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a CLI command airflow config update
to update the config changes from airflow 2.x to 3.
#48403
Merged
+362
−1
Conversation
This file contains 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
885a0a5
to
3306d72
Compare
airflow config update
to update the config changes from airflow 2.x to 3.
7f7224a
to
604d669
Compare
Lee-W
reviewed
Mar 27, 2025
041b7ec
to
1db3f11
Compare
ed986cd
to
a734477
Compare
Lee-W
reviewed
Mar 28, 2025
20f2903
to
4fd67ba
Compare
dbbebb1
to
2a1334e
Compare
d6174ec
to
9b81c6d
Compare
phanikumv
approved these changes
Apr 2, 2025
Lee-W
reviewed
Apr 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me. Left some nitpicks
33039d4
to
26e26bc
Compare
26e26bc
to
0ed965f
Compare
Closed
2 tasks
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.
This PR introduces the
airflow config update
CLI command to help users transition smoothly from Airflow 2.x to 3. This command scans the currentairflow.cfg file
, then updates configuration parameters that have been removed, renamed, or had their default values changed. In addition, it cleans out deprecated configuration values (as updated in #47761 that have been emitting warnings in Airflow 2.x. For each suchsection-option
:In addition, a backup of the original
airflow.cfg
is created before updating.Examples:
Renamed Option:
A legacy key from the
[admin]
section:hide_sensitive_variable_fields = True
is moved and renamed to
core
section:in the
[core]
section.Removed Option:
Deprecated options such as
check_slas = True
in
[core]
are omitted entirely from the new configuration.Default Value Update:
If an option in
[core]
is set to “OldDefault” (e.g.default_key = OldDefault
) and the new default is “NewDefault”, the updated file will show as comment:Usage Examples:
Update the Entire Configuration:
Update Specific Sections:
Update Specific Options:
Ignore Specific Sections/Options:
Dry run for dummy detailed output:
closes: [#48376]
Tested locally:
airflow.cfg
airflow config update
:^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in airflow-core/newsfragments.