Add a CLI command airflow config update to update the config changes from airflow 2.x to 3. #48403
Merged
phanikumv merged 9 commits intoapache:mainfrom Apr 3, 2025
Merged
Conversation
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
d6174ec to
9b81c6d
Compare
phanikumv
approved these changes
Apr 2, 2025
Lee-W
reviewed
Apr 2, 2025
Member
Lee-W
left a comment
There was a problem hiding this comment.
Mostly looks good to me. Left some nitpicks
33039d4 to
26e26bc
Compare
26e26bc to
0ed965f
Compare
Closed
2 tasks
nailo2c
pushed a commit
to nailo2c/airflow
that referenced
this pull request
Apr 4, 2025
…s from airflow 2.x to 3. (apache#48403)
diogotrodrigues
pushed a commit
to diogotrodrigues/airflow
that referenced
this pull request
Apr 6, 2025
…s from airflow 2.x to 3. (apache#48403)
simonprydden
pushed a commit
to simonprydden/airflow
that referenced
this pull request
Apr 8, 2025
…s from airflow 2.x to 3. (apache#48403)
This was referenced May 8, 2025
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.
This PR introduces the
airflow config updateCLI 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.cfgis created before updating.Examples:
Renamed Option:
A legacy key from the
[admin]section:hide_sensitive_variable_fields = Trueis moved and renamed to
coresection:in the
[core]section.Removed Option:
Deprecated options such as
check_slas = Truein
[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.cfgairflow 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.