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/12/15 22:04:28 UTC

[GitHub] [airflow] vchiapaikeo opened a new issue, #28393: Webserver reports "ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class"

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

   ### Apache Airflow Provider(s)
   
   google
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow                           2.5.0   
   apache-airflow-providers-apache-beam     4.1.0    
   apache-airflow-providers-cncf-kubernetes 5.0.0     
   apache-airflow-providers-google          8.6.0 
   apache-airflow-providers-grpc            3.1.0    
   
   ### Apache Airflow version
   
   2.5.0
   
   ### Operating System
   
   Debian 11
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   KubernetesExecutor
   
   ### What happened
   
   We are seeing this stacktrace on our webserver when a task is clicked:
   
   ```
   10.253.8.251 - - [15/Dec/2022:18:32:58 +0000] "GET /object/next_run_datasets/recs_ranking_purchase_ranker_dag HTTP/1.1" 200 2 "https://web.airflow.etsy-syseng-gke-prod.etsycloud.com/dags/recs_ranking_purchase_ranker_dag/code" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
       raise ImportError(f'Module "{module_path}" does not define a "{class_name}" attribute/class')
     File "/home/airflow/.local/lib/python3.9/site-packages/airflow/utils/module_loading.py", line 38, in import_string
       imported_class = import_string(class_name)
     File "/home/airflow/.local/lib/python3.9/site-packages/airflow/providers_manager.py", line 275, in _sanity_check
   Traceback (most recent call last):
   
   During handling of the above exception, another exception occurred:
   
   AttributeError: module 'airflow.providers.google.cloud.operators.mlengine' has no attribute 'AIPlatformConsoleLink'
       return getattr(module, class_name)
     File "/home/airflow/.local/lib/python3.9/site-packages/airflow/utils/module_loading.py", line 36, in import_string
   Traceback (most recent call last):
   [2022-12-15 18:32:58,068] {providers_manager.py:243} WARNING - Exception when importing 'airflow.providers.google.cloud.operators.mlengine.AIPlatformConsoleLink' from 'apache-airflow-providers-google' package
   ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class
   ```
   
   
   ### What you think should happen instead
   
   These errors should now appear. 
   
   ### How to reproduce
   
   Start webserver anew, navigate to a dag, click on a task, and tail webserver logs
   
   ### Anything else
   
   [This YAML file](https://github.com/apache/airflow/blob/providers-google/8.6.0/airflow/providers/google/provider.yaml#L968) is being utilized as config which then results in the import error here: https://github.com/apache/airflow/blob/providers-google/8.6.0/airflow/providers_manager.py#L885-L891
   
   ```
   extra-links:
     - airflow.providers.google.cloud.operators.bigquery.BigQueryConsoleLink
     - airflow.providers.google.cloud.operators.bigquery.BigQueryConsoleIndexableLink
     - airflow.providers.google.cloud.operators.mlengine.AIPlatformConsoleLink
   ```
   
   We should remove this from extra-links as it was removed as of apache-airflow-providers-google 8.5.0
   
   ### Are you willing to submit PR?
   
   - [X] 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] eladkal closed issue #28393: Webserver reports "ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class"

Posted by GitBox <gi...@apache.org>.
eladkal closed issue #28393: Webserver reports "ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class"
URL: https://github.com/apache/airflow/issues/28393


-- 
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] vchiapaikeo commented on issue #28393: Webserver reports "ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class"

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

   Looks like the additions were properly added here: https://github.com/apache/airflow/pull/26836/files#diff-b8d2d329a113cf05d9bbd18b125843e86a3ce5c3c39704d29ad58bb83bb07861R1035-R1039
   
   PR for removal is here: https://github.com/apache/airflow/pull/28449


-- 
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] uranusjr commented on issue #28393: Webserver reports "ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class"

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

   AIPlatformConsoleLink was removed (replaced by individual operator links) in #26836 but the declaration never got updated. We should probably add a pre-commit hook to prevent this from happening in the future.


-- 
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] vchiapaikeo commented on issue #28393: Webserver reports "ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class"

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

   Hey @uranusjr , I'm happy to remove this from the config but modifying the pre-commit hook is a bit outside my wheelhouse. Is it okay if we scope the pre-commit hook edits out to another issue instead?


-- 
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] uranusjr commented on issue #28393: Webserver reports "ImportError: Module "airflow.providers.google.cloud.operators.mlengine" does not define a "AIPlatformConsoleLink" attribute/class"

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

   You can submit a PR to do the removal (and additions—see #26836 for what hooks were added) and the pre-commit check can be dealt separately later.


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