Allow and prefer non-prefixed extra fields for slack hooks#27070
Allow and prefer non-prefixed extra fields for slack hooks#27070dstandish merged 5 commits intoapache:mainfrom
Conversation
From airflow version 2.3, extra prefixes are not required so we enable them here.
5f384dd to
419b62c
Compare
| return wrapper | ||
|
|
||
|
|
||
| def _ensure_prefixes(conn_type): |
There was a problem hiding this comment.
I can see this function is a duplicate of the one defined in airflow/providers/slack/hooks/slack.py (and in many other PR you have open). Would not it be better to put it somewhere common once and then use it across the different providers?
There was a problem hiding this comment.
you are correct. it's not possible because the only thing providers share is airflow, and we can't use features in airflow until they are present in the version specified as dep in provider. the feature that eliminates the need for this decorator will be released in 2.5. when min airflow version for these providers is 2.5, then we can remove this decorator. and if you look at the tests, i actually force this removal at this time! it's tricky managing all the backcompat here but ... that's life!
There was a problem hiding this comment.
I see. Could you then at least try to have it only once per provider? Here (Slack), you defined this function twice
From airflow version 2.3, extra prefixes are not required so we enable them here.