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 2020/10/21 07:51:26 UTC

[GitHub] [airflow] kosteev opened a new pull request #11712: Add num_retries parameter for google MLEngine hook requests

kosteev opened a new pull request #11712:
URL: https://github.com/apache/airflow/pull/11712


   This PR addresses the `BrokenPipeError` issue with google MLEngineHook by simply using `num_retries` parameter to introduce retry mechanism.
   The exact issue happens during the `_wait_for_job_done` execution after some period of time ~30mins.
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.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.

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



[GitHub] [airflow] kosteev commented on pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
kosteev commented on pull request #11712:
URL: https://github.com/apache/airflow/pull/11712#issuecomment-713572964


   @mik-laj 
   Yes, sure. Done.


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

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



[GitHub] [airflow] mik-laj edited a comment on pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on pull request #11712:
URL: https://github.com/apache/airflow/pull/11712#issuecomment-713463664


   @kosteev Can you add this explanation to the docstring of `_poll_with_exponential_delay` method?


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

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



[GitHub] [airflow] mik-laj merged pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
mik-laj merged pull request #11712:
URL: https://github.com/apache/airflow/pull/11712


   


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

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



[GitHub] [airflow] mik-laj commented on pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11712:
URL: https://github.com/apache/airflow/pull/11712#issuecomment-713422628


   Why do we need this parameter if we have `_poll_with_exponential_delay` functions? Don't these functions do the same? Don't these functions do similar things?


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

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



[GitHub] [airflow] kosteev commented on pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
kosteev commented on pull request #11712:
URL: https://github.com/apache/airflow/pull/11712#issuecomment-713806434


   @mik-laj Can you, please, take a look again.


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

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



[GitHub] [airflow] kosteev commented on pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
kosteev commented on pull request #11712:
URL: https://github.com/apache/airflow/pull/11712#issuecomment-713435935


   `_poll_with_exponential_delay` is intended to handle api-specific errors, in this case it retries in case of 429 error (and can be extended if needed).
   `num_retries` parameter for `execute` method activates retry mechanism for lower level errors, like `ConnectionError`/`socket.timeot`/`_ssl_SSLError`
   https://github.com/googleapis/google-api-python-client/blob/master/googleapiclient/http.py#L136
   Btw, this parameter is used in all other hooks except this one.
   
   So, they are similar but handle different type of errors.


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

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



[GitHub] [airflow] mik-laj commented on pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11712:
URL: https://github.com/apache/airflow/pull/11712#issuecomment-713463664


   @kosteev Can you add this explanation to the docstring?


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

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



[GitHub] [airflow] mik-laj edited a comment on pull request #11712: Add num_retries parameter for google MLEngine hook requests

Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on pull request #11712:
URL: https://github.com/apache/airflow/pull/11712#issuecomment-713463664


   @kosteev Can you add this explanation to the docstring of _poll_with_exponential_delay method?


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

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