Skip to content

make conf.set case insensitive#33452

Merged
Taragolis merged 6 commits into
apache:mainfrom
aws-mwaa:vandonr/fix
Aug 21, 2023
Merged

make conf.set case insensitive#33452
Taragolis merged 6 commits into
apache:mainfrom
aws-mwaa:vandonr/fix

Conversation

@vandonr-amz

Copy link
Copy Markdown
Contributor

conf.get is insensitive (it converts section and key to lower case), but set is not, which can lead to surprising behavior (see the test, which is not passing without the fix).
I suggest that we override set as well to fix that. Any value that was set before with upper case was unreacheable.

`conf.get` is insensitive (it converts section and key to lower case)
but set is not, which can lead to surprising behavior
(see the test, which is not passing without the fix).
I suggest that we override set as well to fix that.
Any value that was set before with upper case was unreacheable.
Comment thread airflow/configuration.py
Comment thread airflow/configuration.py Outdated

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

I like this change. I remember I encountered such a gotcha recently. But have the same questions/suggestions as TP

Comment thread airflow/configuration.py Outdated
Comment thread airflow/configuration.py Outdated

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

LGTM after resolving the discussions with the other reviewers.

Comment thread airflow/configuration.py
@hussein-awala hussein-awala added this to the Airflow 2.7.1 milestone Aug 17, 2023
@hussein-awala hussein-awala added the type:bug-fix Changelog: Bug Fixes label Aug 17, 2023

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

Same as @hussein-awala. OK for me with a few small comments

@Taragolis
Taragolis merged commit abbd567 into apache:main Aug 21, 2023
@vandonr-amz
vandonr-amz deleted the vandonr/fix branch August 21, 2023 21:24
ephraimbuddy pushed a commit that referenced this pull request Aug 28, 2023
* make `conf.set` case insensitive

`conf.get` is insensitive (it converts section and key to lower case)
but set is not, which can lead to surprising behavior
(see the test, which is not passing without the fix).
I suggest that we override set as well to fix that.
Any value that was set before with upper case was unreacheable.

* fix remove_option as well

* away with the str()

* add significant change newsfragment

(cherry picked from commit abbd567)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants