dstandish commented on code in PR #27040:
URL: https://github.com/apache/airflow/pull/27040#discussion_r1002583863


##########
airflow/providers/yandex/hooks/yandex.py:
##########
@@ -146,9 +146,18 @@ def _get_credentials(self) -> dict[str, Any]:
             return {'token': oauth_token}
 
     def _get_field(self, field_name: str, default: Any = None) -> Any:
-        """Fetches a field from extras, and returns it."""
-        long_f = f'extra__yandexcloud__{field_name}'
-        if hasattr(self, 'extras') and long_f in self.extras:
-            return self.extras[long_f]
-        else:
+        """Get field from extra, first checking short name, then for 
backcompat we check for prefixed name."""
+        if not hasattr(self, 'extras'):
             return default
+        backcompat_prefix = 'extra__yandexcloud__'
+        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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to