#590 Issues widget: crashes if the server isn't accessible
Closed: Fixed 4 years ago Opened 4 years ago by abompard.

In Fedora infra staging, the bugzilla server is not network-accessible, and it causes a crash in the issues widget (displaying 500 errors in the widgets).
We should handle those errors.

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python3.6/site-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/hubs/widgets/view.py", line 121, in dispatch_request
    context = self.get_context(instance, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/hubs/widgets/issues/views.py", line 42, in get_context
    [bugzilla, bzcnt] = GetBugzillaBugs(instance)()
  File "/usr/lib/python3.6/site-packages/hubs/widgets/caching.py", line 69, in get_data
    key, self.execute, should_cache_fn=self._should_cache)
  File "/usr/lib/python3.6/site-packages/dogpile/cache/region.py", line 833, in get_or_create
    async_creator) as value:
  File "/usr/lib/python3.6/site-packages/dogpile/lock.py", line 154, in __enter__
    return self._enter()
  File "/usr/lib/python3.6/site-packages/dogpile/lock.py", line 94, in _enter
    generated = self._enter_create(createdtime)
  File "/usr/lib/python3.6/site-packages/dogpile/lock.py", line 145, in _enter_create
    created = self.creator()
  File "/usr/lib/python3.6/site-packages/dogpile/cache/region.py", line 800, in gen_value
    created_value = creator()
  File "/usr/lib/python3.6/site-packages/hubs/widgets/issues/functions.py", line 27, in execute
    response = requests.get(endpoint.format(mode, email)).json()
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='bugzilla.redhat.com', port=443): Max retries exceeded with url: /jsonrpc.cgi?method=Bug.search&params=[%7B%22creator%22:%22aurelien@example.com%22,%22status%22:[%22NEW%22,%22VERIFIED%22,%22ASSIGNED%22,%22MODIFIED%22,%22ON_DEV%22,%22ON_QA%22,%22RELEASE_PENDING%22,%22POST%22]%7D] (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6d68bca320>: Failed to establish a new connection: [Errno 111] Connection refused',))

Metadata Update from @abompard:
- Issue assigned to abompard

4 years ago

Login to comment on this ticket.

Metadata