-
Notifications
You must be signed in to change notification settings - Fork 306
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
fix: populate default timeout
and retry after client-side timeout
#896
Changes from 4 commits
4e37426
4fa81d8
4acdaa6
f1f7395
02f1829
24d1049
725de7d
14bb277
bbfcc53
d1fee5a
10940af
7e7fc5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,10 +160,6 @@ def snippets(session): | |
if os.environ.get("RUN_SNIPPETS_TESTS", "true") == "false": | ||
session.skip("RUN_SNIPPETS_TESTS is set to false, skipping") | ||
|
||
# Sanity check: Only run snippets tests if the environment variable is set. | ||
if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed because for most snippets except for the ones that explicitly use a service account key file, the credentials from gcloud work fine. Downloading service account keys is increasingly restricted on internal projects. |
||
session.skip("Credentials must be set via environment variable.") | ||
|
||
constraints_path = str( | ||
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | ||
) | ||
|
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.
This is the exception I get if I set the timeout to too small of a value for most requests to complete.
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.
Do we need a test for this exception type in
tests/unit/test_retry.py
?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.
Good call. Added.
Looking at the Requests docs, it seems ReadTimeout is just one kind of Timeout error that can happen, so I updated this to the base class and added some tests for other timeouts.