~sircmpwn/git.sr.ht#197:
remote prints python stack trace on git push even though the push succeeds

running git push gave the following output in my terminal:

Enumerating objects: 39, done.
Counting objects: 100% (39/39), done.
Delta compression using up to 8 threads
Compressing objects: 100% (29/29), done.
Writing objects: 100% (29/29), 5.95 KiB | 1.98 MiB/s, done.
Total 29 (delta 24), reused 0 (delta 0)
remote: Traceback (most recent call last):
remote:   File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
remote:     (self.host, self.port), self.timeout, **extra_kw)
remote:   File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
remote:     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
remote:   File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
remote:     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
remote: socket.gaierror: [Errno -3] Try again
remote: 
remote: During handling of the above exception, another exception occurred:
remote: 
remote: Traceback (most recent call last):
remote:   File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
remote:     chunked=chunked)
remote:   File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
remote:     self._validate_conn(conn)
remote:   File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
remote:     conn.connect()
remote:   File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
remote:     conn = self._new_conn()
remote:   File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
remote:     self, "Failed to establish a new connection: %s" % e)
remote: urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f8af2c1eac8>: Failed to establish a new connection: [Errno -3] Try again
remote: 
remote: During handling of the above exception, another exception occurred:
remote: 
remote: Traceback (most recent call last):
remote:   File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
remote:     timeout=timeout
remote:   File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
remote:     _stacktrace=sys.exc_info()[2])
remote:   File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
remote:     raise MaxRetryError(_pool, url, error or ResponseError(cause))
remote: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='builds.sr.ht', port=443): Max retries exceeded with url: /api/jobs (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8af2c1eac8>: Failed to establish a new connection: [Errno -3] Try again',))
remote: 
remote: During handling of the above exception, another exception occurred:
remote: 
remote: Traceback (most recent call last):
remote:   File "hooks/post-update", line 55, in <module>
remote:     do_post_update(repo, refs)
remote:   File "/usr/lib/python3.6/site-packages/gitsrht/submit.py", line 156, in do_post_update
remote:     s.submit(commit)
remote:   File "/usr/lib/python3.6/site-packages/scmsrht/submit.py", line 35, in submit
remote:     self._do_submit(raw_manifests, commit)
remote:   File "/usr/lib/python3.6/site-packages/scmsrht/submit.py", line 91, in _do_submit
remote:     headers=webhook_headers, timeout=3)
remote:   File "/usr/lib/python3.6/site-packages/requests/api.py", line 112, in post
remote:     return request('post', url, data=data, json=json, **kwargs)
remote:   File "/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
remote:     return session.request(method=method, url=url, **kwargs)
remote:   File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
remote:     resp = self.send(prep, **send_kwargs)
remote:   File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
remote:     r = adapter.send(request, **kwargs)
remote:   File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 513, in send
remote:     raise ConnectionError(e, request=request)
remote: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='builds.sr.ht', port=443): Max retries exceeded with url: /api/jobs (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8af2c1eac8>: Failed to establish a new connection: [Errno -3] Try again',))
To git.sr.ht:~andres/bedrock2
   65017ae..e6e1a5e  master -> master

Which made me think that the push failed. But when I checked, it turned out that the commits were pushed. However, no build was triggered on dispatch.sr.ht.

Status
RESOLVED INVALID
Submitter
~samuelgruetter
Assigned to
No-one
Submitted
6 months ago
Updated
6 months ago
Labels
No labels applied.

~sircmpwn REPORTED INVALID 6 months ago

I think this is a transient issue. Can you let me know if it recurs?

~samuelgruetter 6 months ago

I'll post again if it occurs again.

But in any case, the output that the remote sends to my terminal should be something more concise like push succeeded, but triggering a build on builds.sr.ht failed instead of the whole stack trace. Or if you want to keep the stack trace for better debugging, a concise message of what happened should be at the very end. (I agree that this is low-priority ;))

Register here or Log in to comment, or comment via email.