Bug 225268

Summary: start-local-buildbot-server should fail gracefully for Python 2
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, clopez, jbedard, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=222540
Attachments:
Description Flags
[fast-cq] Patch none

Description Aakash Jain 2021-05-01 06:33:30 PDT
start-local-buildbot-server currently fails with a confusing error when run with python2. 

[CISupport]$python start-local-buildbot-server --ews
Setting up virtualenv at /private/var/folders/k1/w4qtfm5j7_v36jwtf1zg50n00000gn/T/tmpuZB6fl ... 
...
Process Process-1:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "start-local-buildbot-server", line 291, in _start_server
    if check_tcp_port_open('localhost', self._server_pb_port):
  File "start-local-buildbot-server", line 79, in check_tcp_port_open
    except ConnectionRefusedError:
NameError: global name 'ConnectionRefusedError' is not defined


ConnectionRefusedError is a built-in exception in Python 3, but doesn't work in Python 2. Instead of failing with this exception, we should gracefully exit when the script is invoked with Python 2 and print a proper error message.
Comment 1 Aakash Jain 2021-05-01 06:34:31 PDT
Created attachment 427496 [details]
[fast-cq] Patch
Comment 3 EWS 2021-05-01 18:32:21 PDT
Committed r276878 (237224@main): <https://commits.webkit.org/237224@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427496 [details].
Comment 4 Radar WebKit Bug Importer 2021-05-01 18:33:13 PDT
<rdar://problem/77424789>