sgomezf commented on issue #31648:
URL: https://github.com/apache/airflow/issues/31648#issuecomment-1572325675

   I got some errors in DAG import regarding deprecated objets in cncf so I 
upgraded to
   `apache-airflow-providers-cncf-kubernetes==7.0.0
   `
   Updated connections to be (I use workload identity):
   
   `google-cloud-platform://?lifetime=7200&num_retries=5
   `
   Installed the google provider with code in fix, and got the following error:
   
   ```
   [2023-06-01, 15:48:04 UTC] {__init__.py:155} DEBUG - inlets: [], outlets: []
   [2023-06-01, 15:48:04 UTC] {crypto.py:83} WARNING - empty cryptography key - 
values will not be stored encrypted.
   [2023-06-01, 15:48:04 UTC] {base.py:73} INFO - Using connection ID 
'gcp_conn' for task execution.
   [2023-06-01, 15:48:04 UTC] {kubernetes_engine.py:288} INFO - Fetching 
cluster (project_id=<PROJECT-ID>, location=<LOCATION>, 
cluster_name=<CLUSTER-NAME>)
   [2023-06-01, 15:48:04 UTC] {credentials_provider.py:364} INFO - Getting 
connection using `google.auth.default()` since no explicit credentials are 
provided.
   [2023-06-01, 15:48:04 UTC] {_default.py:213} DEBUG - Checking None for 
explicit credentials as part of auth process...
   [2023-06-01, 15:48:04 UTC] {_default.py:186} DEBUG - Checking Cloud SDK 
credentials as part of auth process...
   [2023-06-01, 15:48:04 UTC] {_default.py:192} DEBUG - Cloud SDK credentials 
not found on disk; not using them
   [2023-06-01, 15:48:04 UTC] {_http_client.py:104} DEBUG - Making request: GET 
http://169.254.169.254
   [2023-06-01, 15:48:04 UTC] {_http_client.py:104} DEBUG - Making request: GET 
http://metadata.google.internal/computeMetadata/v1/project/project-id
   [2023-06-01, 15:48:04 UTC] {taskinstance.py:1824} ERROR - Task failed with 
exception
   Traceback (most recent call last):
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/cloud/operators/kubernetes_engine.py",
 line 501, in execute
       self.fetch_cluster_info()
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/cloud/operators/kubernetes_engine.py",
 line 506, in fetch_cluster_info
       cluster = self.cluster_hook.get_cluster(
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/common/hooks/base_google.py",
 line 484, in inner_wrapper
       return func(self, *args, **kwargs)
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/cloud/hooks/kubernetes_engine.py",
 line 295, in get_cluster
       return self.get_cluster_manager_client().get_cluster(
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/cloud/hooks/kubernetes_engine.py",
 line 95, in get_cluster_manager_client
       self._client = ClusterManagerClient(credentials=self.get_credentials(), 
client_info=CLIENT_INFO)
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/common/hooks/base_google.py",
 line 297, in get_credentials
       credentials, _ = self.get_credentials_and_project_id()
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/common/hooks/base_google.py",
 line 273, in get_credentials_and_project_id
       credentials, project_id = get_credentials_and_project_id(
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/cloud/utils/credentials_provider.py",
 line 373, in get_credentials_and_project_id
       return _CredentialProvider(*args, **kwargs).get_credentials_and_project()
     File 
"/tmp/apache-airflow-providers-google-10.1.1/airflow/providers/google/cloud/utils/credentials_provider.py",
 line 269, in get_credentials_and_project
       source_credentials=credentials.source_credentials,
   AttributeError: 'Credentials' object has no attribute 'source_credentials'
   ```
   
   
   


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