-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix Legacy configuration not removed or updated #46544
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
Fix Legacy configuration not removed or updated #46544
Conversation
|
Followup: Should we add a |
sounds like a great idea! |
96b4fd2 to
ed8c6bd
Compare
ed8c6bd to
8ff3f65
Compare
Lee-W
left a comment
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.
left a few nitpicks. overall looks good
8ff3f65 to
ff092b5
Compare
|
Thanks for addressing this. Will leave this open for 1 or 2 days before merging. |
ff092b5 to
b6ac746
Compare
|
ah... forget to merge it . will do once CI is green again |
* Fix Legacy configuration not removed or updated * Fix webserver cookie_samesite fallback * Fix nitpicks
| section = self.inversed_deprecated_sections[section] | ||
| if not self._suppress_future_warnings: | ||
| if lookup_from_deprecated_options: | ||
| option_description = self.configuration_description.get(section, {}).get(key, {}) |
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.
@Lee-W @jason810496 So it turns out this was inaddequately tested before, and was already not working.
This should be self.configuration_description.get(section, {}).get("options", {}).get(key, {})
@jason810496 Would you mind fixing this and adding tests for it?
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.
Sure, I will create a PR to fix it I the weekend ( currently out of laptop. If this is very urgent then I might not be able to solve it immediately. )
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.
Of course, no rush! It's been broken for a some unknown time, you were just the unfortunate soul who touched it last 😁
* Fix Legacy configuration not removed or updated * Fix webserver cookie_samesite fallback * Fix nitpicks (cherry picked from commit 9719737)
* Fix Legacy configuration not removed or updated (cherry picked from commit 9719737)
…50353) * Fix Legacy configuration not removed or updated (#46544) * Fix Legacy configuration not removed or updated (cherry picked from commit 9719737) * allow_trigger_in_future config removal (#46667) (cherry picked from commit 65bacad) * Backport airflow config update and airflow config lint changes * Rename pre-2-7 defaults to provider_config_fallback_defaults (#44895) * Rename pre-2-7 defaults to provider_config_fallback_defaults After unsuccessful atempts to remove them, renaming and adding appropriate warning against removing them seems to be a good idea. * Update airflow/config_templates/provider_config_fallback_defaults.cfg Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com> --------- Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com> (cherry picked from commit 8c013b6) * Fix `lookup_from_deprecated_options` in AirflowConfigParser (#47004) * Fix deprecated_options in AirflowConfigParser * Add test_deprecated_options_with_lookup_from_deprecated, rename as lookup_from_deprecated * fixup! Add docstring for lookup_from_deprecated * Fix fixture params naming (cherry picked from commit 8e3d25f) * Fix the tests --------- Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com> Co-authored-by: Phani Kumar <94376113+phanikumv@users.noreply.github.com> Co-authored-by: Jarek Potiuk <jarek@potiuk.com> Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
closes: #46517
The
inversed_deprecated_optionslogic inconfig_command.pycausesconfig lintto retrieve the new section-option pair from the old section-option pair. Adding thelookup_from_deprecated_optionsargument can resolve the error.^ 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 newsfragments.