[validations] tox configuration of the queens branch needs to be updated to deal with modules which no longer support the older versions

Bug #1860670 reported by John Fulton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Gael Chamoulaud

Bug Description

While attempting to backport validations to queens, e.g. https://review.opendev.org/#/c/703943 the openstack-tox-pep8 job fails [1][2].

We will probably see more of this in the future as new linters will be working only with newer deps or even python3 only. We can workaround this by disabling pep8 by adding a "-" to the command executed inside tox.

  https://tox.readthedocs.io/en/latest/config.html#conf-commands

It might be OK to ignore pep8 result on maintenance branches.

Either way this bug should result in some modifiction to the tox configuration in the queens branch of the tripleo-validations repos.

[1]
https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_82b/703943/1/check/openstack-tox-pep8/82b01fb/tox/pep8-1.log

Ignoring ruamel.yaml: markers 'python_version == "3.4"' don't match your environment

ERROR: ansible-lint 4.2.0 has requirement ruamel.yaml<1,>=0.15.34; python_version < "3.7", but you'll have ruamel-yaml 0.13.14 which is incompatible.

[2] https://zuul.opendev.org/t/openstack/build/82b01fb8a8c04068a906bf0cb888de58
AttributeError: module 'ruamel.yaml' has no attribute 'YAML'
Examining undercloud-debug.yaml of type playbook
Traceback (most recent call last):
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/bin/ansible-lint", line 8, in <module>
    sys.exit(main())
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__main__.py", line 187, in main
    matches.extend(runner.run())
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 287, in run
    skip_list=self.skip_list))
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 177, in run
    matches.extend(rule.matchtasks(playbookfile, text))
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 87, in matchtasks
    yaml = ansiblelint.utils.append_skipped_rules(yaml, text, file['type'])
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/utils.py", line 596, in append_skipped_rules
    yaml_skip = _append_skipped_rules(pyyaml_data, file_text, file_type)
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/utils.py", line 606, in _append_skipped_rules
    yaml = ruamel.yaml.YAML()
AttributeError: module 'ruamel.yaml' has no attribute 'YAML'
Examining undercloud-service-status.yaml of type playbook
Traceback (most recent call last):
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/bin/ansible-lint", line 8, in <module>
    sys.exit(main())
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__main__.py", line 187, in main
    matches.extend(runner.run())
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 287, in run
    skip_list=self.skip_list))
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 177, in run
    matches.extend(rule.matchtasks(playbookfile, text))
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 87, in matchtasks
    yaml = ansiblelint.utils.append_skipped_rules(yaml, text, file['type'])
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/utils.py", line 596, in append_skipped_rules
    yaml_skip = _append_skipped_rules(pyyaml_data, file_text, file_type)
  File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/utils.py", line 606, in _append_skipped_rules
    yaml = ruamel.yaml.YAML()
AttributeError: module 'ruamel.yaml' has no attribute 'YAML'
/home/zuul/src/opendev.org/openstack/tripleo-validations
ERROR: InvocationError for command /bin/bash tools/ansible-lint.sh (exited with code 1)
pep8 finish: run-test after 45.18 seconds
pep8 start: run-test-post
pep8 finish: run-test-post after 0.00 seconds
___________________________________ summary ____________________________________
ERROR: pep8: commands failed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/703999

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (stable/queens)

Reviewed: https://review.opendev.org/703999
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=2ab82396ec70a111454aa0b263ff7ad5528f19b5
Submitter: Zuul
Branch: stable/queens

commit 2ab82396ec70a111454aa0b263ff7ad5528f19b5
Author: Gael Chamoulaud (Strider) <email address hidden>
Date: Thu Jan 23 15:25:52 2020 +0100

    Use ansible-lint == 3.5.1 for stable/queens

    To avoid dependency issues with ansible-lint in stable/queens, the
    ansible-lint 3.5.1 release is explicitly used in tox environment.

    Closes-bug: #1860670
    Change-Id: I1c2bf04029818b45bdfff211c7bbd0b662792407
    Signed-off-by: Gael Chamoulaud (Strider) <email address hidden>

tags: added: in-stable-queens
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-2 → ussuri-3
Changed in tripleo:
status: Triaged → Fix Committed
assignee: nobody → Gael Chamoulaud (gael-chamoulaud)
Changed in tripleo:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations queens-eol

This issue was fixed in the openstack/tripleo-validations queens-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.