mozilla/frost

Crash if repo no longer exists

hwine opened this issue · 0 comments

hwine commented

A no-longer-existing repo should be reported, but not crash the run.

Trace from Jenkins:

ERROR: Document contain 1 errors
ERROR: Error #1: Could not resolve to a Repository with the name 'mozilla-partners/<redacted>'. (type='NOT_FOUND', path=['repository'], locations=[(line=2, column=1)])
Traceback (most recent call last):
  File "github/cli-wrapper.py", line 31, in <module>
    branch_retrieve_github_data.main()
  File "/pytest-services/github/branches/retrieve_github_data.py", line 591, in main
    repo_data = get_repo_branch_protections(endpoint, repo)
  File "/pytest-services/github/branches/retrieve_github_data.py", line 458, in get_repo_branch_protections
    data = get_nested_branch_data(endpoint, repo)
  File "/pytest-services/github/branches/retrieve_github_data.py", line 285, in get_nested_branch_data
    d = endpoint(op)
  File "/pytest-services/venv/lib/python3.8/site-packages/sgqlc/endpoint/http.py", line 150, in __call__
    with self.urlopen(req, timeout=timeout or self.timeout) as f:
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1393, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
Build step 'Execute shell' marked build as failure