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 2023/01/11 17:27:41 UTC

[GitHub] [airflow] djpalm801 opened a new issue, #28864: ComputeEngineHook object has no attribute '_get_credentials'

djpalm801 opened a new issue, #28864:
URL: https://github.com/apache/airflow/issues/28864

   ### Apache Airflow version
   
   2.5.0
   
   ### What happened
   
   When trying to use the ComputeEngineInsertInstanceFromTemplateOperator I get an error stating that the ComputeEngineHook doesn't have a _get_credentials() attribute.  The stack trace is:
   
   > Traceback (most recent call last):
     File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/cloud/operators/compute.py", line 379, in execute
       existing_instance = hook.get_instance(
     File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/common/hooks/base_google.py", line 462, in inner_wrapper
       return func(self, *args, **kwargs)
     File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/cloud/hooks/compute.py", line 343, in get_instance
       client = self.get_compute_instance_client()
     File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/cloud/hooks/compute.py", line 87, in get_compute_instance_client
       return InstancesClient(credentials=self._get_credentials(), client_info=self.client_info)
   AttributeError: 'ComputeEngineHook' object has no attribute '_get_credentials'
   
   ### What you think should happen instead
   
   The GoogleBaseHook, which is the super class of the ComputeEngineHook has a get_credentials() method that I believe should be called.  Either that, or the ComputeEngineHook needs to implement a _get_credentials() method.
   
   ### How to reproduce
   
   Create a DAG that uses any of the ComputeEngine operators and run it.
   
   ### Operating System
   
   Cloud Composer
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-google==8.5.0
   
   
   ### Deployment
   
   Composer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   I'd be interested to see if there is a work around since I will have to wait for google to support a newer version of airflow that contains a fix.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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.apache.org

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


[GitHub] [airflow] boring-cyborg[bot] commented on issue #28864: ComputeEngineHook object has no attribute '_get_credentials'

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #28864:
URL: https://github.com/apache/airflow/issues/28864#issuecomment-1379236126

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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] djpalm801 commented on issue #28864: ComputeEngineHook object has no attribute '_get_credentials'

Posted by GitBox <gi...@apache.org>.
djpalm801 commented on issue #28864:
URL: https://github.com/apache/airflow/issues/28864#issuecomment-1379238985

   Forgot to include the line of code in question: https://github.com/apache/airflow/blob/352d492c66e69e816fb1547e46fc1e3b7ba32066/airflow/providers/google/cloud/hooks/compute.py#L83


-- 
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] djpalm801 commented on issue #28864: ComputeEngineHook object has no attribute '_get_credentials'

Posted by GitBox <gi...@apache.org>.
djpalm801 commented on issue #28864:
URL: https://github.com/apache/airflow/issues/28864#issuecomment-1379308466

   Looks like it, thanks. 


-- 
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] djpalm801 closed issue #28864: ComputeEngineHook object has no attribute '_get_credentials'

Posted by GitBox <gi...@apache.org>.
djpalm801 closed issue #28864: ComputeEngineHook object has no attribute '_get_credentials'
URL: https://github.com/apache/airflow/issues/28864


-- 
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] Taragolis commented on issue #28864: ComputeEngineHook object has no attribute '_get_credentials'

Posted by GitBox <gi...@apache.org>.
Taragolis commented on issue #28864:
URL: https://github.com/apache/airflow/issues/28864#issuecomment-1379303783

   @djpalm801 it it possible that you issue also related to this PR: https://github.com/apache/airflow/pull/28588 ?


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