Closed
Bug 1049446
Opened 10 years ago
Closed 10 years ago
Add timeouts to buildapi's urllib.urlopen() requests
Categories
(Release Engineering :: General, defect)
Release Engineering
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
(Keywords: buildapi)
Attachments
(2 files)
8.38 KB,
patch
|
nthomas
:
review+
|
Details | Diff | Splinter Review |
919 bytes,
patch
|
Callek
:
review+
nthomas
:
checked-in+
|
Details | Diff | Splinter Review |
buildapi equivalent of bug 884115 and friends. Should help the blocking that we're seeing as part of bug 1049430 comment 2.
Assignee | ||
Comment 1•10 years ago
|
||
urllib.urlopen() doesn't support the timeout param, unlike urllib2.urlopen(). Helpfully, urllib2 doesn't support urlencode() or quote() - so we have to use a mixture of the two (some parts of buildapi are already using a mixture). I'm _hopeful_ but not 100% sure that the switch from urllib.urlopen() to urllib2.urlopen() shouldn't affect any of the consumers in this patch. See also: http://www.hacksparrow.com/python-difference-between-urllib-and-urllib2.html http://stackoverflow.com/a/2018074 Using a timeout of 30 seconds, the same as in mozharness. Note https://docs.python.org/2/library/urllib2.html describes this as "timeout in seconds for blocking operations like the connection attempt" - ie: the content transfer itself doesn't have to complete in under 30 seconds.
Attachment #8468377 -
Flags: review?(nthomas)
Comment 2•10 years ago
|
||
Comment on attachment 8468377 [details] [diff] [review] Add timeouts to buildapi's urllib.urlopen() requests Review of attachment 8468377 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Per https://wiki.mozilla.org/ReleaseEngineering/How_To/Update_BuildAPI please bump the version to 0.3.2 in setup.py when you land. There's a matching puppet patch to write, but I can handle the rest.
Attachment #8468377 -
Flags: review?(nthomas) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Thank you :-) remote: https://hg.mozilla.org/build/buildapi/rev/d573598ac0f2 remote: https://hg.mozilla.org/build/buildapi/rev/66f1d42de07d
Comment 4•10 years ago
|
||
Attachment #8471143 -
Flags: review?(bugspam.Callek)
Comment 5•10 years ago
|
||
Deployed to the server side, staging and production (with bug 1043996).
Updated•10 years ago
|
Attachment #8471143 -
Flags: review?(bugspam.Callek) → review+
Comment 6•10 years ago
|
||
Comment on attachment 8471143 [details] [diff] [review] [puppet] Update selfserve-agent https://hg.mozilla.org/build/puppet/rev/440f95e73d3b https://hg.mozilla.org/build/puppet/rev/b8b75c09b948
Attachment #8471143 -
Flags: checked-in+
Comment 7•10 years ago
|
||
Puppet deployed this to the 5 instances of selfserve-agent.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•10 years ago
|
||
:-)
Updated•7 years ago
|
Component: Tools → General
You need to log in
before you can comment on or make changes to this bug.
Description
•