Ankurdeewan commented on code in PR #56324:
URL: https://github.com/apache/airflow/pull/56324#discussion_r3068165291


##########
providers/google/src/airflow/providers/google/common/hooks/base_google.py:
##########
@@ -342,6 +381,19 @@ def get_credentials_and_project_id(self) -> 
tuple[Credentials, str | None]:
             idp_extra_params_dict=idp_extra_params_dict,
         )
 
+        # Apply quota project before caching credentials
+        quota_project = self.quota_project_id or 
self._get_field("quota_project_id")
+        if quota_project and not is_anonymous:
+            self._validate_quota_project(quota_project)
+            if not hasattr(credentials, "with_quota_project"):

Review Comment:
   with_quota_project in google-auth is always a method — that's just how the 
library works. If it somehow existed but wasn't callable, that'd be a 
google-auth bug, not something a user could hit. Keeping hasattr since it's the 
standard pattern across the codebase and easier to read.



-- 
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