Skip to content
  • Jakob Meng's avatar
    2bf82c26
    Temporarily set job openstack-tox-linters-ansible-2.9 to non-voting · 2bf82c26
    Jakob Meng authored
    Python module rstcheck which is used by ansible-test deprecated
    Python versions prior 3.7 in version 3.5.0 and removed support
    in 4.0.0 [1]. Ubuntu 18.04 LTS (Bionic Beaver) comes with Python
    3.6 by default, so rstcheck prints a FutureWarning which confuses
    ansible-test:
    
      Run command: ***/python -m rstcheck --report warning
      --ignore-substitutions _,br,release,today,version
      docs/openstack_guidelines.rst
      Traceback (most recent call last):
        File "***/ansible-test", line 28, in <module>
          main()
        File "***/ansible-test", line 24, in main
          cli_main()
        File "***/ansible_test/_internal/cli.py", line 130, in main
          args.func(config)
        File "***/ansible_test/_internal/sanity/__init__.py", line 193,
        in command_sanity
          result = test.test(args, sanity_targets, version)
        File "***/ansible_test/_internal/sanity/rstcheck.py", line 80,
        in test
          results = parse_to_list_of_dict(pattern, stderr)
        File "***/ansible_test/_internal/util.py", line 799, in
        parse_to_list_of_dict
          raise Exception('Pattern "%s" did not match values:\n%s' %
          (pattern, '\n'.join(unmatched)))
      Exception: Pattern "^(?P<path>[^:]*):(?P<line>[0-9]+):
      \((?P<level>INFO|WARNING|ERROR|SEVERE)/[0-4]\) (?P<message>.*)$"
      did not match values:
      ***/rstcheck.py:51: FutureWarning: Python versions prior 3.7 are
      deprecated. Please update your python version.
        FutureWarning
      ERROR: Command "/usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=***/
      ansible_collections/openstack/cloud LC_ALL=en_US.UTF-8 ***/python3.6
      ***/ansible-test sanity -v --python 3.6 --skip-test
      metaclass-boilerplate --skip-test future-import-boilerplate plugins/
      docs/ meta/ scripts/ --metadata ***.json --truncate 0 --redact
      --color no --requirements" returned exit status 1.
    
    We cannot constrain the version of rstcheck which ansible-test installs
    into its Python virtual environment. This has to be fixed in Ansible
    itself, a pull request against Ansible 2.9 has been opened [2].
    
    Ref.:
    [1] https://github.com/myint/rstcheck/blob/master/README.rst
    [2] https://github.com/ansible/ansible/pull/77568
    
    As a workaround we temporarily set our Ubuntu 18.04 based linter job
    openstack-tox-linters-ansible-2.9 to non-voting and remove it from
    check dependencies and as a gate job.
    
    Thanks to Arx Cruz and Jesper Schmitz Mouridsen for pointing out this
    issue and its root cause ☺️
    
    Change-Id: Ic6f2febc5a40a29534ac4c7f41f714865099086a
    2bf82c26
    Temporarily set job openstack-tox-linters-ansible-2.9 to non-voting
    Jakob Meng authored
    Python module rstcheck which is used by ansible-test deprecated
    Python versions prior 3.7 in version 3.5.0 and removed support
    in 4.0.0 [1]. Ubuntu 18.04 LTS (Bionic Beaver) comes with Python
    3.6 by default, so rstcheck prints a FutureWarning which confuses
    ansible-test:
    
      Run command: ***/python -m rstcheck --report warning
      --ignore-substitutions _,br,release,today,version
      docs/openstack_guidelines.rst
      Traceback (most recent call last):
        File "***/ansible-test", line 28, in <module>
          main()
        File "***/ansible-test", line 24, in main
          cli_main()
        File "***/ansible_test/_internal/cli.py", line 130, in main
          args.func(config)
        File "***/ansible_test/_internal/sanity/__init__.py", line 193,
        in command_sanity
          result = test.test(args, sanity_targets, version)
        File "***/ansible_test/_internal/sanity/rstcheck.py", line 80,
        in test
          results = parse_to_list_of_dict(pattern, stderr)
        File "***/ansible_test/_internal/util.py", line 799, in
        parse_to_list_of_dict
          raise Exception('Pattern "%s" did not match values:\n%s' %
          (pattern, '\n'.join(unmatched)))
      Exception: Pattern "^(?P<path>[^:]*):(?P<line>[0-9]+):
      \((?P<level>INFO|WARNING|ERROR|SEVERE)/[0-4]\) (?P<message>.*)$"
      did not match values:
      ***/rstcheck.py:51: FutureWarning: Python versions prior 3.7 are
      deprecated. Please update your python version.
        FutureWarning
      ERROR: Command "/usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=***/
      ansible_collections/openstack/cloud LC_ALL=en_US.UTF-8 ***/python3.6
      ***/ansible-test sanity -v --python 3.6 --skip-test
      metaclass-boilerplate --skip-test future-import-boilerplate plugins/
      docs/ meta/ scripts/ --metadata ***.json --truncate 0 --redact
      --color no --requirements" returned exit status 1.
    
    We cannot constrain the version of rstcheck which ansible-test installs
    into its Python virtual environment. This has to be fixed in Ansible
    itself, a pull request against Ansible 2.9 has been opened [2].
    
    Ref.:
    [1] https://github.com/myint/rstcheck/blob/master/README.rst
    [2] https://github.com/ansible/ansible/pull/77568
    
    As a workaround we temporarily set our Ubuntu 18.04 based linter job
    openstack-tox-linters-ansible-2.9 to non-voting and remove it from
    check dependencies and as a gate job.
    
    Thanks to Arx Cruz and Jesper Schmitz Mouridsen for pointing out this
    issue and its root cause ☺️
    
    Change-Id: Ic6f2febc5a40a29534ac4c7f41f714865099086a
Loading