Changeset - c097de5ccc8a
[Not reviewed]
0 4 0
Branko Majic (branko) - 2 years ago 2023-11-20 00:38:23
branko@majic.rs
MAR-184: Update package versions for pip upgrade checks virtual environments:

- Should provide better test coverage compared to previously since
newer versions of pip-tools have slightly different ways of resolving
packages, as well as output formats.
4 files changed with 53 insertions and 22 deletions:
0 comments (0 inline, 0 general)
docs/releasenotes.rst
Show inline comments
 
@@ -28,12 +28,15 @@ run applications using Debian-only repositories.
 
    for Python virtual environments that are used for the checks
 
    themselves. This is particularly helpful in cases where Python
 
    version gets deprecated and some packages do not correctly declare
 
    the minimum version required, allowing to be more specific to
 
    avoid unnecessary warning mails being sent out.
 

	
 
  * Updated default package pins for virtual environments used to
 
    check for available pip package upgrades.
 

	
 
* ``xmpp_server`` role
 

	
 
  * Drop dependency on the external (Prosody) package
 
    repository. Install everything using official Debian
 
    repositories. This should help avoid future issues with Prosody
 
    project removing older versions of packages or dropping entire
docs/rolereference.rst
Show inline comments
 
@@ -419,13 +419,13 @@ Parameters
 
**pip_check_requirements_in** (list, optional, ``[pip, pip-tools, setuptools, wheel]``)
 
  List of Python package requirements inputs to use for checking for
 
  package upgrades for the Python 2 virtual environment used to run
 
  the check itself. For Python 3, see the dedicated parameter
 
  ``pip_check_requirements_py3`` below.
 

	
 
**pip_check_requirements** (list, optional, ``[click==7.0, pip-tools==4.0.0, pip==19.2.3, setuptools==41.2.0, six==1.12.0, wheel==0.33.6]``)
 
**pip_check_requirements** (list, optional, ``[click==7.1.2, pip-tools==5.5.0, pip==20.3.4, setuptools==44.1.1, wheel==0.37.1]``)
 
  List of Python package requirements to install in Python 2 virtual
 
  environment in order to be able to run the ``pip-tools``
 
  applications as part of pip requirements upgrade checks. This list
 
  needs to be updated from time to time as the new releases of
 
  ``pip-tools`` and related packages are coming out. For Python 3, see
 
  the dedicated parameter ``pip_check_requirements_py3`` below.
 
@@ -433,20 +433,38 @@ Parameters
 
**pip_check_requirements_py3_in** (list, optional, ``[pip, pip-tools, setuptools, wheel]``)
 
  List of Python package requirements inputs to use for checking for
 
  package upgrades for the Python 3 virtual environment used to run
 
  the check itself. For Python 2, see the dedicated parameter
 
  ``pip_check_requirements`` above.
 

	
 
**pip_check_requirements_py3** (list, optional, ``[click==7.0, pip-tools==3.9.0, pip==19.1.1, setuptools==41.2.0, six==1.12.0, wheel==0.33.6]``)
 
**pip_check_requirements_py3** (list, optional, ``see below``)
 
  List of Python package requirements to install in Python 3 virtual
 
  environment in order to be able to run the ``pip-tools``
 
  applications as part of pip requirements upgrade checks. This list
 
  needs to be updated from time to time as the new releases of
 
  ``pip-tools`` and related packages are coming out. For Python 2, see
 
  the dedicated parameter ``pip_check_requirements`` above.
 

	
 
  Default value is:
 

	
 
  .. code-block:: yaml
 

	
 
    - build==1.0.3
 
    - click==8.1.7
 
    - importlib-metadata==6.7.0
 
    - packaging==23.2
 
    - pip-tools==6.14.0
 
    - pip==23.1.2
 
    - pyproject-hooks==1.0.0
 
    - setuptools==68.0.0
 
    - tomli==2.0.1
 
    - typing-extensions==4.7.1
 
    - wheel==0.41.3
 
    - zipp==3.15.0
 

	
 

	
 
**pipreqcheck_uid** (integer, optional, ``whatever OS picks``)
 
  UID for user running the pip requirements upgrade checks. User is created with
 
  name ``pipreqcheck``.
 

	
 
**pipreqcheck_gid** (integer, optional, ``whatever OS picks``)
 
  GID for user running the pip requirements upgrade checks. Group is created
roles/common/defaults/main.yml
Show inline comments
 
@@ -16,29 +16,34 @@ pip_check_requirements_in:
 
  - pip
 
  - pip-tools
 
  - setuptools
 
  - wheel
 
pip_check_requirements:
 
  - click==7.1.2
 
  - pip-tools==5.3.1
 
  - pip==20.2.4
 
  - pip-tools==5.5.0
 
  - pip==20.3.4
 
  - setuptools==44.1.1
 
  - six==1.15.0
 
  - wheel==0.35.1
 
  - wheel==0.37.1
 
pip_check_requirements_py3_in:
 
  - pip
 
  - pip-tools
 
  - setuptools
 
  - wheel
 
pip_check_requirements_py3:
 
  - click==7.1.2
 
  - pip-tools==5.3.1
 
  - pip==20.2.4
 
  - setuptools==50.3.2
 
  - six==1.15.0
 
  - wheel==0.35.1
 
  - build==1.0.3
 
  - click==8.1.7
 
  - importlib-metadata==6.7.0
 
  - packaging==23.2
 
  - pip-tools==6.14.0
 
  - pip==23.1.2
 
  - pyproject-hooks==1.0.0
 
  - setuptools==68.0.0
 
  - tomli==2.0.1
 
  - typing-extensions==4.7.1
 
  - wheel==0.41.3
 
  - zipp==3.15.0
 
ntp_servers: []
 
maintenance: false
 
maintenance_allowed_hosts: []
 

	
 
# Internal use only.
 
prompt_colour_mapping:
roles/common/molecule/default/tests/test_default.py
Show inline comments
 
@@ -303,25 +303,30 @@ def test_pipreqcheck_requirements(host, requirements_in_path, requirements_txt_p
 
        assert requirements_txt.mode == 0o640
 

	
 

	
 
@pytest.mark.parametrize("pip_path, expected_packages",  [
 
    ('/var/lib/pipreqcheck/virtualenv/bin/pip', [
 
        "click==7.1.2",
 
        "pip-tools==5.3.1",
 
        "pip==20.2.4",
 
        "pip-tools==5.5.0",
 
        "pip==20.3.4",
 
        "setuptools==44.1.1",
 
        "six==1.15.0",
 
        "wheel==0.35.1",
 
        "wheel==0.37.1",
 
    ]),
 
    ('/var/lib/pipreqcheck/virtualenv-py3/bin/pip', [
 
        "click==7.1.2",
 
        "pip-tools==5.3.1",
 
        "pip==20.2.4",
 
        "setuptools==50.3.2",
 
        "six==1.15.0",
 
        "wheel==0.35.1",
 
        "build==1.0.3",
 
        "click==8.1.7",
 
        "importlib-metadata==6.7.0",
 
        "packaging==23.2",
 
        "pip-tools==6.14.0",
 
        "pip==23.1.2",
 
        "pyproject_hooks==1.0.0",
 
        "setuptools==68.0.0",
 
        "tomli==2.0.1",
 
        "typing_extensions==4.7.1",
 
        "wheel==0.41.3",
 
        "zipp==3.15.0",
 
    ]),
 
])
 
def test_pipreqcheck_virtualenv_packages(host, pip_path, expected_packages):
 
    """
 
    Tests if correct packages are installed in virtualenv used for pip
 
    requirements checks..
0 comments (0 inline, 0 general)