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/14 12:23:39 UTC

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

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