Bug 210377 - [ews] Improve handling of unexpected network issues while communicating with Bugzilla
Summary: [ews] Improve handling of unexpected network issues while communicating with ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-11 05:26 PDT by Aakash Jain
Modified: 2020-07-01 17:45 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.13 KB, patch)
2020-04-11 05:30 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2020-04-11 05:26:10 PDT
Noticed following exception in ews-app logs. We should handle it in a better manner.

Traceback (most recent call last):
  File "/var/ews/OpenSource/Tools/BuildSlaveSupport/ews-app/ews/fetcher.py", line 50, in run
    BugzillaPatchFetcher().fetch()
  File "/var/ews/OpenSource/Tools/BuildSlaveSupport/ews-app/ews/fetcher.py", line 65, in fetch
    patch_ids = Bugzilla.get_list_of_patches_needing_reviews()
  File "/var/ews/OpenSource/Tools/BuildSlaveSupport/ews-app/ews/common/bugzilla.py", line 135, in get_list_of_patches_needing_reviews
    ids_needing_review = set(BugzillaBeautifulSoup().fetch_attachment_ids_from_review_queue(current_time - timedelta(7)))
  File "/var/ews/OpenSource/Tools/BuildSlaveSupport/ews-app/ews/common/bugzilla.py", line 202, in fetch_attachment_ids_from_review_queue
    return self._parse_attachment_ids_request_query(self._load_query(review_queue_url), since)
  File "/var/ews/OpenSource/Tools/BuildSlaveSupport/ews-app/ews/common/bugzilla.py", line 213, in _load_query
    self.authenticate()
  File "/var/ews/OpenSource/Tools/BuildSlaveSupport/ews-app/ews/common/bugzilla.py", line 183, in authenticate
    response = self.browser.submit()
  File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 684, in submit
    return self.open(self.click(*args, **kwds))
  File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 253, in open 
    return self._mech_open(url_or_request, data, timeout=timeout)
  File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 309, in _mech_open
    raise response
httperror_seek_wrapper: HTTP Error 500: Internal Server Error
Comment 1 Aakash Jain 2020-04-11 05:30:32 PDT
Created attachment 396159 [details]
Patch
Comment 2 EWS 2020-04-13 09:21:08 PDT
Committed r260010: <https://trac.webkit.org/changeset/260010>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396159 [details].
Comment 3 Radar WebKit Bug Importer 2020-04-13 09:22:18 PDT
<rdar://problem/61719265>
Comment 4 Aakash Jain 2020-07-01 17:45:42 PDT
This change seems to be working fine and improved robustness of ews django app. Logs indicates that this retry helped multiple times. e.g.:

2020-04-26 01:34:56,962 - Unexpected error while authenticating to bugzilla.
2020-04-26 01:34:58,252 - 28 r? patches, 0 patches need to be sent to Buildbot: []


2020-05-29 06:51:26,148 - Unexpected error while authenticating to bugzilla.
2020-05-29 06:51:27,487 - 34 r? patches, 0 patches need to be sent to Buildbot: []
2020-05-29 06:51:27,984 - Starting new HTTPS connection (1): bugs.webkit.org
2020-05-29 06:51:28,082 - 0 cq+ patches, 0 patches need to be sent to commit queue: []