python-tuf icon indicating copy to clipboard operation
python-tuf copied to clipboard

securesystemslib import fails

Open jku opened this issue 3 years ago • 1 comments
trafficstars

From https://github.com/theupdateframework/python-tuf/actions/runs/3249189713/jobs/5331305228

A test file import fails on windows at from securesystemslib.signer import Signature, SSlibSigner (flaky).

This is likely https://github.com/secure-systems-lab/securesystemslib/issues/428.

ERROR: test_api (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_api
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\unittest\loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\unittest\loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "D:\a\python-tuf\python-tuf\tests\test_api.py", line 26, in <module>
    from securesystemslib.signer import Signature, SSlibSigner
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\securesystemslib\signer.py", line 12, in <module>
    import securesystemslib.gpg.functions as gpg
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\securesystemslib\gpg\functions.py", line 23, in <module>
    from securesystemslib.gpg.common import (
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\securesystemslib\gpg\common.py", line 26, in <module>
    from securesystemslib.gpg import util as gpg_util
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\securesystemslib\gpg\util.py", line 34, in <module>
    from securesystemslib.gpg import constants
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\securesystemslib\gpg\constants.py", line 50, in <module>
    elif is_available_gnupg(GPG1_COMMAND):
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\securesystemslib\gpg\constants.py", line 29, in is_available_gnupg
    process.run(gpg_version_cmd, stdout=process.PIPE, stderr=process.PIPE)
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\site-packages\securesystemslib\process.py", line 121, in run
    return subprocess.run(cmd, check=check, timeout=timeout, **kwargs)
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\subprocess.py", line [49](https://github.com/theupdateframework/python-tuf/actions/runs/3249189713/jobs/5331305228#step:5:50)0, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\subprocess.py", line 964, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "C:\hostedtoolcache\windows\Python\3.7.9\x[64](https://github.com/theupdateframework/python-tuf/actions/runs/3249189713/jobs/5331305228#step:5:65)\lib\subprocess.py", line 1298, in _communicate
    raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '['gpg', '--version']' timed out after 3 seconds

jku avatar Oct 18 '22 13:10 jku

I've added the blocked label, needs more analysis if the issue persists after https://github.com/secure-systems-lab/securesystemslib/issues/428

joshuagl avatar Oct 19 '22 08:10 joshuagl