Changeset 269992 in webkit


Ignore:
Timestamp:
Nov 18, 2020 2:50:36 PM (3 years ago)
Author:
aakash_jain@apple.com
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/CISupport/ews-build/steps.py

    r269683 r269992  
    400400        response = None
    401401        try:
    402             response = requests.get(url, params={'Bugzilla_api_key': self.get_bugzilla_api_key()})
     402            response = requests.get(url, timeout=60, params={'Bugzilla_api_key': self.get_bugzilla_api_key()})
    403403            if response.status_code != 200:
    404404                self._addToLog('stdio', 'Accessed {url} with unexpected status code {status_code}.\n'.format(url=url, status_code=response.status_code))
     
    413413        response = None
    414414        try:
    415             response = requests.get(url)
     415            response = requests.get(url, timeout=60)
    416416        except Exception as e:
    417417            if response:
     
    740740    def load_contributors_from_trac(self):
    741741        try:
    742             response = requests.get(self.url)
     742            response = requests.get(self.url, timeout=60)
    743743            if response.status_code != 200:
    744744                self._addToLog('stdio', 'Failed to access {} with status code: {}\n'.format(self.url, response.status_code))
     
    30543054        url = '{}status/{}'.format(EWS_URL, patch_id)
    30553055        try:
    3056             response = requests.get(url)
     3056            response = requests.get(url, timeout=60)
    30573057            if response.status_code != 200:
    30583058                self._addToLog('stdio', 'Failed to access {} with status code: {}\n'.format(url, response.status_code))
  • trunk/Tools/ChangeLog

    r269991 r269992  
     12020-11-18  Aakash Jain  <aakash_jain@apple.com>
     2
     3        [ews] Add timeout to network requests
     4        https://bugs.webkit.org/show_bug.cgi?id=218994
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * CISupport/ews-build/steps.py:
     9        (BugzillaMixin.fetch_data_from_url_with_authentication): Added timeout to requests.get() call.
     10        (BugzillaMixin.fetch_data_from_url): Ditto.
     11        (ValidateCommiterAndReviewer.load_contributors_from_trac): Ditto.
     12        (CheckPatchStatusOnEWSQueues.get_patch_status): Ditto.
     13
    1142020-11-18  Keith Rollin  <krollin@apple.com>
    215
Note: See TracChangeset for help on using the changeset viewer.