Title: [269992] trunk/Tools
- Revision
- 269992
- Author
- [email protected]
- Date
- 2020-11-18 14:50:36 -0800 (Wed, 18 Nov 2020)
Log Message
[ews] Add timeout to network requests
https://bugs.webkit.org/show_bug.cgi?id=218994
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(BugzillaMixin.fetch_data_from_url_with_authentication): Added timeout to requests.get() call.
(BugzillaMixin.fetch_data_from_url): Ditto.
(ValidateCommiterAndReviewer.load_contributors_from_trac): Ditto.
(CheckPatchStatusOnEWSQueues.get_patch_status): Ditto.
Modified Paths
Diff
Modified: trunk/Tools/CISupport/ews-build/steps.py (269991 => 269992)
--- trunk/Tools/CISupport/ews-build/steps.py 2020-11-18 22:48:09 UTC (rev 269991)
+++ trunk/Tools/CISupport/ews-build/steps.py 2020-11-18 22:50:36 UTC (rev 269992)
@@ -399,7 +399,7 @@
def fetch_data_from_url_with_authentication(self, url):
response = None
try:
- response = requests.get(url, params={'Bugzilla_api_key': self.get_bugzilla_api_key()})
+ response = requests.get(url, timeout=60, params={'Bugzilla_api_key': self.get_bugzilla_api_key()})
if response.status_code != 200:
self._addToLog('stdio', 'Accessed {url} with unexpected status code {status_code}.\n'.format(url="" status_code=response.status_code))
return None
@@ -412,7 +412,7 @@
def fetch_data_from_url(self, url):
response = None
try:
- response = requests.get(url)
+ response = requests.get(url, timeout=60)
except Exception as e:
if response:
self._addToLog('stdio', 'Failed to access {url} with status code {status_code}.\n'.format(url="" status_code=response.status_code))
@@ -739,7 +739,7 @@
def load_contributors_from_trac(self):
try:
- response = requests.get(self.url)
+ response = requests.get(self.url, timeout=60)
if response.status_code != 200:
self._addToLog('stdio', 'Failed to access {} with status code: {}\n'.format(self.url, response.status_code))
return {}
@@ -3053,7 +3053,7 @@
def get_patch_status(self, patch_id, queue):
url = ''.format(EWS_URL, patch_id)
try:
- response = requests.get(url)
+ response = requests.get(url, timeout=60)
if response.status_code != 200:
self._addToLog('stdio', 'Failed to access {} with status code: {}\n'.format(url, response.status_code))
return -1
Modified: trunk/Tools/ChangeLog (269991 => 269992)
--- trunk/Tools/ChangeLog 2020-11-18 22:48:09 UTC (rev 269991)
+++ trunk/Tools/ChangeLog 2020-11-18 22:50:36 UTC (rev 269992)
@@ -1,3 +1,16 @@
+2020-11-18 Aakash Jain <[email protected]>
+
+ [ews] Add timeout to network requests
+ https://bugs.webkit.org/show_bug.cgi?id=218994
+
+ Reviewed by Jonathan Bedard.
+
+ * CISupport/ews-build/steps.py:
+ (BugzillaMixin.fetch_data_from_url_with_authentication): Added timeout to requests.get() call.
+ (BugzillaMixin.fetch_data_from_url): Ditto.
+ (ValidateCommiterAndReviewer.load_contributors_from_trac): Ditto.
+ (CheckPatchStatusOnEWSQueues.get_patch_status): Ditto.
+
2020-11-18 Keith Rollin <[email protected]>
Extend check-for-inappropriate-files-in-framework to check for .tmp files
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes