You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/13 05:53:48 UTC

[GitHub] [airflow] dstandish opened a new pull request, #27023: Update google hooks to prefer non-prefixed extra fields

dstandish opened a new pull request, #27023:
URL: https://github.com/apache/airflow/pull/27023

   As of airflow 2.3 we no longer need to use prefixed name in extra purely for web UI compat.  So now we update the providers to take advantage of this, while still maintaining backcompat for conns defined the old way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish merged pull request #27023: Update google hooks to prefer non-prefixed extra fields

Posted by GitBox <gi...@apache.org>.
dstandish merged PR #27023:
URL: https://github.com/apache/airflow/pull/27023


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish commented on a diff in pull request #27023: Update google hooks to prefer non-prefixed extra fields

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #27023:
URL: https://github.com/apache/airflow/pull/27023#discussion_r1002566038


##########
airflow/providers/google/common/hooks/base_google.py:
##########
@@ -127,6 +127,19 @@ def __init__(self):
 RT = TypeVar('RT')
 
 
+def get_field(extras: dict, field_name: str):
+    """Get field from extra, first checking short name, then for backcompat we check for prefixed name."""
+    if field_name.startswith('extra_'):

Review Comment:
   ```suggestion
       if field_name.startswith('extra__'):
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] bharanidharan14 commented on a diff in pull request #27023: Update google hooks to prefer non-prefixed extra fields

Posted by GitBox <gi...@apache.org>.
bharanidharan14 commented on code in PR #27023:
URL: https://github.com/apache/airflow/pull/27023#discussion_r995698090


##########
airflow/providers/google/common/hooks/base_google.py:
##########
@@ -127,6 +127,19 @@ def __init__(self):
 RT = TypeVar('RT')
 
 
+def get_field(extras: dict, field_name: str):
+    """Get field from extra, first checking short name, then for backcompat we check for prefixed name."""
+    if field_name.startswith('extra_'):

Review Comment:
   Can we check for the exact string `extra__` . WDYT ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org