Staging instance, all changes can be removed at any time

ConnectionError in build_extrinsic_directory_metadata

https://sentry.softwareheritage.org/organizations/swh/issues/10454/?referrer=phabricator_plugin

gaierror: [Errno -2] Name or service not known
  File "urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):

NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f456c52f978>: Failed to establish a new connection: [Errno -2] Name or service not known
  File "urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "urllib3/connectionpool.py", line 841, in _validate_conn
    conn.connect()
  File "urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)

MaxRetryError: HTTPSConnectionPool(host='repo1.maven.org', port=443): Max retries exceeded with url: /maven2/com/tatzan/config-merger/0.0.4/config-merger-0.0.4.pom (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f456c52f978>: Failed to establish a new connection: [Errno -2] Name or service not known'))
  File "requests/adapters.py", line 449, in send
    timeout=timeout
  File "urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))

ConnectionError: HTTPSConnectionPool(host='repo1.maven.org', port=443): Max retries exceeded with url: /maven2/com/tatzan/config-merger/0.0.4/config-merger-0.0.4.pom (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f456c52f978>: Failed to establish a new connection: [Errno -2] Name or service not known'))
(3 additional frame(s) were not displayed)
...
  File "requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)

There should be some retry logic for this, as POM files are loaded from the same host as source code artefacts, so errors are (almost) guaranteed to be temporary


Migrated from T4404 (view on Phabricator)