Comment 0 for bug 1906436

Revision history for this message
Chad Smith (chad.smith) wrote : Resolve autopkgtest failures Pep8 on Xenial and Bionic

Cherry-picking upstream changes for ESM Product renaming and messaging 1901627 triggered autopkgtest failures on Xenial and Bionic during SRU review. Also changes in the base cloud-images used for testing dropped pep8 package from the build environment and unittests rely on calling pep8 on Cenial and Bionic. minimally a build-depends on pep8 needs to be added and pep8 test failures addresssed.

This does not directly affect Focal or later because update-notifier moved to pycodestyle validation in tests instead of using pep8.

Initial pep8 build-dependency error on Xenial/Bionic autopkgtests:

Fetched 4 B in 0s (0 B/s)
....Get:1 http://localhost:17195/canary-file.txt [4 B]
Fetched 4 B in 0s (0 B/s)
.E
======================================================================
ERROR: test_pep8_clean (test_pep8.TestPep8Clean)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.RQGkx9/build.3cC/src/tests/test_pep8.py", line 32, in test_pep8_clean
    ["pep8", "--ignore={0}".format(IGNORE_PEP8), py_file])
  File "/usr/lib/python3.5/subprocess.py", line 557, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'pep8'

Once resolving the build-depends: example pep8 test failures: seen running nosetests3 on update-notifier on Xenial amd Bionic

./tmp/autopkgtest.wN63go/build.IFg/src/tests/../data/apt_check.py:157:21: W503 line break before binary operator ....

autopackage test failure logs showing missing pep8 dependency:

xenial: update-notifier/3.168.11
   - autopkg logs: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-xenial/xenial/amd64/u/update-notifier/20201016_043912_51752@/log.gz

bionic: update-notifier/3.192.1.8
    - autopkg failures: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/u/update-notifier/20201016_045656_8c126@/log.gz

focal: update-notifier/3.192.30.1
  - rejected this upload in Focal to reduce SRU thrashing because a followup will be provided for Focal anyway to sync with Xenial and Bionic.