[Webkit-unassigned] [Bug 284133] New: [AutoInstall] retry logic doesn't actually throw on eventual failure

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 5 14:20:56 PST 2024


https://bugs.webkit.org/show_bug.cgi?id=284133

            Bug ID: 284133
           Summary: [AutoInstall] retry logic doesn't actually throw on
                    eventual failure
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gsnedders at apple.com
                CC: jbedard at apple.com, webkit-bug-importer at group.apple.com

https://ews-build.webkit.org/#/builders/28/builds/79120 hit:

```
python3 Tools/Scripts/libraries/resultsdbpy/resultsdbpy/run-tests --verbose --no-selenium --fast-tests
 in dir /Volumes/Data/worker/Services-EWS/build (timeout 900 secs)
 watching logfiles {}
 argv: [b'python3', b'Tools/Scripts/libraries/resultsdbpy/resultsdbpy/run-tests', b'--verbose', b'--no-selenium', b'--fast-tests']
 using PTY: False
Downloading Twisted-21.2.0...
<urlopen error timed out>
Failed to download Twisted, retrying
<urlopen error [Errno 8] nodename nor servname provided, or not known>
Failed to download Twisted, retrying
Failed to install Twisted-21.2.0!
Traceback (most recent call last):
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/run-tests", line 42, in <module>
    from cassandra.cqlengine.management import CQLENG_ALLOW_SCHEMA_MANAGEMENT
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/autoinstalled/python-3-arm64/cassandra/cqlengine/management.py", line 25, in <module>
    from cassandra.cqlengine import columns, query
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/autoinstalled/python-3-arm64/cassandra/cqlengine/query.py", line 24, in <module>
    from cassandra.cqlengine import connection as conn
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/autoinstalled/python-3-arm64/cassandra/cqlengine/connection.py", line 20, in <module>
    from cassandra.cluster import Cluster, _ConfigMode, _NOT_SET, NoHostAvailable, UserTypeDoesNotExist, ConsistencyLevel
  File "cassandra/cluster.py", line 96, in init cassandra.cluster
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/autoinstalled/python-3-arm64/cassandra/io/twistedreactor.py", line 25, in <module>
    from twisted.internet import reactor, protocol
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 982, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 925, in _find_spec
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 703, in find_spec
    loader = cls.find_module(fullname, path=path)
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 717, in find_module
    cls.install(name)
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 690, in install
    return all([to_install.install() for to_install in packages])
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 690, in <listcomp>
    return all([to_install.install() for to_install in packages])
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 337, in install
    archive.unpack(temp_location)
  File "/Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 131, in unpack
    raise IOError('Failed to find archive at {}'.format(self.path))
OSError: Failed to find archive at /Volumes/Data/worker/Services-EWS/build/Tools/Scripts/libraries/autoinstalled/python-3-arm64/Twisted-21.2.whl
program finished with exit code 1
elapsedTime=60.587699
```

While this was during a time while lab network access was flaky, I don't see a way in which we can end up with the distribution package download succeeding (i.e., not raising), but the file not existing.

Unless we've messed up our logic with our…

            while count <= (AutoInstall.times_to_retry or 0):
...
                    if count > (AutoInstall.times_to_retry or 0):
                        raise

Which we probably have, I think. Because I think that conditional is dead, as it'll always be <= due to the guard on the while loop.

This goes back to when we first landed https://commits.webkit.org/238934@main.

This is at least one part of the AutoInstaller we could even write tests for…

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241205/8ae4ca29/attachment.htm>


More information about the webkit-unassigned mailing list