-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRFLOW-4335] Add default num_retries to GCP connection #5117
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5117 +/- ##
==========================================
- Coverage 78.07% 77.96% -0.12%
==========================================
Files 465 465
Lines 29784 29828 +44
==========================================
Hits 23254 23254
- Misses 6530 6574 +44
Continue to review full report at Codecov.
|
This is to solve #5043 |
@kaxil PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the change a lot. I think you need to squash it and rebase and we should be good to go.
@@ -60,6 +60,7 @@ def __init__(self, | |||
gcp_conn_id=bigquery_conn_id, delegate_to=delegate_to) | |||
self.use_legacy_sql = use_legacy_sql | |||
self.location = location | |||
self.num_retries = self._get_field('num_retries', 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like that you take values from parameters of Google Connection :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone is interested in this subject then the source of the idea is this comment: #5054 (comment)
@@ -71,6 +71,12 @@ Scopes (comma separated) | |||
issue `AIRFLOW-2522 | |||
<https://issues.apache.org/jira/browse/AIRFLOW-2522>`_. | |||
|
|||
Number of Retries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love that you remembered about documentation!
docs/howto/connection/gcp.rst
Outdated
@@ -71,6 +71,12 @@ Scopes (comma separated) | |||
issue `AIRFLOW-2522 | |||
<https://issues.apache.org/jira/browse/AIRFLOW-2522>`_. | |||
|
|||
Number of Retries | |||
Integer, number of times to retry with randomized | |||
exponential backoff. If all retries fail, the HttpError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the class role to create a link to the documentation
Example:
AAA :class:`~airflow.HttpError` BBBB
Reference:
http://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html
c5d7cd2
to
c38d6bc
Compare
Unfortunately there was a transient error in Travis (I hope we can get rid of those soon). Looks good, but It would be great if you reword commit message as after squash it has some duplication in. |
c38d6bc
to
7d26926
Compare
Add default num_retries to GCP connection
7d26926
to
826ebc6
Compare
@potiuk Done. |
@potiuk you'll need to close the ticket and target it to 2.0.0 :) |
Yeah. If I only could :). Waiting for the rights to be able to do so ;) |
Also I think decision on what to merge for 1.10.4 will be done by release manager :) |
Add default num_retries to GCP connection (cherry picked from commit 16e7e61)
Add default num_retries to GCP connection (cherry picked from commit 16e7e61)
Add default num_retries to GCP connection
Add default num_retries to GCP connection
Add default num_retries to GCP connection (cherry picked from commit 16e7e61)
Add default num_retries to GCP connection
Make sure you have checked all steps below.
Jira
Description
Tests
Commits
Documentation
Code Quality
flake8