Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3-ansible-lint: update to 24.9.2; python3-ansible-compat: update to 24.9.1. #52326

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

Vinfall
Copy link
Contributor

@Vinfall Vinfall commented Sep 24, 2024

Testing the changes

  • I tested the changes in this PR: yes

Local build testing

  • I built this PR locally for my native architecture, x86_64-glibc, x86_64-musl

Note

Basically a dep refresh, and I adapted template to fit the new upstream versioning scheme.

Test summary with `make_check=ci-skip`

=========================== short test summary info ============================
FAILED .xbps-testdir/1727148759/usr/lib/python3.12/site-packages/ansiblelint/rules/loop_var_prefix.py::test_loop_var_prefix[fail]
FAILED .xbps-testdir/1727148759/usr/lib/python3.12/site-packages/ansiblelint/rules/loop_var_prefix.py::test_loop_var_prefix[pass]
FAILED test/test_file_utils.py::test_normpath_path[resolve-symlink] - Asserti...
FAILED test/rules/test_syntax_check.py::test_syntax_check_role - AssertionErr...
FAILED .xbps-testdir/1727148759/usr/lib/python3.12/site-packages/ansiblelint/rules/role_name.py::test_role_name_path[fail]
FAILED .xbps-testdir/1727148759/usr/lib/python3.12/site-packages/ansiblelint/rules/var_naming.py::test_var_naming_with_role_prefix_plays
FAILED test/test_include_miss_file_with_role.py::test_cases_warning_message
FAILED test/test_rules_collection.py::test_rules_id_format - AssertionError: ...
FAILED test/test_include_miss_file_with_role.py::test_cases_that_do_not_report[inplace]
FAILED test/test_skip_inside_yaml.py::test_role_tasks_with_block - assert 1 == 4
FAILED test/test_runner.py::test_include_wrong_syntax[3] - assert 45 == 2
FAILED test/test_include_miss_file_with_role.py::test_cases_that_do_not_report[relative]
FAILED test/test_schemas.py::test_spdx - Failed: SPDX license list inside gal...
FAILED test/test_app.py::test_generate_ignore - AssertionError: assert 'vars....
FAILED test/test_transformer.py::test_transformer[multiline_msg_with_indent_indicator]
FAILED test/test_transformer.py::test_transformer[strings] - assert '---\n# M...
FAILED test/test_transformer.py::test_transformer[no_jinja_when] - assert 64 ...
FAILED test/test_task_includes.py::test_included_tasks[role_with_task_inclusions]
FAILED test/test_yaml_utils.py::test_fmt[13] - AssertionError: assert '---\nW...
FAILED test/test_main.py::test_call_from_outside_venv[normal] - FileNotFoundE...
FAILED test/test_main.py::test_call_from_outside_venv[isolated] - FileNotFoun...
FAILED test/test_main.py::test_nodeps[1] - FileNotFoundError: [Errno 2] No su...
FAILED test/test_main.py::test_nodeps[2] - FileNotFoundError: [Errno 2] No su...
FAILED test/test_main.py::test_broken_ansible_cfg - FileNotFoundError: [Errno...
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727149049/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR .xbps-testdir/1727151241/usr/lib/python3.12/site-packages/ansiblelint/rules
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
ERROR src/ansiblelint/rules - ValueError: Plugin already registered under a d...
============= 24 failed, 869 passed, 24 errors in 87.10s (0:01:27) =============
=> ERROR: python3-ansible-lint-24.9.2_1: do_check: 'PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" PY_IGNORE_IMPORTMISMATCH=1 ${make_check_pre} pytest3 ${testjobs} ${make_check_args} ${make_check_target}' exited with 1        
=> ERROR:   in do_check() at common/build-style/python3-pep517.sh:36 

Test log

=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://repo-default.voidlinux.org/current/bootstrap/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/bootstrap/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> python3-ansible-compat-24.9.1_1: removing autodeps, please wait...
=> python3-ansible-compat-24.9.1_1: building with [python3-pep517] [python3] for x86_64...
   [host] python3-wheel-0.44.0_1: found (https://repo-default.voidlinux.org/current)
   [host] python3-setuptools_scm-8.1.0_1: found (https://repo-default.voidlinux.org/current)
   [host] python3-build-1.2.2_1: found (https://repo-default.voidlinux.org/current)
   [host] python3-installer-0.7.0_2: found (https://repo-default.voidlinux.org/current)
   [check] ansible-core-2.17.4_1: found (https://repo-default.voidlinux.org/current)
   [check] python3-jsonschema-4.23.0_1: found (https://repo-default.voidlinux.org/current)
   [check] python3-subprocess-tee-0.4.1_2: found (https://repo-default.voidlinux.org/current)
   [check] python3-yaml-6.0.2_1: found (https://repo-default.voidlinux.org/current)
   [check] python3-pytest-8.3.1_1: found (https://repo-default.voidlinux.org/current)
   [check] python3-pytest-mock-3.14.0_1: found (https://repo-default.voidlinux.org/current)
   [runtime] ansible-core-2.17.4_1: found (https://repo-default.voidlinux.org/current)
   [runtime] python3-jsonschema-4.23.0_1: found (https://repo-default.voidlinux.org/current)
   [runtime] python3-subprocess-tee-0.4.1_2: found (https://repo-default.voidlinux.org/current)
   [runtime] python3-yaml-6.0.2_1: found (https://repo-default.voidlinux.org/current)
=> python3-ansible-compat-24.9.1_1: installing host dependencies: python3-wheel-0.44.0_1 python3-setuptools_scm-8.1.0_1 python3-build-1.2.2_1 python3-installer-0.7.0_2 ansible-core-2.17.4_1 python3-jsonschema-4.23.0_1 python3-subprocess-tee-0.4.1_2 python3-yaml-6.0.2_1 python3-pytest-8.3.1_1 python3-pytest-mock-3.14.0_1 ...
=> python3-ansible-compat-24.9.1_1: running do_check ...
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.1, pluggy-1.5.0
rootdir: /builddir/python3-ansible-compat-24.9.1
configfile: pyproject.toml
testpaths: test
plugins: mock-3.14.0
collected 108 items

test/test_api.py .                                                       [  0%]
test/test_config.py ..........                                           [ 10%]
test/test_configuration_example.py .                                     [ 11%]
test/test_loaders.py .                                                   [ 12%]
test/test_prerun.py .                                                    [ 12%]
test/test_runtime.py ................................................... [ 60%]
...................................                                      [ 92%]
test/test_runtime_example.py .                                           [ 93%]
test/test_runtime_scan_path.py ..                                        [ 95%]
test/test_schema.py ...                                                  [ 98%]
test/test_types.py .                                                     [ 99%]
test/test_version.py .                                                   [100%]

======================= 108 passed in 152.97s (0:02:32) ========================

@Vinfall
Copy link
Contributor Author

Vinfall commented Sep 25, 2024

Looks like these two specific tests failed when running inside venv regarding missing rust toolchain (needed to compile deps, e.g. python3-cryptography, from source, which are already packaged in void), I guess it's unrelated then.

Test log

=> python3-ansible-compat-24.9.1_1: running do_check ...
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.1, pluggy-1.5.0
rootdir: /builddir/python3-ansible-compat-24.9.1
configfile: pyproject.toml
testpaths: test
plugins: mock-3.14.0
collected 108 items

test/test_api.py .                                                       [  0%]
test/test_config.py ..........                                           [ 10%]
test/test_configuration_example.py .                                     [ 11%]
test/test_loaders.py .                                                   [ 12%]
test/test_prerun.py .                                                    [ 12%]
test/test_runtime.py ................................................... [ 60%]
...................................                                      [ 92%]
test/test_runtime_example.py .                                           [ 93%]
test/test_runtime_scan_path.py EE                                        [ 95%]
test/test_schema.py ...                                                  [ 98%]
test/test_types.py .                                                     [ 99%]
test/test_version.py .                                                   [100%]

==================================== ERRORS ====================================
________ ERROR at setup of test_scan_sys_path[scanF-raises_not_foundT] _________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fb35d2c5df0>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def venv_module(tmp_path_factory: pytest.TempPathFactory) -> VirtualEnvironment:
        """Create a virtualenv in a temporary directory.
    
        :param tmp_path: pytest fixture for temp path
        :return: VirtualEnvironment instance
        """
        test_project = tmp_path_factory.mktemp(basename="test_project-", numbered=True)
        _venv = VirtualEnvironment(test_project)
>       _venv.create()

test/conftest.py:127: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/conftest.py:74: in create
    self.install(f"{__file__}/../..")
test/conftest.py:82: in install
    subprocess.check_call(args=cmd)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

popenargs = ()
kwargs = {'args': ['/tmp/pytest-of-root/pytest-0/test_project-0/venv/bin/python', '-m', 'pip', 'install', '/builddir/python3-ansible-compat-24.9.1/test/conftest.py/../..']}
retcode = 1
cmd = ['/tmp/pytest-of-root/pytest-0/test_project-0/venv/bin/python', '-m', 'pip', 'install', '/builddir/python3-ansible-compat-24.9.1/test/conftest.py/../..']

    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.
    
        The arguments are the same as for the call function.  Example:
    
        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '['/tmp/pytest-of-root/pytest-0/test_project-0/venv/bin/python', '-m', 'pip', 'install', '/builddir/python3-ansible-compat-24.9.1/test/conftest.py/../..']' returned non-zero exit status 1.

/usr/lib/python3.12/subprocess.py:413: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
Processing /builddir/python3-ansible-compat-24.9.1
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting ansible-core>=2.14 (from ansible-compat==24.9.1)
  Downloading ansible_core-2.17.4-py3-none-any.whl.metadata (6.9 kB)
Collecting packaging (from ansible-compat==24.9.1)
  Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting PyYAML (from ansible-compat==24.9.1)
  Downloading PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl.metadata (2.1 kB)
Collecting subprocess-tee>=0.4.1 (from ansible-compat==24.9.1)
  Downloading subprocess_tee-0.4.2-py3-none-any.whl.metadata (3.3 kB)
Collecting jsonschema>=4.6.0 (from ansible-compat==24.9.1)
  Downloading jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Collecting jinja2>=3.0.0 (from ansible-core>=2.14->ansible-compat==24.9.1)
  Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting cryptography (from ansible-core>=2.14->ansible-compat==24.9.1)
  Downloading cryptography-43.0.1.tar.gz (686 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 686.9/686.9 kB 63.6 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
---------------------------- Captured stderr setup -----------------------------
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
________ ERROR at setup of test_scan_sys_path[scanT-raises_not_foundF] _________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fb35d2c5df0>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def venv_module(tmp_path_factory: pytest.TempPathFactory) -> VirtualEnvironment:
        """Create a virtualenv in a temporary directory.
    
        :param tmp_path: pytest fixture for temp path
        :return: VirtualEnvironment instance
        """
        test_project = tmp_path_factory.mktemp(basename="test_project-", numbered=True)
        _venv = VirtualEnvironment(test_project)
>       _venv.create()

test/conftest.py:127: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/conftest.py:74: in create
    self.install(f"{__file__}/../..")
test/conftest.py:82: in install
    subprocess.check_call(args=cmd)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

popenargs = ()
kwargs = {'args': ['/tmp/pytest-of-root/pytest-0/test_project-0/venv/bin/python', '-m', 'pip', 'install', '/builddir/python3-ansible-compat-24.9.1/test/conftest.py/../..']}
retcode = 1
cmd = ['/tmp/pytest-of-root/pytest-0/test_project-0/venv/bin/python', '-m', 'pip', 'install', '/builddir/python3-ansible-compat-24.9.1/test/conftest.py/../..']

    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.
    
        The arguments are the same as for the call function.  Example:
    
        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '['/tmp/pytest-of-root/pytest-0/test_project-0/venv/bin/python', '-m', 'pip', 'install', '/builddir/python3-ansible-compat-24.9.1/test/conftest.py/../..']' returned non-zero exit status 1.

/usr/lib/python3.12/subprocess.py:413: CalledProcessError
=========================== short test summary info ============================
ERROR test/test_runtime_scan_path.py::test_scan_sys_path[scanF-raises_not_foundT]
ERROR test/test_runtime_scan_path.py::test_scan_sys_path[scanT-raises_not_foundF]
================== 106 passed, 2 errors in 107.74s (0:01:47) ===================
=> ERROR: python3-ansible-compat-24.9.1_1: do_check: 'PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" PY_IGNORE_IMPORTMISMATCH=1 ${make_check_pre} pytest3 ${testjobs} ${make_check_args} ${make_check_target}' exited with 1
=> ERROR:   in do_check() at common/build-style/python3-pep517.sh:36

Error: Process completed with exit code 1.

Would run checks locally on x86_64-musl to confirm that. Did not investigate any further since deselecting them do no harm to the actual installed system package. 106/108 passed tests is good enough for me.

@Vinfall Vinfall marked this pull request as ready for review September 25, 2024 03:58
@Vinfall Vinfall changed the title Ansible update python3-ansible-lint: update to 24.9.2; python3-ansible-compat: update to 24.9.1. Sep 25, 2024
@classabbyamp classabbyamp merged commit 5bf74a5 into void-linux:master Sep 27, 2024
8 checks passed
@Vinfall Vinfall deleted the ansible-update branch September 27, 2024 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants