Project

General

Profile

Actions

action #176976

closed

[BCI] test fails in BCI-tests for crypto-policies version

Added by mdati about 1 month ago. Updated 24 days ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
Start date:
2025-02-11
Due date:
% Done:

0%

Estimated time:

Description

Observation

All BCI 15-SP6 / -SP7 tests failed like the following:

openQA test in scenario sle-15-SP6-BCI-Updates-x86_64-bci-base_15.6_on_SLES_15-SP6_podman@64bit fails in
root_BCI-tests_all

Test suite description

The base test suite is used for job templates defined in YAML documents. It has no settings of its own.

Reproducible

Fails since (at least) Build 47.20.5_sles15-image

Expected result

Last good: 47.20.4_sles15-image (or more recent)

Further details

Always latest result in this scenario: latest

Error message:

# Test messages # test_no_downgrade_on_install[container0]
# failure: 

AssertionError: Installed crypto-policies = 150600.3.3.1 is newer than what crypto-policies-scripts requires (= 150600.1.9)
assert <Version('150600.3.3.1')> <= <Version('150600.1.9')>
 +  where <Version('150600.3.3.1')> = <function parse at 0x7f91649b7e20>('150600.3.3.1')
 +    where <function parse at 0x7f91649b7e20> = <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'>.parse
 +      where <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'> = packaging.version
 +  and   <Version('150600.1.9')> = <function parse at 0x7f91649b7e20>('150600.1.9')
 +    where <function parse at 0x7f91649b7e20> = <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'>.parse
 +      where <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'> = packaging.version
container = ContainerData(image_url_or_id='registry.suse.de/suse/sle-15-sp6/update/cr/totest/images/bci/bci-base:15.6', container_...tainerfile='', image_format=None, add_build_tags=[]), forwarded_ports=[], _container_runtime=PodmanRuntime(marks=None))

    @pytest.mark.skipif(
        OS_VERSION not in ALLOWED_BCI_REPO_OS_VERSIONS,
        reason="LTSS containers are known to be non-functional with BCI_repo ",
    )
    @pytest.mark.parametrize(
        "container", _CONTAINERS_WITH_VOLUME_MOUNT, indirect=True
    )
    def test_no_downgrade_on_install(container: ContainerData) -> None:
        """Check that we can install any additional package in the container.

        Check that installing any additional package would not cause a downgrade
        of any package already installed in the container as that would throw
        a question to the user and break the builds.
        """

        conn = container.connection
        conn.run_expect([0], "timeout 2m zypper ref && zypper -n in libsolv-tools")

        conn.check_output(
            "dumpsolv -j /var/cache/zypp/solv/@System/solv > /solv/system"
        )
        conn.check_output(
            f"dumpsolv -j /var/cache/zypp/solv/{BCI_REPO_NAME}/solv > /solv/bci"
        )

        # sanity check
        assert container.container.volume_mounts
        solv_mount = container.container.volume_mounts[-1]
        assert isinstance(solv_mount, BindMount) and solv_mount.host_path

        solv_path = pathlib.Path(solv_mount.host_path)
        with open(solv_path / "system", "r", encoding="utf8") as system_solv_f:
            system_solv = json.load(system_solv_f)
        with open(solv_path / "bci", "r", encoding="utf8") as bci_solv_f:
            bci_solv = json.load(bci_solv_f)

        installed_pkgs = {
            solvable["solvable:name"]: solvable["solvable:evr"]
            for solvable in system_solv["repositories"][0]["solvables"]
        }
        bci_pkgs = {}
        for solvable in bci_solv["repositories"][0]["solvables"]:
            bci_pkgs[solvable["solvable:name"]] = solvable["solvable:evr"]
            if solvable["solvable:name"] in installed_pkgs:
                continue
            for req in solvable.get("solvable:requires", ()):
                # Skip boolean dependencies or unversioned ones
                if "(" in req or " = " not in req:
                    continue
                name, _, version = req.partition(" = ")
                if name in installed_pkgs:
                    installed_version, _, installed_release = installed_pkgs[
                        name
                    ].partition("-")
                    version, _, release = version.partition("-")
                    if installed_version == version and release:
>                       assert packaging.version.parse(
                            installed_release
                        ) <= packaging.version.parse(release), (
                            f"Installed {name} = {installed_release} is newer than "
                            f"what {solvable['solvable:name']} requires (= {release})"
                        )
E                       AssertionError: Installed crypto-policies = 150600.3.3.1 is newer than what crypto-policies-scripts requires (= 150600.1.9)
E                       assert <Version('150600.3.3.1')> <= <Version('150600.1.9')>
E                        +  where <Version('150600.3.3.1')> = <function parse at 0x7f91649b7e20>('150600.3.3.1')
E                        +    where <function parse at 0x7f91649b7e20> = <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'>.parse
E                        +      where <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'> = packaging.version
E                        +  and   <Version('150600.1.9')> = <function parse at 0x7f91649b7e20>('150600.1.9')
E                        +    where <function parse at 0x7f91649b7e20> = <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'>.parse
E                        +      where <module 'packaging.version' from '/root/BCI-tests/.tox/all/lib/python3.11/site-packages/packaging/version.py'> = packaging.version

tests/test_all.py:312: AssertionError
Actions #1

Updated by mdati about 1 month ago

  • Subject changed from test fails in _root_BCI-tests_all_ to test fails in BCI-tests for crypto-policies version
Actions #2

Updated by mdati about 1 month ago

  • Description updated (diff)
Actions #3

Updated by mdati about 1 month ago

  • Description updated (diff)
  • Assignee set to mdati
Actions #4

Updated by rbranco about 1 month ago ยท Edited

  • Assignee changed from mdati to rbranco

Dan: probably the repo hasn't been published yet

https://suse.slack.com/archives/C02AF8LALDA/p1739205977401929

Actions #5

Updated by ph03nix about 1 month ago

  • Tags changed from crypto-policy to crypto-policy, bci
  • Subject changed from test fails in BCI-tests for crypto-policies version to [BCI] test fails in BCI-tests for crypto-policies version
  • Status changed from New to In Progress
Actions #6

Updated by rbranco 24 days ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF