-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Update snowflake hook to not use extra prefix #26764
Update snowflake hook to not use extra prefix #26764
Conversation
@@ -41,6 +42,18 @@ def _try_to_boolean(value: Any): | |||
return value | |||
|
|||
|
|||
def _maybe_add_prefix(val): | |||
""" | |||
From Airflow 2.3 onward, there is no longer a need to add the `extra__<conn type>__` |
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.
Next provider release cycle is going to set min Airflow version 2.3 for all providers:
https://github.com/apache/airflow#release-process-for-providers
Since the next cycle is on October any way maybe we should hold this PR till we adjust the min Airflow version?
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, that's fine
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.
when do you think we will bump the min version? will there be time to add this after bumping and before release?
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.
The bump can happen only after 11-Oct because we might need to make ad-hoc release to fix something urgently. Right after 11-Oct we can bump all providers and then proceed.
The reason I suggested it is because we usually do 1 release per month so the next release is expected around the end of October thus the current "backport" code for 2.2 will never reach to the user anyway.
We can also merge this first and do cleanup after.. That is OK.
1567e1d
to
a17f798
Compare
d4d27a8
to
dd2cf78
Compare
3b31d3c
to
136fb39
Compare
As of Airflow 2.3 it's no longer necessary to use the `extra__<conn_type>__` prefix for connection extras.
136fb39
to
ab790b6
Compare
As of Airflow 2.3 it's no longer necessary to use the
extra__<conn_type>__
prefix for connection extras.We're bumping min airflow version to 2.3 now, so we can remove the prefix.
We handle back compat with method get_field.
And in version 2.5 we will support no prefix in
get_ui_field_behaviors
(pr #26995), so we prepare for that here. What we do is update the placeholders to remove the prefix but add in the logic (which in 2.5 is added to providers manager) to add the prefix. This way all we need to do when min airflow version is 2.5 is remove the decorator. And in the meantime, we don't ever have to see the prefix.