From 378b1061e820141667ef6d8f7384b8fa4e9c8b9a Mon Sep 17 00:00:00 2001 From: bdrx312 Date: Mon, 29 Apr 2024 03:33:37 -0400 Subject: [PATCH 01/27] Fix incorrect version argument will be ignored warning --- changelog/64563.fixed.md | 1 + salt/modules/yumpkg.py | 4 ++-- tests/pytests/functional/states/test_pkg.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelog/64563.fixed.md diff --git a/changelog/64563.fixed.md b/changelog/64563.fixed.md new file mode 100644 index 00000000000..fadd9721fed --- /dev/null +++ b/changelog/64563.fixed.md @@ -0,0 +1 @@ +Fixed incorrect version argument will be ignored for multiple package targets warning when using pkgs argument to yumpkg module. diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index b4ffdc72ce5..a301d93eac3 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -1424,8 +1424,8 @@ def install( 'version': '', 'arch': ''}}} """ - if "version" in kwargs: - kwargs["version"] = str(kwargs["version"]) + if (version := kwargs.get("version")) is not None: + kwargs["version"] = str(version) options = _get_options(**kwargs) if salt.utils.data.is_true(refresh): diff --git a/tests/pytests/functional/states/test_pkg.py b/tests/pytests/functional/states/test_pkg.py index 67ca2500fe3..01d6d5c7f5f 100644 --- a/tests/pytests/functional/states/test_pkg.py +++ b/tests/pytests/functional/states/test_pkg.py @@ -238,7 +238,7 @@ def test_pkg_002_installed_with_version(PKG_TARGETS, states, latest_version): @pytest.mark.requires_salt_states("pkg.installed", "pkg.removed") @pytest.mark.slow_test -def test_pkg_003_installed_multipkg(PKG_TARGETS, modules, states): +def test_pkg_003_installed_multipkg(caplog, PKG_TARGETS, modules, states): """ This is a destructive test as it installs and then removes two packages """ @@ -254,6 +254,7 @@ def test_pkg_003_installed_multipkg(PKG_TARGETS, modules, states): try: ret = states.pkg.installed(name=None, pkgs=PKG_TARGETS, refresh=False) assert ret.result is True + assert "WARNING" not in caplog.text finally: ret = states.pkg.removed(name=None, pkgs=PKG_TARGETS) assert ret.result is True From 1e2e79db754852a44afa1b3f2a193dbc75fbaf13 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 04:03:02 -0700 Subject: [PATCH 02/27] Use FullArgSpec as ArgSpec is deprecated --- tests/unit/states/test_module.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/unit/states/test_module.py b/tests/unit/states/test_module.py index 169106fcfd1..4fd0dcad0bc 100644 --- a/tests/unit/states/test_module.py +++ b/tests/unit/states/test_module.py @@ -3,7 +3,7 @@ """ import logging -from inspect import ArgSpec +from inspect import FullArgSpec import salt.states.module as module from tests.support.mixins import LoaderModuleMockMixin @@ -116,11 +116,25 @@ class ModuleStateTest(TestCase, LoaderModuleMockMixin): @classmethod def setUpClass(cls): - cls.aspec = ArgSpec( - args=["hello", "world"], varargs=None, keywords=None, defaults=False + cls.aspec = FullArgSpec( + args=["hello", "world"], + varargs=None, + varkw=None, + defaults=False, + kwonlyargs=None, + kwonlydefaults=None, + annotations=None, ) - cls.bspec = ArgSpec(args=[], varargs="names", keywords="kwargs", defaults=None) + cls.bspec = FullArgSpec( + args=[], + varargs="names", + varkw=None, + defaults=None, + kwonlyargs="kwargs", + kwonlydefaults=None, + annotations=None, + ) @classmethod def tearDownClass(cls): From 3735415fbcc8611af320f4986831c8a873919a30 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Mon, 24 Jun 2024 03:22:49 -0700 Subject: [PATCH 03/27] Bump requests and docker requirements --- requirements/base.txt | 3 ++- requirements/pytest.txt | 3 ++- requirements/static/ci/lint.in | 3 ++- requirements/static/ci/py3.10/cloud.txt | 6 ++---- requirements/static/ci/py3.10/darwin.txt | 9 +++------ requirements/static/ci/py3.10/docs.txt | 2 +- requirements/static/ci/py3.10/freebsd.txt | 9 +++------ requirements/static/ci/py3.10/lint.txt | 6 ++---- requirements/static/ci/py3.10/linux.txt | 9 +++------ requirements/static/ci/py3.10/windows.txt | 9 +++------ requirements/static/ci/py3.11/cloud.txt | 6 ++---- requirements/static/ci/py3.11/darwin.txt | 9 +++------ requirements/static/ci/py3.11/docs.txt | 2 +- requirements/static/ci/py3.11/freebsd.txt | 9 +++------ requirements/static/ci/py3.11/lint.txt | 6 ++---- requirements/static/ci/py3.11/linux.txt | 9 +++------ requirements/static/ci/py3.11/windows.txt | 9 +++------ requirements/static/ci/py3.12/cloud.txt | 6 ++---- requirements/static/ci/py3.12/darwin.txt | 9 +++------ requirements/static/ci/py3.12/docs.txt | 2 +- requirements/static/ci/py3.12/freebsd.txt | 9 +++------ requirements/static/ci/py3.12/lint.txt | 6 ++---- requirements/static/ci/py3.12/linux.txt | 9 +++------ requirements/static/ci/py3.12/windows.txt | 9 +++------ requirements/static/ci/py3.7/cloud.txt | 4 ++-- requirements/static/ci/py3.7/docs.txt | 2 +- requirements/static/ci/py3.7/freebsd.txt | 4 ++-- requirements/static/ci/py3.7/linux.txt | 4 ++-- requirements/static/ci/py3.7/windows.txt | 4 ++-- requirements/static/ci/py3.8/cloud.txt | 6 ++---- requirements/static/ci/py3.8/docs.txt | 2 +- requirements/static/ci/py3.8/freebsd.txt | 9 +++------ requirements/static/ci/py3.8/lint.txt | 6 ++---- requirements/static/ci/py3.8/linux.txt | 9 +++------ requirements/static/ci/py3.8/windows.txt | 9 +++------ requirements/static/ci/py3.9/cloud.txt | 6 ++---- requirements/static/ci/py3.9/darwin.txt | 9 +++------ requirements/static/ci/py3.9/docs.txt | 2 +- requirements/static/ci/py3.9/freebsd.txt | 9 +++------ requirements/static/ci/py3.9/lint.txt | 6 ++---- requirements/static/ci/py3.9/linux.txt | 9 +++------ requirements/static/ci/py3.9/windows.txt | 9 +++------ requirements/static/pkg/py3.10/darwin.txt | 2 +- requirements/static/pkg/py3.10/freebsd.txt | 2 +- requirements/static/pkg/py3.10/linux.txt | 2 +- requirements/static/pkg/py3.10/windows.txt | 2 +- requirements/static/pkg/py3.11/darwin.txt | 2 +- requirements/static/pkg/py3.11/freebsd.txt | 2 +- requirements/static/pkg/py3.11/linux.txt | 2 +- requirements/static/pkg/py3.11/windows.txt | 2 +- requirements/static/pkg/py3.12/darwin.txt | 2 +- requirements/static/pkg/py3.12/freebsd.txt | 2 +- requirements/static/pkg/py3.12/linux.txt | 2 +- requirements/static/pkg/py3.12/windows.txt | 2 +- requirements/static/pkg/py3.7/freebsd.txt | 2 +- requirements/static/pkg/py3.7/linux.txt | 2 +- requirements/static/pkg/py3.7/windows.txt | 2 +- requirements/static/pkg/py3.8/freebsd.txt | 2 +- requirements/static/pkg/py3.8/linux.txt | 2 +- requirements/static/pkg/py3.8/windows.txt | 2 +- requirements/static/pkg/py3.9/darwin.txt | 2 +- requirements/static/pkg/py3.9/freebsd.txt | 2 +- requirements/static/pkg/py3.9/linux.txt | 2 +- requirements/static/pkg/py3.9/windows.txt | 2 +- 64 files changed, 119 insertions(+), 193 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 31d4f29be11..73010291794 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -5,7 +5,8 @@ jmespath msgpack>=1.0.0 PyYAML MarkupSafe -requests>=1.0.0 +requests>=2.31.0 ; python_version < '3.8' +requests>=2.32.0 ; python_version >= '3.8' distro>=1.0.1 psutil>=5.0.0 packaging>=21.3 diff --git a/requirements/pytest.txt b/requirements/pytest.txt index d53137d6601..ce8b9569125 100644 --- a/requirements/pytest.txt +++ b/requirements/pytest.txt @@ -1,6 +1,7 @@ mock >= 3.0.0 # PyTest -docker +docker >= 7.1.0; python_version >= '3.8' +docker < 7.1.0; python_version < '3.8' pytest >= 7.2.0 pytest-salt-factories >= 1.0.0 pytest-helpers-namespace >= 2019.1.8 diff --git a/requirements/static/ci/lint.in b/requirements/static/ci/lint.in index 977c91fcd47..e715c2fabe5 100644 --- a/requirements/static/ci/lint.in +++ b/requirements/static/ci/lint.in @@ -1,7 +1,8 @@ # Lint requirements --constraint=./py{py_version}/{platform}.txt -docker +docker >= 7.1.0; python_version >= '3.8' +docker < 7.1.0; python_version < '3.8' pylint~=3.1.0 SaltPyLint>=2024.2.2 toml diff --git a/requirements/static/ci/py3.10/cloud.txt b/requirements/static/ci/py3.10/cloud.txt index 0eb2d5177d6..a997fa33723 100644 --- a/requirements/static/ci/py3.10/cloud.txt +++ b/requirements/static/ci/py3.10/cloud.txt @@ -152,7 +152,7 @@ dnspython==2.6.1 # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/pytest.txt @@ -363,7 +363,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -563,7 +562,7 @@ pyzmq==23.2.0 # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt @@ -716,7 +715,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.10/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.10/darwin.txt b/requirements/static/ci/py3.10/darwin.txt index 129898b242a..c830a95799b 100644 --- a/requirements/static/ci/py3.10/darwin.txt +++ b/requirements/static/ci/py3.10/darwin.txt @@ -111,7 +111,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -260,7 +260,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.10/darwin.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 # via @@ -398,7 +397,7 @@ pyzmq==25.1.2 ; sys_platform == "darwin" # -c requirements/static/ci/../pkg/py3.10/darwin.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.10/darwin.txt # -r requirements/base.txt @@ -499,9 +498,7 @@ vultr==1.0.1 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.10/docs.txt b/requirements/static/ci/py3.10/docs.txt index 8f04442954a..e5f2fa06df0 100644 --- a/requirements/static/ci/py3.10/docs.txt +++ b/requirements/static/ci/py3.10/docs.txt @@ -148,7 +148,7 @@ pyzmq==23.2.0 # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.10/freebsd.txt b/requirements/static/ci/py3.10/freebsd.txt index bea5ec1ca29..316c7659cd4 100644 --- a/requirements/static/ci/py3.10/freebsd.txt +++ b/requirements/static/ci/py3.10/freebsd.txt @@ -109,7 +109,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -252,7 +252,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.10/freebsd.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -391,7 +390,7 @@ pyzmq==23.2.0 # -c requirements/static/ci/../pkg/py3.10/freebsd.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.10/freebsd.txt # -r requirements/base.txt @@ -487,9 +486,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.10/lint.txt b/requirements/static/ci/py3.10/lint.txt index b9c4b66f8d1..415b717d338 100644 --- a/requirements/static/ci/py3.10/lint.txt +++ b/requirements/static/ci/py3.10/lint.txt @@ -162,7 +162,7 @@ dnspython==2.6.1 # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/lint.in @@ -365,7 +365,6 @@ packaging==22.0 # -c requirements/static/ci/py3.10/linux.txt # -r requirements/base.txt # ansible-core - # docker paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.10/linux.txt @@ -533,7 +532,7 @@ redis==3.5.3 # via # -c requirements/static/ci/py3.10/linux.txt # redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt @@ -703,7 +702,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.10/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.10/linux.txt b/requirements/static/ci/py3.10/linux.txt index 2641bd1d25f..c77f42ab986 100644 --- a/requirements/static/ci/py3.10/linux.txt +++ b/requirements/static/ci/py3.10/linux.txt @@ -118,7 +118,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -263,7 +263,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.10/linux.txt # -r requirements/base.txt # ansible-core - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -420,7 +419,7 @@ redis-py-cluster==2.1.3 # via -r requirements/static/ci/linux.in redis==3.5.3 # via redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # -r requirements/base.txt @@ -536,9 +535,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.10/windows.txt b/requirements/static/ci/py3.10/windows.txt index cca88510582..5b9624a13bf 100644 --- a/requirements/static/ci/py3.10/windows.txt +++ b/requirements/static/ci/py3.10/windows.txt @@ -102,7 +102,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -237,7 +237,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.10/windows.txt # -r requirements/base.txt - # docker # pytest passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -384,7 +383,7 @@ pyzmq==25.0.2 ; sys_platform == "win32" # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.10/windows.txt # -r requirements/base.txt @@ -474,9 +473,7 @@ virtualenv==20.17.0 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.11/cloud.txt b/requirements/static/ci/py3.11/cloud.txt index 4a745cd4f31..eb7685c6fe3 100644 --- a/requirements/static/ci/py3.11/cloud.txt +++ b/requirements/static/ci/py3.11/cloud.txt @@ -148,7 +148,7 @@ dnspython==2.6.1 # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/pytest.txt @@ -338,7 +338,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -525,7 +524,7 @@ pyzmq==23.2.0 # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt @@ -663,7 +662,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.11/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.11/darwin.txt b/requirements/static/ci/py3.11/darwin.txt index b32c62f48eb..0474319bf16 100644 --- a/requirements/static/ci/py3.11/darwin.txt +++ b/requirements/static/ci/py3.11/darwin.txt @@ -106,7 +106,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -242,7 +242,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.11/darwin.txt # -r requirements/base.txt - # docker # pytest passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -368,7 +367,7 @@ pyzmq==25.1.2 ; sys_platform == "darwin" # -c requirements/static/ci/../pkg/py3.11/darwin.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.11/darwin.txt # -r requirements/base.txt @@ -460,9 +459,7 @@ vultr==1.0.1 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.11/docs.txt b/requirements/static/ci/py3.11/docs.txt index 8a55c4b94f7..67257cbc16a 100644 --- a/requirements/static/ci/py3.11/docs.txt +++ b/requirements/static/ci/py3.11/docs.txt @@ -148,7 +148,7 @@ pyzmq==23.2.0 # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.11/freebsd.txt b/requirements/static/ci/py3.11/freebsd.txt index c0649b96f54..a343e3b7825 100644 --- a/requirements/static/ci/py3.11/freebsd.txt +++ b/requirements/static/ci/py3.11/freebsd.txt @@ -107,7 +107,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -237,7 +237,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.11/freebsd.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in @@ -366,7 +365,7 @@ pyzmq==23.2.0 # -c requirements/static/ci/../pkg/py3.11/freebsd.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.11/freebsd.txt # -r requirements/base.txt @@ -453,9 +452,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.11/lint.txt b/requirements/static/ci/py3.11/lint.txt index 65aef229e1e..120555d68e4 100644 --- a/requirements/static/ci/py3.11/lint.txt +++ b/requirements/static/ci/py3.11/lint.txt @@ -158,7 +158,7 @@ dnspython==2.6.1 # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/lint.in @@ -343,7 +343,6 @@ packaging==22.0 # -c requirements/static/ci/py3.11/linux.txt # -r requirements/base.txt # ansible-core - # docker paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.11/linux.txt @@ -498,7 +497,7 @@ redis==3.5.3 # via # -c requirements/static/ci/py3.11/linux.txt # redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt @@ -649,7 +648,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.11/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.11/linux.txt b/requirements/static/ci/py3.11/linux.txt index a386c6d95b0..485b10fe04d 100644 --- a/requirements/static/ci/py3.11/linux.txt +++ b/requirements/static/ci/py3.11/linux.txt @@ -116,7 +116,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -248,7 +248,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.11/linux.txt # -r requirements/base.txt # ansible-core - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in @@ -395,7 +394,7 @@ redis-py-cluster==2.1.3 # via -r requirements/static/ci/linux.in redis==3.5.3 # via redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # -r requirements/base.txt @@ -502,9 +501,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.11/windows.txt b/requirements/static/ci/py3.11/windows.txt index ea9de77cf1b..10d280d88e3 100644 --- a/requirements/static/ci/py3.11/windows.txt +++ b/requirements/static/ci/py3.11/windows.txt @@ -100,7 +100,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -233,7 +233,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.11/windows.txt # -r requirements/base.txt - # docker # pytest passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -380,7 +379,7 @@ pyzmq==25.0.2 ; sys_platform == "win32" # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.11/windows.txt # -r requirements/base.txt @@ -468,9 +467,7 @@ virtualenv==20.17.0 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.12/cloud.txt b/requirements/static/ci/py3.12/cloud.txt index 09f3d25a844..b8ef4534c2d 100644 --- a/requirements/static/ci/py3.12/cloud.txt +++ b/requirements/static/ci/py3.12/cloud.txt @@ -148,7 +148,7 @@ dnspython==2.6.1 # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/pytest.txt @@ -338,7 +338,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -525,7 +524,7 @@ pyzmq==23.2.0 # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt @@ -663,7 +662,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.12/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.12/darwin.txt b/requirements/static/ci/py3.12/darwin.txt index c8227a620ca..ffbbd194ec6 100644 --- a/requirements/static/ci/py3.12/darwin.txt +++ b/requirements/static/ci/py3.12/darwin.txt @@ -106,7 +106,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -242,7 +242,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.12/darwin.txt # -r requirements/base.txt - # docker # pytest passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -368,7 +367,7 @@ pyzmq==25.1.2 ; sys_platform == "darwin" # -c requirements/static/ci/../pkg/py3.12/darwin.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.12/darwin.txt # -r requirements/base.txt @@ -460,9 +459,7 @@ vultr==1.0.1 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.12/docs.txt b/requirements/static/ci/py3.12/docs.txt index ef54a0f5fec..b32b4b18a24 100644 --- a/requirements/static/ci/py3.12/docs.txt +++ b/requirements/static/ci/py3.12/docs.txt @@ -148,7 +148,7 @@ pyzmq==23.2.0 # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.12/freebsd.txt b/requirements/static/ci/py3.12/freebsd.txt index 776d62349ba..3ec1479d319 100644 --- a/requirements/static/ci/py3.12/freebsd.txt +++ b/requirements/static/ci/py3.12/freebsd.txt @@ -107,7 +107,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -237,7 +237,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.12/freebsd.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in @@ -366,7 +365,7 @@ pyzmq==23.2.0 # -c requirements/static/ci/../pkg/py3.12/freebsd.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.12/freebsd.txt # -r requirements/base.txt @@ -453,9 +452,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.12/lint.txt b/requirements/static/ci/py3.12/lint.txt index 18a938f6c3a..c0cb40aea24 100644 --- a/requirements/static/ci/py3.12/lint.txt +++ b/requirements/static/ci/py3.12/lint.txt @@ -158,7 +158,7 @@ dnspython==2.6.1 # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/lint.in @@ -343,7 +343,6 @@ packaging==22.0 # -c requirements/static/ci/py3.12/linux.txt # -r requirements/base.txt # ansible-core - # docker paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.12/linux.txt @@ -498,7 +497,7 @@ redis==3.5.3 # via # -c requirements/static/ci/py3.12/linux.txt # redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt @@ -649,7 +648,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.12/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.12/linux.txt b/requirements/static/ci/py3.12/linux.txt index 2ebfab472b2..a647e737fb1 100644 --- a/requirements/static/ci/py3.12/linux.txt +++ b/requirements/static/ci/py3.12/linux.txt @@ -116,7 +116,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -248,7 +248,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.12/linux.txt # -r requirements/base.txt # ansible-core - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in @@ -395,7 +394,7 @@ redis-py-cluster==2.1.3 # via -r requirements/static/ci/linux.in redis==3.5.3 # via redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # -r requirements/base.txt @@ -502,9 +501,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.12/windows.txt b/requirements/static/ci/py3.12/windows.txt index 8a0457d2741..c104716e476 100644 --- a/requirements/static/ci/py3.12/windows.txt +++ b/requirements/static/ci/py3.12/windows.txt @@ -100,7 +100,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -233,7 +233,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.12/windows.txt # -r requirements/base.txt - # docker # pytest passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -380,7 +379,7 @@ pyzmq==25.0.2 ; sys_platform == "win32" # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.12/windows.txt # -r requirements/base.txt @@ -468,9 +467,7 @@ virtualenv==20.17.0 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.7/cloud.txt b/requirements/static/ci/py3.7/cloud.txt index 57c077481ab..d2da47f844b 100644 --- a/requirements/static/ci/py3.7/cloud.txt +++ b/requirements/static/ci/py3.7/cloud.txt @@ -167,7 +167,7 @@ dnspython==1.16.0 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==6.1.3 ; python_version < "3.8" # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/pytest.txt @@ -611,7 +611,7 @@ pyzmq==23.2.0 # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # -c requirements/static/ci/py3.7/linux.txt diff --git a/requirements/static/ci/py3.7/docs.txt b/requirements/static/ci/py3.7/docs.txt index 512e5ca8f36..f47c5ecee2e 100644 --- a/requirements/static/ci/py3.7/docs.txt +++ b/requirements/static/ci/py3.7/docs.txt @@ -152,7 +152,7 @@ pyzmq==23.2.0 # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/zeromq.txt -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.7/freebsd.txt b/requirements/static/ci/py3.7/freebsd.txt index 37a74ed3f86..486489b96fd 100644 --- a/requirements/static/ci/py3.7/freebsd.txt +++ b/requirements/static/ci/py3.7/freebsd.txt @@ -120,7 +120,7 @@ dnspython==1.16.0 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==6.1.3 ; python_version < "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -432,7 +432,7 @@ pyzmq==23.2.0 # -c requirements/static/ci/../pkg/py3.7/freebsd.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via # -c requirements/static/ci/../pkg/py3.7/freebsd.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.7/linux.txt b/requirements/static/ci/py3.7/linux.txt index 594ffb2e9de..45d302e07ef 100644 --- a/requirements/static/ci/py3.7/linux.txt +++ b/requirements/static/ci/py3.7/linux.txt @@ -126,7 +126,7 @@ dnspython==1.16.0 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==6.1.3 ; python_version < "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -455,7 +455,7 @@ redis-py-cluster==2.1.3 # via -r requirements/static/ci/linux.in redis==3.5.3 # via redis-py-cluster -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.7/windows.txt b/requirements/static/ci/py3.7/windows.txt index f17c5f42902..a4876a1bb85 100644 --- a/requirements/static/ci/py3.7/windows.txt +++ b/requirements/static/ci/py3.7/windows.txt @@ -109,7 +109,7 @@ dnspython==1.16.0 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==6.1.3 ; python_version < "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -399,7 +399,7 @@ pyzmq==25.0.2 ; sys_platform == "win32" # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via # -c requirements/static/ci/../pkg/py3.7/windows.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.8/cloud.txt b/requirements/static/ci/py3.8/cloud.txt index e1a3e034ca2..dad71be79ec 100644 --- a/requirements/static/ci/py3.8/cloud.txt +++ b/requirements/static/ci/py3.8/cloud.txt @@ -162,7 +162,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/pytest.txt @@ -391,7 +391,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -598,7 +597,7 @@ pyzmq==23.2.0 # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt @@ -761,7 +760,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.8/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.8/docs.txt b/requirements/static/ci/py3.8/docs.txt index e4a7834692a..88f29939285 100644 --- a/requirements/static/ci/py3.8/docs.txt +++ b/requirements/static/ci/py3.8/docs.txt @@ -148,7 +148,7 @@ pyzmq==23.2.0 # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.8/freebsd.txt b/requirements/static/ci/py3.8/freebsd.txt index 13b9753e92d..fb29adecf8b 100644 --- a/requirements/static/ci/py3.8/freebsd.txt +++ b/requirements/static/ci/py3.8/freebsd.txt @@ -115,7 +115,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -273,7 +273,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.8/freebsd.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -419,7 +418,7 @@ pyzmq==23.2.0 # -c requirements/static/ci/../pkg/py3.8/freebsd.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.8/freebsd.txt # -r requirements/base.txt @@ -525,9 +524,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.8/lint.txt b/requirements/static/ci/py3.8/lint.txt index e5c14f3986c..0f29de9ca21 100644 --- a/requirements/static/ci/py3.8/lint.txt +++ b/requirements/static/ci/py3.8/lint.txt @@ -167,7 +167,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/lint.in @@ -386,7 +386,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt # -r requirements/base.txt - # docker paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.8/linux.txt @@ -560,7 +559,7 @@ redis==3.5.3 # via # -c requirements/static/ci/py3.8/linux.txt # redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt @@ -737,7 +736,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.8/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.8/linux.txt b/requirements/static/ci/py3.8/linux.txt index c0773244b1b..a941172a1b4 100644 --- a/requirements/static/ci/py3.8/linux.txt +++ b/requirements/static/ci/py3.8/linux.txt @@ -121,7 +121,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -279,7 +279,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -442,7 +441,7 @@ redis-py-cluster==2.1.3 # via -r requirements/static/ci/linux.in redis==3.5.3 # via redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -r requirements/base.txt @@ -566,9 +565,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.8/windows.txt b/requirements/static/ci/py3.8/windows.txt index f3ca9898d02..b4b7b370aae 100644 --- a/requirements/static/ci/py3.8/windows.txt +++ b/requirements/static/ci/py3.8/windows.txt @@ -104,7 +104,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -239,7 +239,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.8/windows.txt # -r requirements/base.txt - # docker # pytest passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -386,7 +385,7 @@ pyzmq==25.0.2 ; sys_platform == "win32" # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.8/windows.txt # -r requirements/base.txt @@ -477,9 +476,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.9/cloud.txt b/requirements/static/ci/py3.9/cloud.txt index c4175c31613..0fa77246a8f 100644 --- a/requirements/static/ci/py3.9/cloud.txt +++ b/requirements/static/ci/py3.9/cloud.txt @@ -162,7 +162,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/pytest.txt @@ -391,7 +391,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -600,7 +599,7 @@ pyzmq==23.2.0 # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt @@ -763,7 +762,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.9/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.9/darwin.txt b/requirements/static/ci/py3.9/darwin.txt index 56b95b03d9b..c3ea1d2c1f2 100644 --- a/requirements/static/ci/py3.9/darwin.txt +++ b/requirements/static/ci/py3.9/darwin.txt @@ -117,7 +117,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -281,7 +281,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.9/darwin.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 # via @@ -428,7 +427,7 @@ pyzmq==25.1.2 ; sys_platform == "darwin" # -c requirements/static/ci/../pkg/py3.9/darwin.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.9/darwin.txt # -r requirements/base.txt @@ -539,9 +538,7 @@ vultr==1.0.1 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.9/docs.txt b/requirements/static/ci/py3.9/docs.txt index 19f80df0096..f143242e05a 100644 --- a/requirements/static/ci/py3.9/docs.txt +++ b/requirements/static/ci/py3.9/docs.txt @@ -152,7 +152,7 @@ pyzmq==23.2.0 # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/base.txt diff --git a/requirements/static/ci/py3.9/freebsd.txt b/requirements/static/ci/py3.9/freebsd.txt index 7a94ca7c62a..2aea4421744 100644 --- a/requirements/static/ci/py3.9/freebsd.txt +++ b/requirements/static/ci/py3.9/freebsd.txt @@ -115,7 +115,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -273,7 +273,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.9/freebsd.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -421,7 +420,7 @@ pyzmq==23.2.0 # -c requirements/static/ci/../pkg/py3.9/freebsd.txt # -r requirements/zeromq.txt # pytest-salt-factories -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.9/freebsd.txt # -r requirements/base.txt @@ -527,9 +526,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.9/lint.txt b/requirements/static/ci/py3.9/lint.txt index 2a5da53eb93..528d6b19a6d 100644 --- a/requirements/static/ci/py3.9/lint.txt +++ b/requirements/static/ci/py3.9/lint.txt @@ -163,7 +163,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/lint.in @@ -382,7 +382,6 @@ packaging==22.0 # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt # -r requirements/base.txt - # docker paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.9/linux.txt @@ -558,7 +557,7 @@ redis==3.5.3 # via # -c requirements/static/ci/py3.9/linux.txt # redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt @@ -735,7 +734,6 @@ watchdog==0.10.3 websocket-client==0.40.0 # via # -c requirements/static/ci/py3.9/linux.txt - # docker # kubernetes wempy==0.2.1 # via diff --git a/requirements/static/ci/py3.9/linux.txt b/requirements/static/ci/py3.9/linux.txt index 563bd28600d..7ceba7b213f 100644 --- a/requirements/static/ci/py3.9/linux.txt +++ b/requirements/static/ci/py3.9/linux.txt @@ -119,7 +119,7 @@ dnspython==2.6.1 # -r requirements/static/ci/common.in # ciscoconfparse # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -277,7 +277,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -r requirements/base.txt - # docker # pytest paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via @@ -442,7 +441,7 @@ redis-py-cluster==2.1.3 # via -r requirements/static/ci/linux.in redis==3.5.3 # via redis-py-cluster -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -r requirements/base.txt @@ -566,9 +565,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/ci/py3.9/windows.txt b/requirements/static/ci/py3.9/windows.txt index 71e17a79cd8..f286fbcccc3 100644 --- a/requirements/static/ci/py3.9/windows.txt +++ b/requirements/static/ci/py3.9/windows.txt @@ -104,7 +104,7 @@ dnspython==2.6.1 # via # -r requirements/static/ci/common.in # python-etcd -docker==6.1.3 +docker==7.1.0 ; python_version >= "3.8" # via -r requirements/pytest.txt etcd3-py==0.1.6 # via -r requirements/static/ci/common.in @@ -239,7 +239,6 @@ packaging==22.0 # via # -c requirements/static/ci/../pkg/py3.9/windows.txt # -r requirements/base.txt - # docker # pytest passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -387,7 +386,7 @@ pyzmq==25.0.2 ; sys_platform == "win32" # pytest-salt-factories requests-ntlm==1.1.0 # via pywinrm -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -c requirements/static/ci/../pkg/py3.9/windows.txt # -r requirements/base.txt @@ -478,9 +477,7 @@ virtualenv==20.7.2 watchdog==0.10.3 # via -r requirements/static/ci/common.in websocket-client==0.40.0 - # via - # docker - # kubernetes + # via kubernetes wempy==0.2.1 # via -r requirements/static/ci/common.in werkzeug==3.0.3 diff --git a/requirements/static/pkg/py3.10/darwin.txt b/requirements/static/pkg/py3.10/darwin.txt index b860eda060a..352e85425db 100644 --- a/requirements/static/pkg/py3.10/darwin.txt +++ b/requirements/static/pkg/py3.10/darwin.txt @@ -99,7 +99,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.1.2 ; sys_platform == "darwin" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # apache-libcloud diff --git a/requirements/static/pkg/py3.10/freebsd.txt b/requirements/static/pkg/py3.10/freebsd.txt index a812499ca8f..5b70eee0931 100644 --- a/requirements/static/pkg/py3.10/freebsd.txt +++ b/requirements/static/pkg/py3.10/freebsd.txt @@ -89,7 +89,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt setproctitle==1.3.2 # via -r requirements/static/pkg/freebsd.in diff --git a/requirements/static/pkg/py3.10/linux.txt b/requirements/static/pkg/py3.10/linux.txt index cb0821f6af5..9837af9d246 100644 --- a/requirements/static/pkg/py3.10/linux.txt +++ b/requirements/static/pkg/py3.10/linux.txt @@ -87,7 +87,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt rpm-vercmp==0.1.2 # via -r requirements/static/pkg/linux.in diff --git a/requirements/static/pkg/py3.10/windows.txt b/requirements/static/pkg/py3.10/windows.txt index 8b47f4e3851..16140376647 100644 --- a/requirements/static/pkg/py3.10/windows.txt +++ b/requirements/static/pkg/py3.10/windows.txt @@ -108,7 +108,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.0.2 ; sys_platform == "win32" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.11/darwin.txt b/requirements/static/pkg/py3.11/darwin.txt index 4c351dfaa6f..8aa87b6d47e 100644 --- a/requirements/static/pkg/py3.11/darwin.txt +++ b/requirements/static/pkg/py3.11/darwin.txt @@ -99,7 +99,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.1.2 ; sys_platform == "darwin" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # apache-libcloud diff --git a/requirements/static/pkg/py3.11/freebsd.txt b/requirements/static/pkg/py3.11/freebsd.txt index 0c00120e572..34217f8d845 100644 --- a/requirements/static/pkg/py3.11/freebsd.txt +++ b/requirements/static/pkg/py3.11/freebsd.txt @@ -89,7 +89,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt setproctitle==1.3.2 # via -r requirements/static/pkg/freebsd.in diff --git a/requirements/static/pkg/py3.11/linux.txt b/requirements/static/pkg/py3.11/linux.txt index f4a6d28b930..fdda37052ce 100644 --- a/requirements/static/pkg/py3.11/linux.txt +++ b/requirements/static/pkg/py3.11/linux.txt @@ -87,7 +87,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt rpm-vercmp==0.1.2 # via -r requirements/static/pkg/linux.in diff --git a/requirements/static/pkg/py3.11/windows.txt b/requirements/static/pkg/py3.11/windows.txt index 2a3ab618788..8648d4d0a94 100644 --- a/requirements/static/pkg/py3.11/windows.txt +++ b/requirements/static/pkg/py3.11/windows.txt @@ -108,7 +108,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.0.2 ; sys_platform == "win32" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.12/darwin.txt b/requirements/static/pkg/py3.12/darwin.txt index baf8c97f33d..aa0a2da85cd 100644 --- a/requirements/static/pkg/py3.12/darwin.txt +++ b/requirements/static/pkg/py3.12/darwin.txt @@ -99,7 +99,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.1.2 ; sys_platform == "darwin" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # apache-libcloud diff --git a/requirements/static/pkg/py3.12/freebsd.txt b/requirements/static/pkg/py3.12/freebsd.txt index 4e6d7ca14ca..5f0118af88c 100644 --- a/requirements/static/pkg/py3.12/freebsd.txt +++ b/requirements/static/pkg/py3.12/freebsd.txt @@ -89,7 +89,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt setproctitle==1.3.2 # via -r requirements/static/pkg/freebsd.in diff --git a/requirements/static/pkg/py3.12/linux.txt b/requirements/static/pkg/py3.12/linux.txt index fcfd7bc2d20..c7acdd062a7 100644 --- a/requirements/static/pkg/py3.12/linux.txt +++ b/requirements/static/pkg/py3.12/linux.txt @@ -87,7 +87,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt rpm-vercmp==0.1.2 # via -r requirements/static/pkg/linux.in diff --git a/requirements/static/pkg/py3.12/windows.txt b/requirements/static/pkg/py3.12/windows.txt index cd75b2a8d18..57a8aae61de 100644 --- a/requirements/static/pkg/py3.12/windows.txt +++ b/requirements/static/pkg/py3.12/windows.txt @@ -108,7 +108,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.0.2 ; sys_platform == "win32" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.7/freebsd.txt b/requirements/static/pkg/py3.7/freebsd.txt index 511abe0cad7..db76b8d06af 100644 --- a/requirements/static/pkg/py3.7/freebsd.txt +++ b/requirements/static/pkg/py3.7/freebsd.txt @@ -87,7 +87,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via -r requirements/base.txt setproctitle==1.3.2 # via -r requirements/static/pkg/freebsd.in diff --git a/requirements/static/pkg/py3.7/linux.txt b/requirements/static/pkg/py3.7/linux.txt index 1fbd1d13569..96aee564ac4 100644 --- a/requirements/static/pkg/py3.7/linux.txt +++ b/requirements/static/pkg/py3.7/linux.txt @@ -85,7 +85,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via -r requirements/base.txt rpm-vercmp==0.1.2 # via -r requirements/static/pkg/linux.in diff --git a/requirements/static/pkg/py3.7/windows.txt b/requirements/static/pkg/py3.7/windows.txt index b264b0e4d0b..9328483442a 100644 --- a/requirements/static/pkg/py3.7/windows.txt +++ b/requirements/static/pkg/py3.7/windows.txt @@ -109,7 +109,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.0.2 ; sys_platform == "win32" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.31.0 ; python_version < "3.8" # via # -r requirements/base.txt # -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.8/freebsd.txt b/requirements/static/pkg/py3.8/freebsd.txt index ec75accaad4..bbea4709b00 100644 --- a/requirements/static/pkg/py3.8/freebsd.txt +++ b/requirements/static/pkg/py3.8/freebsd.txt @@ -87,7 +87,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt setproctitle==1.3.2 # via -r requirements/static/pkg/freebsd.in diff --git a/requirements/static/pkg/py3.8/linux.txt b/requirements/static/pkg/py3.8/linux.txt index b5151d758a9..6c5ed4a3008 100644 --- a/requirements/static/pkg/py3.8/linux.txt +++ b/requirements/static/pkg/py3.8/linux.txt @@ -85,7 +85,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt rpm-vercmp==0.1.2 # via -r requirements/static/pkg/linux.in diff --git a/requirements/static/pkg/py3.8/windows.txt b/requirements/static/pkg/py3.8/windows.txt index 299b8b4dcdb..4aad72e3e2f 100644 --- a/requirements/static/pkg/py3.8/windows.txt +++ b/requirements/static/pkg/py3.8/windows.txt @@ -109,7 +109,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.0.2 ; sys_platform == "win32" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.9/darwin.txt b/requirements/static/pkg/py3.9/darwin.txt index 6200b39d76e..a9559e40b8b 100644 --- a/requirements/static/pkg/py3.9/darwin.txt +++ b/requirements/static/pkg/py3.9/darwin.txt @@ -99,7 +99,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.1.2 ; sys_platform == "darwin" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # apache-libcloud diff --git a/requirements/static/pkg/py3.9/freebsd.txt b/requirements/static/pkg/py3.9/freebsd.txt index 2ad4b2529de..93e263fb218 100644 --- a/requirements/static/pkg/py3.9/freebsd.txt +++ b/requirements/static/pkg/py3.9/freebsd.txt @@ -89,7 +89,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt setproctitle==1.3.2 # via -r requirements/static/pkg/freebsd.in diff --git a/requirements/static/pkg/py3.9/linux.txt b/requirements/static/pkg/py3.9/linux.txt index 5902b17a3dc..acc0aacd5fa 100644 --- a/requirements/static/pkg/py3.9/linux.txt +++ b/requirements/static/pkg/py3.9/linux.txt @@ -87,7 +87,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==23.2.0 # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via -r requirements/base.txt rpm-vercmp==0.1.2 # via -r requirements/static/pkg/linux.in diff --git a/requirements/static/pkg/py3.9/windows.txt b/requirements/static/pkg/py3.9/windows.txt index de300d6afb0..4f1d8efd7d8 100644 --- a/requirements/static/pkg/py3.9/windows.txt +++ b/requirements/static/pkg/py3.9/windows.txt @@ -109,7 +109,7 @@ pyyaml==6.0.1 # via -r requirements/base.txt pyzmq==25.0.2 ; sys_platform == "win32" # via -r requirements/zeromq.txt -requests==2.31.0 +requests==2.32.3 ; python_version >= "3.8" # via # -r requirements/base.txt # -r requirements/windows.txt From dfd6221cc55d0860505f32c6d947178eae1131eb Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 03:22:17 -0700 Subject: [PATCH 04/27] Fix salt cloud's log_file location when root_dir is given in config --- changelog/64728.fixed.md | 1 + salt/config/__init__.py | 2 +- tests/pytests/functional/test_config.py | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 changelog/64728.fixed.md diff --git a/changelog/64728.fixed.md b/changelog/64728.fixed.md new file mode 100644 index 00000000000..0d18efed6f3 --- /dev/null +++ b/changelog/64728.fixed.md @@ -0,0 +1 @@ +Cloud honors root_dir config settin when determining log file location diff --git a/salt/config/__init__.py b/salt/config/__init__.py index 0af8c0c1f46..965da432222 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -2765,7 +2765,7 @@ def cloud_config( # prepend root_dir prepend_root_dirs = ["cachedir"] if "log_file" in opts and urllib.parse.urlparse(opts["log_file"]).scheme == "": - prepend_root_dirs.append(opts["log_file"]) + prepend_root_dirs.append("log_file") prepend_root_dir(opts, prepend_root_dirs) salt.features.setup_features(opts) diff --git a/tests/pytests/functional/test_config.py b/tests/pytests/functional/test_config.py index 76d25118f4a..e03a3b42d19 100644 --- a/tests/pytests/functional/test_config.py +++ b/tests/pytests/functional/test_config.py @@ -25,3 +25,16 @@ def test_minion_config_type_check(caplog): assert msg not in caplog.text finally: os.remove(path) + + +def test_cloud_config_relative_logfile(tmp_path): + root_path = tmp_path + config_path = tmp_path / "conf" + config_path.mkdir() + cloud_config = config_path / "cloud" + cloud_config.write_text("") + master_config = config_path / "master" + master_config = config_path / "master" + master_config.write_text(f"root_dir: {root_path}") + opts = salt.config.cloud_config(cloud_config) + assert opts["log_file"] == str(root_path / "var" / "log" / "salt" / "cloud") From 57d2becb8fdf560d0f2fb7f55ac2e5a3ddb2e933 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 08:20:29 -0700 Subject: [PATCH 05/27] Add basic unit test for prepend_root_dir method --- tests/pytests/unit/test_config.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/pytests/unit/test_config.py b/tests/pytests/unit/test_config.py index 7437c8214ed..9ffc41dc6c4 100644 --- a/tests/pytests/unit/test_config.py +++ b/tests/pytests/unit/test_config.py @@ -5,6 +5,8 @@ tests.pytests.unit.test_config Unit tests for salt's config modulet """ +import sys + import salt.config @@ -21,3 +23,13 @@ def test_call_id_function(tmp_path): } ret = salt.config.call_id_function(opts) assert ret == "meh" + + +def test_prepend_root_dir(tmp_path): + root = tmp_path / "root" + opts = { + "root_dir": root, + "foo": "c:\\var\\foo" if sys.platform == "win32" else "/var/foo", + } + salt.config.prepend_root_dir(opts, ["foo"]) + assert opts["foo"] == str(root / "var" / "foo") From 9bfe7cf89876846598b3a39ed6d03482c455acdb Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 10:00:09 -0700 Subject: [PATCH 06/27] Fix cloud config root_dir paths on windows --- salt/config/__init__.py | 9 ++++++++- tests/pytests/functional/test_config.py | 15 ++++++++++++++- tests/pytests/unit/test_config.py | 6 ++++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/salt/config/__init__.py b/salt/config/__init__.py index 965da432222..3bb8404fedd 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -2215,6 +2215,13 @@ def include_config(include, orig_path, verbose, exit_on_config_errors=False): return configuration +def should_prepend_root_dir(key, opts): + return ( + key in opts + and urllib.parse.urlparse(os.path.splitdrive(opts[key])[1]).scheme == "" + ) + + def prepend_root_dir(opts, path_options): """ Prepends the options that represent filesystem paths with value of the @@ -2764,7 +2771,7 @@ def cloud_config( # prepend root_dir prepend_root_dirs = ["cachedir"] - if "log_file" in opts and urllib.parse.urlparse(opts["log_file"]).scheme == "": + if should_prepend_root_dir("log_file", opts): prepend_root_dirs.append("log_file") prepend_root_dir(opts, prepend_root_dirs) diff --git a/tests/pytests/functional/test_config.py b/tests/pytests/functional/test_config.py index e03a3b42d19..f171ac580fa 100644 --- a/tests/pytests/functional/test_config.py +++ b/tests/pytests/functional/test_config.py @@ -27,7 +27,7 @@ def test_minion_config_type_check(caplog): os.remove(path) -def test_cloud_config_relative_logfile(tmp_path): +def test_cloud_config_relative_log_file(tmp_path): root_path = tmp_path config_path = tmp_path / "conf" config_path.mkdir() @@ -38,3 +38,16 @@ def test_cloud_config_relative_logfile(tmp_path): master_config.write_text(f"root_dir: {root_path}") opts = salt.config.cloud_config(cloud_config) assert opts["log_file"] == str(root_path / "var" / "log" / "salt" / "cloud") + + +def test_cloud_config_relative_cachedir(tmp_path): + root_path = tmp_path + config_path = tmp_path / "conf" + config_path.mkdir() + cloud_config = config_path / "cloud" + cloud_config.write_text("") + master_config = config_path / "master" + master_config = config_path / "master" + master_config.write_text(f"root_dir: {root_path}") + opts = salt.config.cloud_config(cloud_config) + assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "cloud") diff --git a/tests/pytests/unit/test_config.py b/tests/pytests/unit/test_config.py index 9ffc41dc6c4..60bb65f2e01 100644 --- a/tests/pytests/unit/test_config.py +++ b/tests/pytests/unit/test_config.py @@ -5,9 +5,10 @@ tests.pytests.unit.test_config Unit tests for salt's config modulet """ -import sys +import pathlib import salt.config +import salt.syspaths def test_call_id_function(tmp_path): @@ -29,7 +30,8 @@ def test_prepend_root_dir(tmp_path): root = tmp_path / "root" opts = { "root_dir": root, - "foo": "c:\\var\\foo" if sys.platform == "win32" else "/var/foo", + "foo": str(pathlib.Path(salt.syspaths.ROOT_DIR) / "var" / "foo"), } salt.config.prepend_root_dir(opts, ["foo"]) + print(f"after {opts['foo']}") assert opts["foo"] == str(root / "var" / "foo") From baee8afd3a869e84f2d03aa34cc713eb5be91f3f Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 10:58:54 -0700 Subject: [PATCH 07/27] Additional fixes for windows root_dir logic --- changelog/64728.fixed.md | 2 +- salt/config/__init__.py | 17 ++-- tests/pytests/functional/test_config.py | 106 ++++++++++++++++++++++-- 3 files changed, 104 insertions(+), 21 deletions(-) diff --git a/changelog/64728.fixed.md b/changelog/64728.fixed.md index 0d18efed6f3..afe36f42316 100644 --- a/changelog/64728.fixed.md +++ b/changelog/64728.fixed.md @@ -1 +1 @@ -Cloud honors root_dir config settin when determining log file location +salt-cloud honors root_dir config setting for log_file location and fixes for root_dir locations on windows. diff --git a/salt/config/__init__.py b/salt/config/__init__.py index 3bb8404fedd..b6749868bd4 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -2218,6 +2218,7 @@ def include_config(include, orig_path, verbose, exit_on_config_errors=False): def should_prepend_root_dir(key, opts): return ( key in opts + and opts[key] is not None and urllib.parse.urlparse(os.path.splitdrive(opts[key])[1]).scheme == "" ) @@ -2519,7 +2520,7 @@ def syndic_config( ] for config_key in ("log_file", "key_logfile", "syndic_log_file"): # If this is not a URI and instead a local path - if urllib.parse.urlparse(opts.get(config_key, "")).scheme == "": + if should_prepend_root_dir(config_key, opts): prepend_root_dirs.append(config_key) prepend_root_dir(opts, prepend_root_dirs) salt.features.setup_features(opts) @@ -3842,7 +3843,7 @@ def apply_minion_config( # These can be set to syslog, so, not actual paths on the system for config_key in ("log_file", "key_logfile"): - if urllib.parse.urlparse(opts.get(config_key, "")).scheme == "": + if should_prepend_root_dir(config_key, opts): prepend_root_dirs.append(config_key) prepend_root_dir(opts, prepend_root_dirs) @@ -4078,11 +4079,7 @@ def apply_master_config(overrides=None, defaults=None): # These can be set to syslog, so, not actual paths on the system for config_key in ("log_file", "key_logfile", "ssh_log_file"): - log_setting = opts.get(config_key, "") - if log_setting is None: - continue - - if urllib.parse.urlparse(log_setting).scheme == "": + if should_prepend_root_dir(config_key, opts): prepend_root_dirs.append(config_key) prepend_root_dir(opts, prepend_root_dirs) @@ -4289,11 +4286,7 @@ def apply_spm_config(overrides, defaults): # These can be set to syslog, so, not actual paths on the system for config_key in ("spm_logfile",): - log_setting = opts.get(config_key, "") - if log_setting is None: - continue - - if urllib.parse.urlparse(log_setting).scheme == "": + if should_prepend_root_dir(config_key, opts): prepend_root_dirs.append(config_key) prepend_root_dir(opts, prepend_root_dirs) diff --git a/tests/pytests/functional/test_config.py b/tests/pytests/functional/test_config.py index f171ac580fa..5a3d77be90d 100644 --- a/tests/pytests/functional/test_config.py +++ b/tests/pytests/functional/test_config.py @@ -27,27 +27,117 @@ def test_minion_config_type_check(caplog): os.remove(path) -def test_cloud_config_relative_log_file(tmp_path): +def test_cloud_config_relative_to_root_dir(tmp_path): root_path = tmp_path config_path = tmp_path / "conf" config_path.mkdir() cloud_config = config_path / "cloud" cloud_config.write_text("") master_config = config_path / "master" - master_config = config_path / "master" master_config.write_text(f"root_dir: {root_path}") opts = salt.config.cloud_config(cloud_config) assert opts["log_file"] == str(root_path / "var" / "log" / "salt" / "cloud") + assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "cloud") -def test_cloud_config_relative_cachedir(tmp_path): +def test_master_config_relative_to_root_dir(tmp_path): root_path = tmp_path config_path = tmp_path / "conf" config_path.mkdir() - cloud_config = config_path / "cloud" - cloud_config.write_text("") - master_config = config_path / "master" master_config = config_path / "master" master_config.write_text(f"root_dir: {root_path}") - opts = salt.config.cloud_config(cloud_config) - assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "cloud") + opts = salt.config.master_config(master_config) + assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "master") + assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "master") + assert opts["pidfile"] == str(root_path / "var" / "run" / "salt-master.pid") + assert opts["sock_dir"] == str(root_path / "var" / "run" / "salt" / "master") + assert opts["extension_modules"] == str( + root_path / "var" / "cache" / "salt" / "master" / "extmods" + ) + assert opts["token_dir"] == str( + root_path / "var" / "cache" / "salt" / "master" / "tokens" + ) + assert opts["syndic_dir"] == str( + root_path / "var" / "cache" / "salt" / "master" / "syndics" + ) + assert opts["sqlite_queue_dir"] == str( + root_path / "var" / "cache" / "salt" / "master" / "queues" + ) + assert opts["log_file"] == str(root_path / "var" / "log" / "salt" / "master") + assert opts["key_logfile"] == str(root_path / "var" / "log" / "salt" / "key") + assert opts["ssh_log_file"] == str(root_path / "var" / "log" / "salt" / "ssh") + + # These are not tested because we didn't define them in the master config. + # assert opts["autosign_file"] == str(root_path / "var" / "run" / "salt"/ "master") + # assert opts["autoreject_file"] == str(root_path / "var" / "run" / "salt"/ "master") + # assert opts["autosign_grains_dir"] == str(root_path / "var" / "run" / "salt"/ "master") + + +def test_minion_config_relative_to_root_dir(tmp_path): + root_path = tmp_path + config_path = tmp_path / "conf" + config_path.mkdir() + minion_config = config_path / "minion" + minion_config.write_text(f"root_dir: {root_path}") + opts = salt.config.minion_config(minion_config) + assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "minion") + assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "minion") + assert opts["pidfile"] == str(root_path / "var" / "run" / "salt-minion.pid") + assert opts["sock_dir"] == str(root_path / "var" / "run" / "salt" / "minion") + assert opts["extension_modules"] == str( + root_path / "var" / "cache" / "salt" / "minion" / "extmods" + ) + assert opts["log_file"] == str(root_path / "var" / "log" / "salt" / "minion") + + +def test_api_config_relative_to_root_dir(tmp_path): + root_path = tmp_path + config_path = tmp_path / "conf" + config_path.mkdir() + master_config = config_path / "master" + master_config.write_text(f"root_dir: {root_path}") + opts = salt.config.api_config(master_config) + assert opts["pidfile"] == str(root_path / "var" / "run" / "salt-api.pid") + assert opts["log_file"] == str(root_path / "var" / "log" / "salt" / "api") + assert opts["api_pidfile"] == str(root_path / "var" / "run" / "salt-api.pid") + assert opts["api_logfile"] == str(root_path / "var" / "log" / "salt" / "api") + + +def test_spm_config_relative_to_root_dir(tmp_path): + root_path = tmp_path + config_path = tmp_path / "conf" + config_path.mkdir() + spm_config = config_path / "spm" + spm_config.write_text(f"root_dir: {root_path}") + opts = salt.config.spm_config(spm_config) + + assert opts["formula_path"] == str(root_path / "srv" / "spm" / "salt") + assert opts["pillar_path"] == str(root_path / "srv" / "spm" / "pillar") + assert opts["reactor_path"] == str(root_path / "srv" / "spm" / "reactor") + assert opts["spm_cache_dir"] == str(root_path / "var" / "cache" / "salt" / "spm") + assert opts["spm_build_dir"] == str(root_path / "srv" / "spm_build") + assert opts["spm_logfile"] == str(root_path / "var" / "log" / "salt" / "spm") + + +def test_syndic_config_relative_to_root_dir(tmp_path): + root_path = tmp_path + config_path = tmp_path / "conf" + config_path.mkdir() + master_config = config_path / "master" + master_config.write_text(f"root_dir: {root_path}") + minion_config = config_path / "master" + minion_config.write_text(f"root_dir: {root_path}") + opts = salt.config.syndic_config(master_config, minion_config) + assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "minion") + assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "master") + assert opts["pidfile"] == str(root_path / "var" / "run" / "salt-syndic.pid") + assert opts["sock_dir"] == str(root_path / "var" / "run" / "salt" / "minion") + assert opts["extension_modules"] == str( + root_path / "var" / "cache" / "salt" / "minion" / "extmods" + ) + assert opts["token_dir"] == str( + root_path / "var" / "cache" / "salt" / "master" / "tokens" + ) + assert opts["log_file"] == str(root_path / "var" / "log" / "salt" / "syndic") + assert opts["key_logfile"] == str(root_path / "var" / "log" / "salt" / "key") + assert opts["syndic_log_file"] == str(root_path / "var" / "log" / "salt" / "syndic") From 5f6c06ed56c88ee7d2b81418e09ef1e3ab775314 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 11:55:02 -0700 Subject: [PATCH 08/27] Remove unwanted print statement --- tests/pytests/unit/test_config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/pytests/unit/test_config.py b/tests/pytests/unit/test_config.py index 60bb65f2e01..313c3cb0b0e 100644 --- a/tests/pytests/unit/test_config.py +++ b/tests/pytests/unit/test_config.py @@ -33,5 +33,4 @@ def test_prepend_root_dir(tmp_path): "foo": str(pathlib.Path(salt.syspaths.ROOT_DIR) / "var" / "foo"), } salt.config.prepend_root_dir(opts, ["foo"]) - print(f"after {opts['foo']}") assert opts["foo"] == str(root / "var" / "foo") From 6c6f0f41f0f65d8b39c93bfd4c8af82858538f2c Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sun, 23 Jun 2024 03:55:32 -0700 Subject: [PATCH 09/27] fix configuration path test on windows --- tests/pytests/functional/test_config.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/pytests/functional/test_config.py b/tests/pytests/functional/test_config.py index 5a3d77be90d..9417c1b6751 100644 --- a/tests/pytests/functional/test_config.py +++ b/tests/pytests/functional/test_config.py @@ -5,6 +5,7 @@ import tempfile import pytest import salt.config +import salt.utils.platform pytestmark = [ pytest.mark.windows_whitelisted, @@ -47,7 +48,10 @@ def test_master_config_relative_to_root_dir(tmp_path): master_config = config_path / "master" master_config.write_text(f"root_dir: {root_path}") opts = salt.config.master_config(master_config) - assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "master") + if salt.utils.platform.is_windows(): + assert opts["pki_dir"] == str(root_path / "conf" / "pki" / "master") + else: + assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "master") assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "master") assert opts["pidfile"] == str(root_path / "var" / "run" / "salt-master.pid") assert opts["sock_dir"] == str(root_path / "var" / "run" / "salt" / "master") @@ -80,7 +84,10 @@ def test_minion_config_relative_to_root_dir(tmp_path): minion_config = config_path / "minion" minion_config.write_text(f"root_dir: {root_path}") opts = salt.config.minion_config(minion_config) - assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "minion") + if salt.utils.platform.is_windows(): + assert opts["pki_dir"] == str(root_path / "conf" / "pki" / "minion") + else: + assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "minion") assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "minion") assert opts["pidfile"] == str(root_path / "var" / "run" / "salt-minion.pid") assert opts["sock_dir"] == str(root_path / "var" / "run" / "salt" / "minion") @@ -128,7 +135,10 @@ def test_syndic_config_relative_to_root_dir(tmp_path): minion_config = config_path / "master" minion_config.write_text(f"root_dir: {root_path}") opts = salt.config.syndic_config(master_config, minion_config) - assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "minion") + if salt.utils.platform.is_windows(): + assert opts["pki_dir"] == str(root_path / "conf" / "pki" / "minion") + else: + assert opts["pki_dir"] == str(root_path / "etc" / "salt" / "pki" / "minion") assert opts["cachedir"] == str(root_path / "var" / "cache" / "salt" / "master") assert opts["pidfile"] == str(root_path / "var" / "run" / "salt-syndic.pid") assert opts["sock_dir"] == str(root_path / "var" / "run" / "salt" / "minion") From 766f8cf988abc9a8dc8cfeb41e2c7d6e21daa6b3 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 01:01:43 -0700 Subject: [PATCH 10/27] Add note to virtualenv state docs about onedir --- salt/states/virtualenv_mod.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/salt/states/virtualenv_mod.py b/salt/states/virtualenv_mod.py index 957f44265bc..7981ec08ac5 100644 --- a/salt/states/virtualenv_mod.py +++ b/salt/states/virtualenv_mod.py @@ -77,7 +77,9 @@ def managed( Prefer wheel archives (requires pip >= 1.4). python: None - Python executable used to build the virtualenv + Python executable used to build the virtualenv. When Salt is installed + from a onedir package. You will likely want to specify which python + interpertet should be used. user: None The user under which to run virtualenv and pip. @@ -131,6 +133,12 @@ def managed( - requirements: salt://REQUIREMENTS.txt - env_vars: PATH_VAR: '/usr/local/bin/' + + Current versions of Salt use onedir packages and will use onedir python + interpreter by default. If you've installed Salt via out package + repository. You will likely want to provide the path to the interpreter + with wich you would like to be used to create the virtual envrionment. The + interperter can be sepcified by providing the `python` option. """ ret = {"name": name, "result": True, "comment": "", "changes": {}} From 809a22598bb38987132ab700e7fd3539e5f97b8c Mon Sep 17 00:00:00 2001 From: Akmod Date: Mon, 24 Jun 2024 10:56:43 -0600 Subject: [PATCH 11/27] Update grammer in docstring of virtualenv_mod.py --- salt/states/virtualenv_mod.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/states/virtualenv_mod.py b/salt/states/virtualenv_mod.py index 7981ec08ac5..7dadfa23fd5 100644 --- a/salt/states/virtualenv_mod.py +++ b/salt/states/virtualenv_mod.py @@ -79,7 +79,7 @@ def managed( python: None Python executable used to build the virtualenv. When Salt is installed from a onedir package. You will likely want to specify which python - interpertet should be used. + interperter should be used. user: None The user under which to run virtualenv and pip. @@ -138,7 +138,7 @@ def managed( interpreter by default. If you've installed Salt via out package repository. You will likely want to provide the path to the interpreter with wich you would like to be used to create the virtual envrionment. The - interperter can be sepcified by providing the `python` option. + interperter can be specified by providing the `python` option. """ ret = {"name": name, "result": True, "comment": "", "changes": {}} From 94eaf943453cab3367e521c7691b5feda0b8e675 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Mon, 6 Nov 2023 12:53:50 +0100 Subject: [PATCH 12/27] Add `slsutil` SSH wrapper (cherry picked from commit ddc119764707a355069ff93350ab8e06f2a688ea) --- changelog/50196.fixed.md | 1 + changelog/61143.fixed.md | 1 + changelog/65067.fixed.md | 1 + salt/client/ssh/wrapper/slsutil.py | 450 ++++++++++++++++++ tests/pytests/integration/ssh/test_slsutil.py | 94 ++++ .../unit/client/ssh/wrapper/test_slsutil.py | 166 +++++++ 6 files changed, 713 insertions(+) create mode 100644 changelog/50196.fixed.md create mode 100644 changelog/61143.fixed.md create mode 100644 changelog/65067.fixed.md create mode 100644 salt/client/ssh/wrapper/slsutil.py create mode 100644 tests/pytests/integration/ssh/test_slsutil.py create mode 100644 tests/pytests/unit/client/ssh/wrapper/test_slsutil.py diff --git a/changelog/50196.fixed.md b/changelog/50196.fixed.md new file mode 100644 index 00000000000..979411a640d --- /dev/null +++ b/changelog/50196.fixed.md @@ -0,0 +1 @@ +Made slsutil.renderer work with salt-ssh diff --git a/changelog/61143.fixed.md b/changelog/61143.fixed.md new file mode 100644 index 00000000000..08a62c9d8b1 --- /dev/null +++ b/changelog/61143.fixed.md @@ -0,0 +1 @@ +Made slsutil.findup work with salt-ssh diff --git a/changelog/65067.fixed.md b/changelog/65067.fixed.md new file mode 100644 index 00000000000..d6de87b5bc1 --- /dev/null +++ b/changelog/65067.fixed.md @@ -0,0 +1 @@ +Fixed slsutil.update with salt-ssh during template rendering diff --git a/salt/client/ssh/wrapper/slsutil.py b/salt/client/ssh/wrapper/slsutil.py new file mode 100644 index 00000000000..e09ca1c2984 --- /dev/null +++ b/salt/client/ssh/wrapper/slsutil.py @@ -0,0 +1,450 @@ +import os.path +import posixpath + +import salt.exceptions +import salt.loader +import salt.template +import salt.utils.args +import salt.utils.dictupdate +import salt.utils.stringio + +CONTEXT_BASE = "slsutil" + + +def update(dest, upd, recursive_update=True, merge_lists=False): + """ + Merge ``upd`` recursively into ``dest`` + + If ``merge_lists=True``, will aggregate list object types instead of + replacing. This behavior is only activated when ``recursive_update=True``. + + CLI Example: + + .. code-block:: shell + + salt '*' slsutil.update '{foo: Foo}' '{bar: Bar}' + + """ + return salt.utils.dictupdate.update(dest, upd, recursive_update, merge_lists) + + +def merge(obj_a, obj_b, strategy="smart", renderer="yaml", merge_lists=False): + """ + Merge a data structure into another by choosing a merge strategy + + Strategies: + + * aggregate + * list + * overwrite + * recurse + * smart + + CLI Example: + + .. code-block:: shell + + salt '*' slsutil.merge '{foo: Foo}' '{bar: Bar}' + """ + return salt.utils.dictupdate.merge(obj_a, obj_b, strategy, renderer, merge_lists) + + +def merge_all(lst, strategy="smart", renderer="yaml", merge_lists=False): + """ + .. versionadded:: 2019.2.0 + + Merge a list of objects into each other in order + + :type lst: Iterable + :param lst: List of objects to be merged. + + :type strategy: String + :param strategy: Merge strategy. See utils.dictupdate. + + :type renderer: String + :param renderer: + Renderer type. Used to determine strategy when strategy is 'smart'. + + :type merge_lists: Bool + :param merge_lists: Defines whether to merge embedded object lists. + + CLI Example: + + .. code-block:: shell + + $ salt-call --output=txt slsutil.merge_all '[{foo: Foo}, {foo: Bar}]' + local: {u'foo': u'Bar'} + """ + + ret = {} + for obj in lst: + ret = salt.utils.dictupdate.merge(ret, obj, strategy, renderer, merge_lists) + + return ret + + +def renderer(path=None, string=None, default_renderer="jinja|yaml", **kwargs): + """ + Parse a string or file through Salt's renderer system + + .. versionchanged:: 2018.3.0 + Add support for Salt fileserver URIs. + + This is an open-ended function and can be used for a variety of tasks. It + makes use of Salt's "renderer pipes" system to run a string or file through + a pipe of any of the loaded renderer modules. + + :param path: The path to a file on Salt's fileserver (any URIs supported by + :py:func:`cp.get_url `) or on the local file + system. + :param string: An inline string to be used as the file to send through the + renderer system. Note, not all renderer modules can work with strings; + the 'py' renderer requires a file, for example. + :param default_renderer: The renderer pipe to send the file through; this + is overridden by a "she-bang" at the top of the file. + :param kwargs: Keyword args to pass to Salt's compile_template() function. + + Keep in mind the goal of each renderer when choosing a render-pipe; for + example, the Jinja renderer processes a text file and produces a string, + however the YAML renderer processes a text file and produces a data + structure. + + One possible use is to allow writing "map files", as are commonly seen in + Salt formulas, but without tying the renderer of the map file to the + renderer used in the other sls files. In other words, a map file could use + the Python renderer and still be included and used by an sls file that uses + the default 'jinja|yaml' renderer. + + For example, the two following map files produce identical results but one + is written using the normal 'jinja|yaml' and the other is using 'py': + + .. code-block:: jinja + + #!jinja|yaml + {% set apache = salt.grains.filter_by({ + ...normal jinja map file here... + }, merge=salt.pillar.get('apache:lookup')) %} + {{ apache | yaml() }} + + .. code-block:: python + + #!py + def run(): + apache = __salt__.grains.filter_by({ + ...normal map here but as a python dict... + }, merge=__salt__.pillar.get('apache:lookup')) + return apache + + Regardless of which of the above map files is used, it can be accessed from + any other sls file by calling this function. The following is a usage + example in Jinja: + + .. code-block:: jinja + + {% set apache = salt.slsutil.renderer('map.sls') %} + + CLI Example: + + .. code-block:: bash + + salt '*' slsutil.renderer salt://path/to/file + salt '*' slsutil.renderer /path/to/file + salt '*' slsutil.renderer /path/to/file.jinja default_renderer='jinja' + salt '*' slsutil.renderer /path/to/file.sls default_renderer='jinja|yaml' + salt '*' slsutil.renderer string='Inline template! {{ saltenv }}' + salt '*' slsutil.renderer string='Hello, {{ name }}.' name='world' + """ + if not path and not string: + raise salt.exceptions.SaltInvocationError("Must pass either path or string") + + renderers = salt.loader.render(__opts__, __salt__) + + if path: + path_or_string = __context__["fileclient"].get_url( + path, "", saltenv=kwargs.get("saltenv", "base") + ) + elif string: + path_or_string = ":string:" + kwargs["input_data"] = string + + ret = salt.template.compile_template( + path_or_string, + renderers, + default_renderer, + __opts__["renderer_blacklist"], + __opts__["renderer_whitelist"], + **kwargs + ) + return ret.read() if salt.utils.stringio.is_readable(ret) else ret + + +def _get_serialize_fn(serializer, fn_name): + serializers = salt.loader.serializers(__opts__) + fns = getattr(serializers, serializer, None) + fn = getattr(fns, fn_name, None) + + if not fns: + raise salt.exceptions.CommandExecutionError( + "Serializer '{}' not found.".format(serializer) + ) + + if not fn: + raise salt.exceptions.CommandExecutionError( + "Serializer '{}' does not implement {}.".format(serializer, fn_name) + ) + + return fn + + +def serialize(serializer, obj, **mod_kwargs): + """ + Serialize a Python object using one of the available + :ref:`all-salt.serializers`. + + CLI Example: + + .. code-block:: bash + + salt '*' --no-parse=obj slsutil.serialize 'json' obj="{'foo': 'Foo!'} + + Jinja Example: + + .. code-block:: jinja + + {% set json_string = salt.slsutil.serialize('json', + {'foo': 'Foo!'}) %} + """ + kwargs = salt.utils.args.clean_kwargs(**mod_kwargs) + return _get_serialize_fn(serializer, "serialize")(obj, **kwargs) + + +def deserialize(serializer, stream_or_string, **mod_kwargs): + """ + Deserialize a Python object using one of the available + :ref:`all-salt.serializers`. + + CLI Example: + + .. code-block:: bash + + salt '*' slsutil.deserialize 'json' '{"foo": "Foo!"}' + salt '*' --no-parse=stream_or_string slsutil.deserialize 'json' \\ + stream_or_string='{"foo": "Foo!"}' + + Jinja Example: + + .. code-block:: jinja + + {% set python_object = salt.slsutil.deserialize('json', + '{"foo": "Foo!"}') %} + """ + kwargs = salt.utils.args.clean_kwargs(**mod_kwargs) + return _get_serialize_fn(serializer, "deserialize")(stream_or_string, **kwargs) + + +def boolstr(value, true="true", false="false"): + """ + Convert a boolean value into a string. This function is + intended to be used from within file templates to provide + an easy way to take boolean values stored in Pillars or + Grains, and write them out in the appropriate syntax for + a particular file template. + + :param value: The boolean value to be converted + :param true: The value to return if ``value`` is ``True`` + :param false: The value to return if ``value`` is ``False`` + + In this example, a pillar named ``smtp:encrypted`` stores a boolean + value, but the template that uses that value needs ``yes`` or ``no`` + to be written, based on the boolean value. + + *Note: this is written on two lines for clarity. The same result + could be achieved in one line.* + + .. code-block:: jinja + + {% set encrypted = salt[pillar.get]('smtp:encrypted', false) %} + use_tls: {{ salt['slsutil.boolstr'](encrypted, 'yes', 'no') }} + + Result (assuming the value is ``True``): + + .. code-block:: none + + use_tls: yes + + """ + + if value: + return true + + return false + + +def _set_context(keys, function, fun_args=None, fun_kwargs=None, force=False): + """ + Convenience function to set a value in the ``__context__`` dictionary. + + .. versionadded:: 3004 + + :param keys: The list of keys specifying the dictionary path to set. This + list can be of arbitrary length and the path will be created + in the dictionary if it does not exist. + + :param function: A python function to be called if the specified path does + not exist, if the force parameter is ``True``. + + :param fun_args: A list of positional arguments to the function. + + :param fun_kwargs: A dictionary of keyword arguments to the function. + + :param force: If ``True``, force the ```__context__`` path to be updated. + Otherwise, only create it if it does not exist. + """ + + target = __context__ + + # Build each level of the dictionary as needed + for key in keys[:-1]: + if key not in target: + target[key] = {} + target = target[key] + + # Call the supplied function to populate the dictionary + if force or keys[-1] not in target: + if not fun_args: + fun_args = [] + + if not fun_kwargs: + fun_kwargs = {} + + target[keys[-1]] = function(*fun_args, *fun_kwargs) + + +def file_exists(path, saltenv="base"): + """ + Return ``True`` if a file exists in the state tree, ``False`` otherwise. + + .. versionadded:: 3004 + + :param str path: The fully qualified path to a file in the state tree. + :param str saltenv: The fileserver environment to search. Default: ``base`` + + CLI Example: + + .. code-block:: bash + + salt '*' slsutil.file_exists nginx/defaults.yaml + """ + + _set_context( + [CONTEXT_BASE, saltenv, "file_list"], __salt__["cp.list_master"], [saltenv] + ) + return path in __context__[CONTEXT_BASE][saltenv]["file_list"] + + +def dir_exists(path, saltenv="base"): + """ + Return ``True`` if a directory exists in the state tree, ``False`` otherwise. + + :param str path: The fully qualified path to a directory in the state tree. + :param str saltenv: The fileserver environment to search. Default: ``base`` + + .. versionadded:: 3004 + + CLI Example: + + .. code-block:: bash + + salt '*' slsutil.dir_exists nginx/files + """ + + _set_context( + [CONTEXT_BASE, saltenv, "dir_list"], __salt__["cp.list_master_dirs"], [saltenv] + ) + return path in __context__[CONTEXT_BASE][saltenv]["dir_list"] + + +def path_exists(path, saltenv="base"): + """ + Return ``True`` if a path exists in the state tree, ``False`` otherwise. The path + could refer to a file or directory. + + .. versionadded:: 3004 + + :param str path: The fully qualified path to a file or directory in the state tree. + :param str saltenv: The fileserver environment to search. Default: ``base`` + + CLI Example: + + .. code-block:: bash + + salt '*' slsutil.path_exists nginx/defaults.yaml + """ + + return file_exists(path, saltenv) or dir_exists(path, saltenv) + + +def findup(startpath, filenames, saltenv="base"): + """ + Find the first path matching a filename or list of filenames in a specified + directory or the nearest ancestor directory. Returns the full path to the + first file found. + + .. versionadded:: 3004 + + :param str startpath: The fileserver path from which to begin the search. + An empty string refers to the state tree root. + :param filenames: A filename or list of filenames to search for. Searching for + directory names is also supported. + :param str saltenv: The fileserver environment to search. Default: ``base`` + + Example: return the path to ``defaults.yaml``, walking up the tree from the + state file currently being processed. + + .. code-block:: jinja + + {{ salt["slsutil.findup"](tplfile, "defaults.yaml") }} + + CLI Example: + + .. code-block:: bash + + salt '*' slsutil.findup formulas/shared/nginx map.jinja + """ + + # Normalize the path + if startpath: + startpath = posixpath.normpath(startpath) + + # Verify the cwd is a valid path in the state tree + if startpath and not path_exists(startpath, saltenv): + raise salt.exceptions.SaltInvocationError( + "Starting path not found in the state tree: {}".format(startpath) + ) + + # Ensure that patterns is a string or list of strings + if isinstance(filenames, str): + filenames = [filenames] + if not isinstance(filenames, list): + raise salt.exceptions.SaltInvocationError( + "Filenames argument must be a string or list of strings" + ) + + while True: + + # Loop over filenames, looking for one at the current path level + for filename in filenames: + fullname = salt.utils.path.join( + startpath or "", filename, use_posixpath=True + ) + if path_exists(fullname, saltenv): + return fullname + + # If the root path was just checked, raise an error + if not startpath: + raise salt.exceptions.CommandExecutionError( + "File pattern(s) not found in path ancestry" + ) + + # Move up one level in the ancestry + startpath = os.path.dirname(startpath) diff --git a/tests/pytests/integration/ssh/test_slsutil.py b/tests/pytests/integration/ssh/test_slsutil.py new file mode 100644 index 00000000000..4ac9ed59a82 --- /dev/null +++ b/tests/pytests/integration/ssh/test_slsutil.py @@ -0,0 +1,94 @@ +import json + +import pytest + + +@pytest.mark.usefixtures("state_tree") +def test_renderer_file(salt_ssh_cli): + ret = salt_ssh_cli.run("slsutil.renderer", "salt://test.sls") + assert ret.returncode == 0 + assert isinstance(ret.data, dict) + assert "Ok with def" in ret.data + + +def test_renderer_string(salt_ssh_cli): + rend = "{{ salt['test.echo']('foo') }}: {{ pillar['ext_spam'] }}" + ret = salt_ssh_cli.run("slsutil.renderer", string=rend) + assert ret.returncode == 0 + assert isinstance(ret.data, dict) + assert ret.data == {"foo": "eggs"} + + +def test_serialize(salt_ssh_cli): + obj = {"foo": "bar"} + ret = salt_ssh_cli.run("slsutil.serialize", "json", obj) + assert ret.returncode == 0 + assert isinstance(ret.data, str) + assert ret.data == json.dumps(obj) + + +def test_deserialize(salt_ssh_cli): + obj = {"foo": "bar"} + data = json.dumps(obj) + # Need to quote it, otherwise it's deserialized by the + # test wrapper + ret = salt_ssh_cli.run("slsutil.deserialize", "json", f"'{data}'") + assert ret.returncode == 0 + assert isinstance(ret.data, type(obj)) + assert ret.data == obj + + +@pytest.mark.parametrize( + "path,expected", + [ + ("test_deep", True), + ("test_deep/test.sls", False), + ("test_deep/b/2", True), + ("does_not/ex/ist", False), + ], +) +def test_dir_exists(salt_ssh_cli, path, expected): + ret = salt_ssh_cli.run("slsutil.dir_exists", path) + assert ret.returncode == 0 + assert isinstance(ret.data, bool) + assert ret.data is expected + + +@pytest.mark.parametrize( + "path,expected", [("test_deep", False), ("test_deep/test.sls", True)] +) +def test_file_exists(salt_ssh_cli, path, expected): + ret = salt_ssh_cli.run("slsutil.file_exists", path) + assert ret.returncode == 0 + assert isinstance(ret.data, bool) + assert ret.data is expected + + +@pytest.mark.parametrize( + "start,name,expected", + [ + ("test_deep/b/2", "test.sls", "test_deep/b/2/test.sls"), + ("test_deep/b/2", "cheese", "cheese"), + ], +) +def test_findup(salt_ssh_cli, start, name, expected): + ret = salt_ssh_cli.run("slsutil.findup", start, name) + assert ret.returncode == 0 + assert isinstance(ret.data, str) + assert ret.data == expected + + +@pytest.mark.parametrize( + "path,expected", + [ + ("test_deep", True), + ("test_deep/test.sls", True), + ("test_deep/b/2", True), + ("does_not/ex/ist", False), + ], +) +def test_path_exists(salt_ssh_cli, path, expected): + ret = salt_ssh_cli.run("slsutil.path_exists", path) + assert ret.returncode == 0 + assert isinstance(ret.data, bool) + assert ret.data is expected diff --git a/tests/pytests/unit/client/ssh/wrapper/test_slsutil.py b/tests/pytests/unit/client/ssh/wrapper/test_slsutil.py new file mode 100644 index 00000000000..558d5ee74dc --- /dev/null +++ b/tests/pytests/unit/client/ssh/wrapper/test_slsutil.py @@ -0,0 +1,166 @@ +import contextlib +import logging + +import pytest + +import salt.client.ssh.wrapper.slsutil as slsutil +from salt.exceptions import CommandExecutionError, SaltInvocationError +from tests.support.mock import MagicMock + +log = logging.getLogger(__name__) + + +# --- These tests are adapted from tests.pytests.unit.utils.slsutil + + +@pytest.fixture +def configure_loader_modules(master_dirs, master_files): + return { + slsutil: { + "__salt__": { + "cp.list_master": MagicMock(return_value=master_files), + "cp.list_master_dirs": MagicMock(return_value=master_dirs), + }, + "__opts__": { + "renderer": "jinja|yaml", + "renderer_blacklist": [], + "renderer_whitelist": [], + }, + } + } + + +@pytest.fixture +def master_dirs(): + return ["red", "red/files", "blue", "blue/files"] + + +@pytest.fixture +def master_files(): + return [ + "top.sls", + "red/init.sls", + "red/files/default.conf", + "blue/init.sls", + "blue/files/default.conf", + ] + + +@pytest.mark.parametrize("inpt,expected", ((True, "yes"), (False, "no"))) +def test_boolstr(inpt, expected): + assert slsutil.boolstr(inpt, true="yes", false="no") == expected + + +@pytest.mark.parametrize( + "inpt,expected", (("red/init.sls", True), ("green/init.sls", False)) +) +def test_file_exists(inpt, expected): + assert slsutil.file_exists(inpt) is expected + + +@pytest.mark.parametrize("inpt,expected", (("red", True), ("green", False))) +def test_dir_exists(inpt, expected): + assert slsutil.dir_exists(inpt) is expected + + +@pytest.mark.parametrize( + "inpt,expected", + ( + ("red", True), + ("green", False), + ("red/init.sls", True), + ("green/init.sls", False), + ), +) +def test_path_exists(inpt, expected): + assert slsutil.path_exists(inpt) is expected + + +@pytest.mark.parametrize( + "inpt,expected,raises", + [ + (("red/files", "init.sls"), "red/init.sls", None), + (("red/files", ["top.sls"]), "top.sls", None), + (("", "top.sls"), "top.sls", None), + ((None, "top.sls"), "top.sls", None), + (("red/files", ["top.sls", "init.sls"]), "red/init.sls", None), + ( + ("red/files", "notfound"), + None, + pytest.raises( + CommandExecutionError, match=r"File pattern\(s\) not found.*" + ), + ), + ( + ("red", "default.conf"), + None, + pytest.raises( + CommandExecutionError, match=r"File pattern\(s\) not found.*" + ), + ), + ( + ("green", "notfound"), + None, + pytest.raises(SaltInvocationError, match="Starting path not found.*"), + ), + ( + ("red", 1234), + None, + pytest.raises( + SaltInvocationError, match=".*must be a string or list of strings.*" + ), + ), + ], +) +def test_findup(inpt, expected, raises): + if raises is None: + raises = contextlib.nullcontext() + with raises: + res = slsutil.findup(*inpt) + assert res == expected + + +@pytest.mark.parametrize( + "a,b,merge_lists,expected", + [ + ( + {"foo": {"bar": "baz", "hi": "there", "some": ["list"]}}, + {"foo": {"baz": "quux", "bar": "hi", "some": ["other_list"]}}, + False, + { + "foo": { + "baz": "quux", + "bar": "hi", + "hi": "there", + "some": ["other_list"], + } + }, + ), + ( + {"foo": {"bar": "baz", "hi": "there", "some": ["list"]}}, + {"foo": {"baz": "quux", "bar": "hi", "some": ["other_list"]}}, + True, + { + "foo": { + "baz": "quux", + "bar": "hi", + "hi": "there", + "some": ["list", "other_list"], + } + }, + ), + ], +) +@pytest.mark.parametrize("func", ("update", "merge", "merge_all")) +def test_update_merge(a, b, merge_lists, expected, func): + arg = (a, b) + if func == "merge_all": + arg = ([a, b],) + res = getattr(slsutil, func)(*arg, merge_lists=merge_lists) + assert res == expected + assert (a is res) is (func == "update") + + +def test_renderer_requires_either_path_or_string(): + with pytest.raises(SaltInvocationError, match=".*either path or string.*"): + slsutil.renderer() From e9ecf30500ffd3c1d0da961fe355601adea309b7 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Tue, 7 Nov 2023 00:02:30 +0100 Subject: [PATCH 13/27] Add `defaults` SSH wrapper module This is a 1:1 copy of the execution module, incl. tests... (cherry picked from commit 47a609fab058105109159536d94b577d452155a0) --- changelog/51605.fixed.md | 1 + salt/client/ssh/wrapper/defaults.py | 240 ++++++++++++++++++ .../unit/client/ssh/wrapper/test_defaults.py | 215 ++++++++++++++++ 3 files changed, 456 insertions(+) create mode 100644 changelog/51605.fixed.md create mode 100644 salt/client/ssh/wrapper/defaults.py create mode 100644 tests/pytests/unit/client/ssh/wrapper/test_defaults.py diff --git a/changelog/51605.fixed.md b/changelog/51605.fixed.md new file mode 100644 index 00000000000..990b34413d9 --- /dev/null +++ b/changelog/51605.fixed.md @@ -0,0 +1 @@ +Fixed defaults.merge is not available when using salt-ssh diff --git a/salt/client/ssh/wrapper/defaults.py b/salt/client/ssh/wrapper/defaults.py new file mode 100644 index 00000000000..d03990b8798 --- /dev/null +++ b/salt/client/ssh/wrapper/defaults.py @@ -0,0 +1,240 @@ +""" +SSH wrapper module to work with salt formula defaults files + +""" + +import copy +import logging +import os + +import salt.fileclient +import salt.utils.data +import salt.utils.dictupdate as dictupdate +import salt.utils.files +import salt.utils.json +import salt.utils.url +import salt.utils.yaml + +__virtualname__ = "defaults" + +log = logging.getLogger(__name__) + + +def _mk_client(): + """ + Create a file client and add it to the context + """ + return salt.fileclient.get_file_client(__opts__) + + +def _load(formula): + """ + Generates a list of salt:///defaults.(json|yaml) files + and fetches them from the Salt master. + + Returns first defaults file as python dict. + """ + + # Compute possibilities + paths = [] + for ext in ("yaml", "json"): + source_url = salt.utils.url.create(formula + "/defaults." + ext) + paths.append(source_url) + # Fetch files from master + with _mk_client() as client: + defaults_files = client.cache_files(paths) + + for file_ in defaults_files: + if not file_: + # Skip empty string returned by cp.fileclient.cache_files. + continue + + suffix = file_.rsplit(".", 1)[-1] + if suffix == "yaml": + loader = salt.utils.yaml.safe_load + elif suffix == "json": + loader = salt.utils.json.load + else: + log.debug("Failed to determine loader for %r", file_) + continue + + if os.path.exists(file_): + log.debug("Reading defaults from %r", file_) + with salt.utils.files.fopen(file_) as fhr: + defaults = loader(fhr) + log.debug("Read defaults %r", defaults) + + return defaults or {} + + +def get(key, default=""): + """ + defaults.get is used much like pillar.get except that it will read + a default value for a pillar from defaults.json or defaults.yaml + files that are stored in the root of a salt formula. + + CLI Example: + + .. code-block:: bash + + salt '*' defaults.get core:users:root + + The defaults is computed from pillar key. The first entry is considered as + the formula namespace. + + For example, querying ``core:users:root`` will try to load + ``salt://core/defaults.yaml`` and ``salt://core/defaults.json``. + """ + + # Determine formula namespace from query + if ":" in key: + namespace, key = key.split(":", 1) + else: + namespace, key = key, None + + # Fetch and load defaults formula files from states. + defaults = _load(namespace) + + # Fetch value + if key: + return salt.utils.data.traverse_dict_and_list(defaults, key, default) + else: + return defaults + + +def merge(dest, src, merge_lists=False, in_place=True, convert_none=True): + """ + defaults.merge + Allows deep merging of dicts in formulas. + + merge_lists : False + If True, it will also merge lists instead of replace their items. + + in_place : True + If True, it will merge into dest dict, + if not it will make a new copy from that dict and return it. + + convert_none : True + If True, it will convert src and dest to empty dicts if they are None. + If True and dest is None but in_place is True, raises TypeError. + If False it will make a new copy from that dict and return it. + + .. versionadded:: 3005 + + CLI Example: + + .. code-block:: bash + + salt '*' defaults.merge '{a: b}' '{d: e}' + + It is more typical to use this in a templating language in formulas, + instead of directly on the command-line. + """ + # Force empty dicts if applicable (useful for cleaner templating) + src = {} if (src is None and convert_none) else src + if dest is None and convert_none: + if in_place: + raise TypeError("Can't perform in-place merge into NoneType") + else: + dest = {} + + if in_place: + merged = dest + else: + merged = copy.deepcopy(dest) + return dictupdate.update(merged, src, merge_lists=merge_lists) + + +def deepcopy(source): + """ + defaults.deepcopy + Allows deep copy of objects in formulas. + + By default, Python does not copy objects, + it creates bindings between a target and an object. + + It is more typical to use this in a templating language in formulas, + instead of directly on the command-line. + """ + return copy.deepcopy(source) + + +def update(dest, defaults, merge_lists=True, in_place=True, convert_none=True): + """ + defaults.update + Allows setting defaults for group of data set e.g. group for nodes. + + This function is a combination of defaults.merge + and defaults.deepcopy to avoid redundant in jinja. + + Example: + + .. code-block:: yaml + + group01: + defaults: + enabled: True + extra: + - test + - stage + nodes: + host01: + index: foo + upstream: bar + host02: + index: foo2 + upstream: bar2 + + .. code-block:: jinja + + {% do salt['defaults.update'](group01.nodes, group01.defaults) %} + + Each node will look like the following: + + .. code-block:: yaml + + host01: + enabled: True + index: foo + upstream: bar + extra: + - test + - stage + + merge_lists : True + If True, it will also merge lists instead of replace their items. + + in_place : True + If True, it will merge into dest dict. + if not it will make a new copy from that dict and return it. + + convert_none : True + If True, it will convert src and dest to empty dicts if they are None. + If True and dest is None but in_place is True, raises TypeError. + If False it will make a new copy from that dict and return it. + + .. versionadded:: 3005 + + It is more typical to use this in a templating language in formulas, + instead of directly on the command-line. + """ + # Force empty dicts if applicable here + if in_place: + if dest is None: + raise TypeError("Can't perform in-place update into NoneType") + else: + nodes = dest + else: + dest = {} if (dest is None and convert_none) else dest + nodes = deepcopy(dest) + + defaults = {} if (defaults is None and convert_none) else defaults + + for node_name, node_vars in nodes.items(): + defaults_vars = deepcopy(defaults) + node_vars = merge( + defaults_vars, node_vars, merge_lists=merge_lists, convert_none=convert_none + ) + nodes[node_name] = node_vars + + return nodes diff --git a/tests/pytests/unit/client/ssh/wrapper/test_defaults.py b/tests/pytests/unit/client/ssh/wrapper/test_defaults.py new file mode 100644 index 00000000000..12d07bc2a85 --- /dev/null +++ b/tests/pytests/unit/client/ssh/wrapper/test_defaults.py @@ -0,0 +1,215 @@ +""" +Test cases for salt.client.ssh.wrapper.defaults + +This has been copied 1:1 from tests.pytests.unit.modules.test_defaults +""" + +import inspect + +import pytest + +import salt.client.ssh.wrapper.defaults as defaults +from tests.support.mock import MagicMock, patch + + +@pytest.fixture() +def configure_loader_modules(): + return {defaults: {}} + + +def test_get_mock(): + """ + Test if it execute a defaults client run and return a dict + """ + with patch.object(inspect, "stack", MagicMock(return_value=[])), patch( + "salt.client.ssh.wrapper.defaults.get", + MagicMock(return_value={"users": {"root": [0]}}), + ): + assert defaults.get("core:users:root") == {"users": {"root": [0]}} + + +def test_merge_with_list_merging(): + """ + Test deep merging of dicts with merge_lists enabled. + """ + + src_dict = { + "string_key": "string_val_src", + "list_key": ["list_val_src"], + "dict_key": {"dict_key_src": "dict_val_src"}, + } + + dest_dict = { + "string_key": "string_val_dest", + "list_key": ["list_val_dest"], + "dict_key": {"dict_key_dest": "dict_val_dest"}, + } + + merged_dict = { + "string_key": "string_val_src", + "list_key": ["list_val_dest", "list_val_src"], + "dict_key": { + "dict_key_dest": "dict_val_dest", + "dict_key_src": "dict_val_src", + }, + } + + defaults.merge(dest_dict, src_dict, merge_lists=True) + assert dest_dict == merged_dict + + +def test_merge_without_list_merging(): + """ + Test deep merging of dicts with merge_lists disabled. + """ + + src = { + "string_key": "string_val_src", + "list_key": ["list_val_src"], + "dict_key": {"dict_key_src": "dict_val_src"}, + } + + dest = { + "string_key": "string_val_dest", + "list_key": ["list_val_dest"], + "dict_key": {"dict_key_dest": "dict_val_dest"}, + } + + merged = { + "string_key": "string_val_src", + "list_key": ["list_val_src"], + "dict_key": { + "dict_key_dest": "dict_val_dest", + "dict_key_src": "dict_val_src", + }, + } + + defaults.merge(dest, src, merge_lists=False) + assert dest == merged + + +def test_merge_not_in_place(): + """ + Test deep merging of dicts not in place. + """ + + src = {"nested_dict": {"A": "A"}} + + dest = {"nested_dict": {"B": "B"}} + + dest_orig = {"nested_dict": {"B": "B"}} + + merged = {"nested_dict": {"A": "A", "B": "B"}} + + final = defaults.merge(dest, src, in_place=False) + assert dest == dest_orig + assert final == merged + + +def test_merge_src_is_none(): + """ + Test deep merging of dicts not in place. + """ + + dest = {"nested_dict": {"B": "B"}} + + dest_orig = {"nested_dict": {"B": "B"}} + + final = defaults.merge(dest, None, in_place=False) + assert dest == dest_orig + assert final == dest_orig + + +def test_merge_dest_is_none(): + """ + Test deep merging of dicts not in place. + """ + + src = {"nested_dict": {"B": "B"}} + + src_orig = {"nested_dict": {"B": "B"}} + + final = defaults.merge(None, src, in_place=False) + assert src == src_orig + assert final == src_orig + + +def test_merge_in_place_dest_is_none(): + """ + Test deep merging of dicts not in place. + """ + + src = {"nested_dict": {"B": "B"}} + + pytest.raises(TypeError, defaults.merge, None, src) + + +def test_deepcopy(): + """ + Test a deep copy of object. + """ + + src = {"A": "A", "B": "B"} + + dist = defaults.deepcopy(src) + dist.update({"C": "C"}) + + result = {"A": "A", "B": "B", "C": "C"} + + assert src != dist + assert dist == result + + +def test_update_in_place(): + """ + Test update with defaults values in place. + """ + + group01 = { + "defaults": {"enabled": True, "extra": ["test", "stage"]}, + "nodes": {"host01": {"index": "foo", "upstream": "bar"}}, + } + + host01 = { + "enabled": True, + "index": "foo", + "upstream": "bar", + "extra": ["test", "stage"], + } + + defaults.update(group01["nodes"], group01["defaults"]) + assert group01["nodes"]["host01"] == host01 + + +def test_update_with_defaults_none(): + group01 = { + "defaults": {"enabled": True, "extra": ["test", "stage"]}, + "nodes": {"host01": {"index": "foo", "upstream": "bar"}}, + } + + host01 = { + "index": "foo", + "upstream": "bar", + } + + defaults.update(group01["nodes"], None) + assert group01["nodes"]["host01"] == host01 + + +def test_update_with_dest_none(): + group01 = { + "defaults": {"enabled": True, "extra": ["test", "stage"]}, + "nodes": {"host01": {"index": "foo", "upstream": "bar"}}, + } + + ret = defaults.update(None, group01["defaults"], in_place=False) + assert ret == {} + + +def test_update_in_place_with_dest_none(): + group01 = { + "defaults": {"enabled": True, "extra": ["test", "stage"]}, + "nodes": {"host01": {"index": "foo", "upstream": "bar"}}, + } + + pytest.raises(TypeError, defaults.update, None, group01["defaults"]) From 6c62792c73d1779dee1d5808730b2ed314199ec4 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Mon, 6 Nov 2023 12:42:55 +0100 Subject: [PATCH 14/27] Sync config SSH wrapper with execution module The wrapper has diverged significantly from the module. * `option` did not check grains * `option` did not have `omit_all` and `wildcard` parameters * `get` missed several parameters: `delimiter`, `merge` and all `omit_*` * There was no wrapping function for `items`. (cherry picked from commit 8356be888bf32e2f4b081c54a6a56b21d5cf833c) --- changelog/56441.fixed.md | 1 + salt/client/ssh/wrapper/config.py | 375 +++++++++++++++--- tests/pytests/integration/ssh/test_config.py | 66 +++ .../unit/client/ssh/wrapper/test_config.py | 219 ++++++++++ 4 files changed, 613 insertions(+), 48 deletions(-) create mode 100644 changelog/56441.fixed.md create mode 100644 tests/pytests/integration/ssh/test_config.py create mode 100644 tests/pytests/unit/client/ssh/wrapper/test_config.py diff --git a/changelog/56441.fixed.md b/changelog/56441.fixed.md new file mode 100644 index 00000000000..489ad80f770 --- /dev/null +++ b/changelog/56441.fixed.md @@ -0,0 +1 @@ +Fixed config.get does not support merge option with salt-ssh diff --git a/salt/client/ssh/wrapper/config.py b/salt/client/ssh/wrapper/config.py index dcc00ceb2c3..a6db176453c 100644 --- a/salt/client/ssh/wrapper/config.py +++ b/salt/client/ssh/wrapper/config.py @@ -2,17 +2,22 @@ Return config information """ +import copy +import fnmatch +import logging import os -import re +import urllib.parse import salt.syspaths as syspaths import salt.utils.data import salt.utils.files +import salt.utils.sdb as sdb + +log = logging.getLogger(__name__) # Set up the default values for all systems DEFAULTS = { "mongo.db": "salt", - "mongo.host": "salt", "mongo.password": "", "mongo.port": 27017, "mongo.user": "", @@ -38,9 +43,12 @@ DEFAULTS = { "solr.num_backups": 1, "poudriere.config": "/usr/local/etc/poudriere.conf", "poudriere.config_dir": "/usr/local/etc/poudriere.d", + "ldap.uri": "", "ldap.server": "localhost", "ldap.port": "389", "ldap.tls": False, + "ldap.no_verify": False, + "ldap.anonymous": True, "ldap.scope": 2, "ldap.attrs": None, "ldap.binddn": "", @@ -51,6 +59,11 @@ DEFAULTS = { "tunnel": False, "images": os.path.join(syspaths.SRV_ROOT_DIR, "salt-images"), }, + "docker.exec_driver": "docker-exec", + "docker.compare_container_networks": { + "static": ["Aliases", "Links", "IPAMConfig"], + "automatic": ["IPAddress", "Gateway", "GlobalIPv6Address", "IPv6Gateway"], + }, } @@ -96,15 +109,66 @@ def valid_fileproto(uri): salt '*' config.valid_fileproto salt://path/to/file """ - try: - return bool(re.match("^(?:salt|https?|ftp)://", uri)) - except Exception: # pylint: disable=broad-except - return False + return urllib.parse.urlparse(uri).scheme in salt.utils.files.VALID_PROTOS -def option(value, default="", omit_opts=False, omit_master=False, omit_pillar=False): +def option( + value, + default=None, + omit_opts=False, + omit_grains=False, + omit_pillar=False, + omit_master=False, + omit_all=False, + wildcard=False, +): """ - Pass in a generic option and receive the value that will be assigned + Returns the setting for the specified config value. The priority for + matches is the same as in :py:func:`config.get `, + only this function does not recurse into nested data structures. Another + difference between this function and :py:func:`config.get + ` is that it comes with a set of "sane defaults". + To view these, you can run the following command: + + .. code-block:: bash + + salt '*' config.option '*' omit_all=True wildcard=True + + default + The default value if no match is found. If not specified, then the + fallback default will be an empty string, unless ``wildcard=True``, in + which case the return will be an empty dictionary. + + omit_opts : False + Pass as ``True`` to exclude matches from the minion configuration file + + omit_grains : False + Pass as ``True`` to exclude matches from the grains + + omit_pillar : False + Pass as ``True`` to exclude matches from the pillar data + + omit_master : False + Pass as ``True`` to exclude matches from the master configuration file + + omit_all : True + Shorthand to omit all of the above and return matches only from the + "sane defaults". + + .. versionadded:: 3000 + + wildcard : False + If used, this will perform pattern matching on keys. Note that this + will also significantly change the return data. Instead of only a value + being returned, a dictionary mapping the matched keys to their values + is returned. For example, using ``wildcard=True`` with a ``key`` of + ``'foo.ba*`` could return a dictionary like so: + + .. code-block:: python + + {'foo.bar': True, 'foo.baz': False} + + .. versionadded:: 3000 CLI Example: @@ -112,18 +176,48 @@ def option(value, default="", omit_opts=False, omit_master=False, omit_pillar=Fa salt '*' config.option redis.host """ - if not omit_opts: - if value in __opts__: - return __opts__[value] - if not omit_master: - if value in __pillar__.get("master", {}): - return __pillar__["master"][value] - if not omit_pillar: - if value in __pillar__: - return __pillar__[value] - if value in DEFAULTS: - return DEFAULTS[value] - return default + if omit_all: + omit_opts = omit_grains = omit_pillar = omit_master = True + + if default is None: + default = "" if not wildcard else {} + + if not wildcard: + if not omit_opts: + if value in __opts__: + return __opts__[value] + if not omit_grains: + if value in __grains__: + return __grains__[value] + if not omit_pillar: + if value in __pillar__: + return __pillar__[value] + if not omit_master: + if value in __pillar__.get("master", {}): + return __pillar__["master"][value] + if value in DEFAULTS: + return DEFAULTS[value] + + # No match + return default + else: + # We need to do the checks in the reverse order so that minion opts + # takes precedence + ret = {} + for omit, data in ( + (omit_master, __pillar__.get("master", {})), + (omit_pillar, __pillar__), + (omit_grains, __grains__), + (omit_opts, __opts__), + ): + if not omit: + ret.update({x: data[x] for x in fnmatch.filter(data, value)}) + # Check the DEFAULTS as well to see if the pattern matches it + for item in (x for x in fnmatch.filter(DEFAULTS, value) if x not in ret): + ret[item] = DEFAULTS[item] + + # If no matches, return the default + return ret or default def merge(value, default="", omit_opts=False, omit_master=False, omit_pillar=False): @@ -171,54 +265,223 @@ def merge(value, default="", omit_opts=False, omit_master=False, omit_pillar=Fal ret = list(ret) + list(tmp) if ret is None and value in DEFAULTS: return DEFAULTS[value] - return ret or default + if ret is None: + return default + return ret -def get(key, default=""): +def get( + key, + default="", + delimiter=":", + merge=None, + omit_opts=False, + omit_pillar=False, + omit_master=False, + omit_grains=False, +): """ .. versionadded:: 0.14.0 - Attempt to retrieve the named value from opts, pillar, grains of the master - config, if the named value is not available return the passed default. - The default return is an empty string. + Attempt to retrieve the named value from the minion config file, pillar, + grains or the master config. If the named value is not available, return + the value specified by the ``default`` argument. If this argument is not + specified, ``default`` falls back to an empty string. - The value can also represent a value in a nested dict using a ":" delimiter - for the dict. This means that if a dict looks like this:: + Values can also be retrieved from nested dictionaries. Assume the below + data structure: + + .. code-block:: python {'pkg': {'apache': 'httpd'}} - To retrieve the value associated with the apache key in the pkg dict this - key can be passed:: + To retrieve the value associated with the ``apache`` key, in the + sub-dictionary corresponding to the ``pkg`` key, the following command can + be used: - pkg:apache + .. code-block:: bash - This routine traverses these data stores in this order: + salt myminion config.get pkg:apache - - Local minion config (opts) + The ``:`` (colon) is used to represent a nested dictionary level. + + .. versionchanged:: 2015.5.0 + The ``delimiter`` argument was added, to allow delimiters other than + ``:`` to be used. + + This function traverses these data stores in this order, returning the + first match found: + + - Minion configuration - Minion's grains - - Minion's pillar - - Master config + - Minion's pillar data + - Master configuration (requires :conf_minion:`pillar_opts` to be set to + ``True`` in Minion config file in order to work) + + This means that if there is a value that is going to be the same for the + majority of minions, it can be configured in the Master config file, and + then overridden using the grains, pillar, or Minion config file. + + Adding config options to the Master or Minion configuration file is easy: + + .. code-block:: yaml + + my-config-option: value + cafe-menu: + - egg and bacon + - egg sausage and bacon + - egg and spam + - egg bacon and spam + - egg bacon sausage and spam + - spam bacon sausage and spam + - spam egg spam spam bacon and spam + - spam sausage spam spam bacon spam tomato and spam + + .. note:: + Minion configuration options built into Salt (like those defined + :ref:`here `) will *always* be defined in + the Minion configuration and thus *cannot be overridden by grains or + pillar data*. However, additional (user-defined) configuration options + (as in the above example) will not be in the Minion configuration by + default and thus can be overridden using grains/pillar data by leaving + the option out of the minion config file. + + **Arguments** + + delimiter + .. versionadded:: 2015.5.0 + + Override the delimiter used to separate nested levels of a data + structure. + + merge + .. versionadded:: 2015.5.0 + + If passed, this parameter will change the behavior of the function so + that, instead of traversing each data store above in order and + returning the first match, the data stores are first merged together + and then searched. The pillar data is merged into the master config + data, then the grains are merged, followed by the Minion config data. + The resulting data structure is then searched for a match. This allows + for configurations to be more flexible. + + .. note:: + + The merging described above does not mean that grain data will end + up in the Minion's pillar data, or pillar data will end up in the + master config data, etc. The data is just combined for the purposes + of searching an amalgam of the different data stores. + + The supported merge strategies are as follows: + + - **recurse** - If a key exists in both dictionaries, and the new value + is not a dictionary, it is replaced. Otherwise, the sub-dictionaries + are merged together into a single dictionary, recursively on down, + following the same criteria. For example: + + .. code-block:: python + + >>> dict1 = {'foo': {'bar': 1, 'qux': True}, + 'hosts': ['a', 'b', 'c'], + 'only_x': None} + >>> dict2 = {'foo': {'baz': 2, 'qux': False}, + 'hosts': ['d', 'e', 'f'], + 'only_y': None} + >>> merged + {'foo': {'bar': 1, 'baz': 2, 'qux': False}, + 'hosts': ['d', 'e', 'f'], + 'only_dict1': None, + 'only_dict2': None} + + - **overwrite** - If a key exists in the top level of both + dictionaries, the new value completely overwrites the old. For + example: + + .. code-block:: python + + >>> dict1 = {'foo': {'bar': 1, 'qux': True}, + 'hosts': ['a', 'b', 'c'], + 'only_x': None} + >>> dict2 = {'foo': {'baz': 2, 'qux': False}, + 'hosts': ['d', 'e', 'f'], + 'only_y': None} + >>> merged + {'foo': {'baz': 2, 'qux': False}, + 'hosts': ['d', 'e', 'f'], + 'only_dict1': None, + 'only_dict2': None} CLI Example: .. code-block:: bash salt '*' config.get pkg:apache + salt '*' config.get lxc.container_profile:centos merge=recurse """ - ret = salt.utils.data.traverse_dict_and_list(__opts__, key, "_|-") - if ret != "_|-": - return ret - ret = salt.utils.data.traverse_dict_and_list(__grains__, key, "_|-") - if ret != "_|-": - return ret - ret = salt.utils.data.traverse_dict_and_list(__pillar__, key, "_|-") - if ret != "_|-": - return ret - ret = salt.utils.data.traverse_dict_and_list( - __pillar__.get("master", {}), key, "_|-" - ) - if ret != "_|-": - return ret + if merge is None: + if not omit_opts: + ret = salt.utils.data.traverse_dict_and_list( + __opts__, key, "_|-", delimiter=delimiter + ) + if ret != "_|-": + return sdb.sdb_get(ret, __opts__) + + if not omit_grains: + ret = salt.utils.data.traverse_dict_and_list( + __grains__, key, "_|-", delimiter + ) + if ret != "_|-": + return sdb.sdb_get(ret, __opts__) + + if not omit_pillar: + ret = salt.utils.data.traverse_dict_and_list( + __pillar__, key, "_|-", delimiter=delimiter + ) + if ret != "_|-": + return sdb.sdb_get(ret, __opts__) + + if not omit_master: + ret = salt.utils.data.traverse_dict_and_list( + __pillar__.get("master", {}), key, "_|-", delimiter=delimiter + ) + if ret != "_|-": + return sdb.sdb_get(ret, __opts__) + + ret = salt.utils.data.traverse_dict_and_list( + DEFAULTS, key, "_|-", delimiter=delimiter + ) + if ret != "_|-": + return sdb.sdb_get(ret, __opts__) + else: + if merge not in ("recurse", "overwrite"): + log.warning( + "Unsupported merge strategy '%s'. Falling back to 'recurse'.", merge + ) + merge = "recurse" + + merge_lists = salt.config.master_config("/etc/salt/master").get( + "pillar_merge_lists" + ) + + data = copy.copy(DEFAULTS) + data = salt.utils.dictupdate.merge( + data, __pillar__.get("master", {}), strategy=merge, merge_lists=merge_lists + ) + data = salt.utils.dictupdate.merge( + data, __pillar__, strategy=merge, merge_lists=merge_lists + ) + data = salt.utils.dictupdate.merge( + data, __grains__, strategy=merge, merge_lists=merge_lists + ) + data = salt.utils.dictupdate.merge( + data, __opts__, strategy=merge, merge_lists=merge_lists + ) + ret = salt.utils.data.traverse_dict_and_list( + data, key, "_|-", delimiter=delimiter + ) + if ret != "_|-": + return sdb.sdb_get(ret, __opts__) + return default @@ -241,3 +504,19 @@ def dot_vals(value): if key.startswith(f"{value}."): ret[key] = val return ret + + +def items(): + """ + Return the complete config from the currently running minion process. + This includes defaults for values not set in the config file. + + CLI Example: + + .. code-block:: bash + + salt '*' config.items + """ + # This would otherwise be parsed as just the value of "local" in opts. + # In case the wfunc parsing is improved, this can be removed. + return {"local": {"return": __opts__.copy()}} diff --git a/tests/pytests/integration/ssh/test_config.py b/tests/pytests/integration/ssh/test_config.py new file mode 100644 index 00000000000..d3ae2b03a3e --- /dev/null +++ b/tests/pytests/integration/ssh/test_config.py @@ -0,0 +1,66 @@ +import pytest + +pytestmark = [pytest.mark.slow_test] + + +def test_items(salt_ssh_cli): + ret = salt_ssh_cli.run("config.items") + assert ret.returncode == 0 + assert isinstance(ret.data, dict) + assert "id" in ret.data + assert "grains" in ret.data + assert "__master_opts__" in ret.data + assert "cachedir" in ret.data + + +@pytest.mark.parametrize("omit", (False, True)) +def test_option_minion_opt(salt_ssh_cli, omit): + # Minion opt + ret = salt_ssh_cli.run("config.option", "id", omit_opts=omit, omit_grains=True) + assert ret.returncode == 0 + assert (ret.data != salt_ssh_cli.get_minion_tgt()) is omit + assert (ret.data == "") is omit + + +@pytest.mark.parametrize("omit", (False, True)) +def test_option_pillar(salt_ssh_cli, omit): + ret = salt_ssh_cli.run("config.option", "ext_spam", omit_pillar=omit) + assert ret.returncode == 0 + assert (ret.data != "eggs") is omit + assert (ret.data == "") is omit + + +@pytest.mark.parametrize("omit", (False, True)) +def test_option_grain(salt_ssh_cli, omit): + ret = salt_ssh_cli.run("config.option", "kernel", omit_grains=omit) + assert ret.returncode == 0 + assert ( + ret.data not in ("Darwin", "Linux", "FreeBSD", "OpenBSD", "Windows") + ) is omit + assert (ret.data == "") is omit + + +@pytest.mark.parametrize("omit", (False, True)) +def test_get_minion_opt(salt_ssh_cli, omit): + ret = salt_ssh_cli.run("config.get", "cachedir", omit_master=True, omit_opts=omit) + assert ret.returncode == 0 + assert (ret.data == "") is omit + assert ("minion" not in ret.data) is omit + + +@pytest.mark.parametrize("omit", (False, True)) +def test_get_pillar(salt_ssh_cli, omit): + ret = salt_ssh_cli.run("config.get", "ext_spam", omit_pillar=omit) + assert ret.returncode == 0 + assert (ret.data != "eggs") is omit + assert (ret.data == "") is omit + + +@pytest.mark.parametrize("omit", (False, True)) +def test_get_grain(salt_ssh_cli, omit): + ret = salt_ssh_cli.run("config.get", "kernel", omit_grains=omit) + assert ret.returncode == 0 + assert ( + ret.data not in ("Darwin", "Linux", "FreeBSD", "OpenBSD", "Windows") + ) is omit + assert (ret.data == "") is omit diff --git a/tests/pytests/unit/client/ssh/wrapper/test_config.py b/tests/pytests/unit/client/ssh/wrapper/test_config.py new file mode 100644 index 00000000000..64e89c762ad --- /dev/null +++ b/tests/pytests/unit/client/ssh/wrapper/test_config.py @@ -0,0 +1,219 @@ +""" + Taken 1:1 from test cases for salt.modules.config + This tests the SSH wrapper module. +""" + + +import fnmatch + +import pytest + +import salt.client.ssh.wrapper.config as config +from tests.support.mock import patch + + +@pytest.fixture +def defaults(): + return { + "test.option.foo": "value of test.option.foo in defaults", + "test.option.bar": "value of test.option.bar in defaults", + "test.option.baz": "value of test.option.baz in defaults", + "test.option": "value of test.option in defaults", + } + + +@pytest.fixture +def no_match(): + return "test.option.nope" + + +@pytest.fixture +def opt_name(): + return "test.option.foo" + + +@pytest.fixture +def wildcard_opt_name(): + return "test.option.b*" + + +@pytest.fixture +def configure_loader_modules(): + return { + config: { + "__opts__": { + "test.option.foo": "value of test.option.foo in __opts__", + "test.option.bar": "value of test.option.bar in __opts__", + "test.option.baz": "value of test.option.baz in __opts__", + }, + "__pillar__": { + "test.option.foo": "value of test.option.foo in __pillar__", + "test.option.bar": "value of test.option.bar in __pillar__", + "test.option.baz": "value of test.option.baz in __pillar__", + "master": { + "test.option.foo": "value of test.option.foo in master", + "test.option.bar": "value of test.option.bar in master", + "test.option.baz": "value of test.option.baz in master", + }, + }, + "__grains__": { + "test.option.foo": "value of test.option.foo in __grains__", + "test.option.bar": "value of test.option.bar in __grains__", + "test.option.baz": "value of test.option.baz in __grains__", + }, + } + } + + +def _wildcard_match(data, wildcard_opt_name): + return {x: data[x] for x in fnmatch.filter(data, wildcard_opt_name)} + + +def test_defaults_only_name(defaults): + with patch.dict(config.DEFAULTS, defaults): + opt_name = "test.option" + opt = config.option(opt_name) + assert opt == config.DEFAULTS[opt_name] + + +def test_no_match(defaults, no_match, wildcard_opt_name): + """ + Make sure that the defa + """ + with patch.dict(config.DEFAULTS, defaults): + ret = config.option(no_match) + assert ret == "", ret + + default = "wat" + ret = config.option(no_match, default=default) + assert ret == default, ret + + ret = config.option(no_match, wildcard=True) + assert ret == {}, ret + + default = {"foo": "bar"} + ret = config.option(no_match, default=default, wildcard=True) + assert ret == default, ret + + # Should be no match since wildcard=False + ret = config.option(wildcard_opt_name) + assert ret == "", ret + + +def test_omits(defaults, opt_name, wildcard_opt_name): + with patch.dict(config.DEFAULTS, defaults): + + # ********** OMIT NOTHING ********** + + # Match should be in __opts__ dict + ret = config.option(opt_name) + assert ret == config.__opts__[opt_name], ret + + # Wildcard match + ret = config.option(wildcard_opt_name, wildcard=True) + assert ret == _wildcard_match(config.__opts__, wildcard_opt_name), ret + + # ********** OMIT __opts__ ********** + + # Match should be in __grains__ dict + ret = config.option(opt_name, omit_opts=True) + assert ret == config.__grains__[opt_name], ret + + # Wildcard match + ret = config.option(wildcard_opt_name, omit_opts=True, wildcard=True) + assert ret == _wildcard_match(config.__grains__, wildcard_opt_name), ret + + # ********** OMIT __opts__, __grains__ ********** + + # Match should be in __pillar__ dict + ret = config.option(opt_name, omit_opts=True, omit_grains=True) + assert ret == config.__pillar__[opt_name], ret + + # Wildcard match + ret = config.option( + wildcard_opt_name, omit_opts=True, omit_grains=True, wildcard=True + ) + assert ret == _wildcard_match(config.__pillar__, wildcard_opt_name), ret + + # ********** OMIT __opts__, __grains__, __pillar__ ********** + + # Match should be in master opts + ret = config.option( + opt_name, omit_opts=True, omit_grains=True, omit_pillar=True + ) + assert ret == config.__pillar__["master"][opt_name], ret + + # Wildcard match + ret = config.option( + wildcard_opt_name, + omit_opts=True, + omit_grains=True, + omit_pillar=True, + wildcard=True, + ) + assert ret == _wildcard_match( + config.__pillar__["master"], wildcard_opt_name + ), ret + + # ********** OMIT ALL THE THINGS ********** + + # Match should be in master opts + ret = config.option( + opt_name, + omit_opts=True, + omit_grains=True, + omit_pillar=True, + omit_master=True, + ) + assert ret == config.DEFAULTS[opt_name], ret + + # Wildcard match + ret = config.option( + wildcard_opt_name, + omit_opts=True, + omit_grains=True, + omit_pillar=True, + omit_master=True, + wildcard=True, + ) + assert ret == _wildcard_match(config.DEFAULTS, wildcard_opt_name), ret + + # Match should be in master opts + ret = config.option(opt_name, omit_all=True) + assert ret == config.DEFAULTS[opt_name], ret + + # Wildcard match + ret = config.option(wildcard_opt_name, omit_all=True, wildcard=True) + assert ret == _wildcard_match(config.DEFAULTS, wildcard_opt_name), ret + + +# --- Additional tests not found in the execution module tests + + +@pytest.mark.parametrize("backup", ("", "minion", "master", "both")) +def test_backup_mode(backup): + res = config.backup_mode(backup) + assert res == backup or "minion" + + +@pytest.mark.parametrize( + "uri,expected", + (("salt://my/foo.txt", True), ("mysql://foo:bar@foo.bar/baz", False)), +) +def test_valid_fileproto(uri, expected): + res = config.valid_fileproto(uri) + assert res is expected + + +def test_dot_vals(): + extra_master_opt = ("test.option.baah", "value of test.option.baah in master") + with patch.dict(config.__pillar__, {"master": dict((extra_master_opt,))}): + res = config.dot_vals("test") + assert isinstance(res, dict) + assert res + for var in ("foo", "bar", "baz"): + key = f"test.option.{var}" + assert key in res + assert res[key] == f"value of test.option.{var} in __opts__" + assert extra_master_opt[0] in res + assert res[extra_master_opt[0]] == extra_master_opt[1] From 512f61d573901098a7bba182943a5d5debf4ae50 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Mon, 6 Nov 2023 12:37:23 +0100 Subject: [PATCH 15/27] Add state.test to SSH wrapper (cherry picked from commit 82f90e2f15cb93fd7094a04b1493f74450b39d0c) --- changelog/61100.fixed.md | 1 + salt/client/ssh/wrapper/state.py | 15 ++++ tests/pytests/integration/ssh/conftest.py | 68 +++++++++++++++++++ .../integration/ssh/state/test_state.py | 10 +++ 4 files changed, 94 insertions(+) create mode 100644 changelog/61100.fixed.md diff --git a/changelog/61100.fixed.md b/changelog/61100.fixed.md new file mode 100644 index 00000000000..d7ac2b6bc3f --- /dev/null +++ b/changelog/61100.fixed.md @@ -0,0 +1 @@ +Fixed state.test does not work with salt-ssh diff --git a/salt/client/ssh/wrapper/state.py b/salt/client/ssh/wrapper/state.py index aa61e07f81e..ece4ee92c3a 100644 --- a/salt/client/ssh/wrapper/state.py +++ b/salt/client/ssh/wrapper/state.py @@ -1317,3 +1317,18 @@ def single(fun, name, test=None, **kwargs): # If for some reason the json load fails, return the stdout return stdout + + +def test(*args, **kwargs): + """ + .. versionadded:: 3001 + + Alias for `state.apply` with the kwarg `test` forced to `True`. + + This is a nicety to avoid the need to type out `test=True` and the possibility of + a typo causing changes you do not intend. + """ + kwargs["test"] = True + ret = apply_(*args, **kwargs) + + return ret diff --git a/tests/pytests/integration/ssh/conftest.py b/tests/pytests/integration/ssh/conftest.py index 7c1ceeba7ca..b0028efee17 100644 --- a/tests/pytests/integration/ssh/conftest.py +++ b/tests/pytests/integration/ssh/conftest.py @@ -25,3 +25,71 @@ def _reap_stray_processes(): with reap_stray_processes(): # Run test yield + + +@pytest.fixture(scope="module") +def state_tree(base_env_state_tree_root_dir): + top_file = """ + {%- from "map.jinja" import abc with context %} + base: + 'localhost': + - basic + '127.0.0.1': + - basic + """ + map_file = """ + {%- set abc = "def" %} + """ + state_file = """ + {%- from "map.jinja" import abc with context %} + Ok with {{ abc }}: + test.succeed_with_changes + """ + top_tempfile = pytest.helpers.temp_file( + "top.sls", top_file, base_env_state_tree_root_dir + ) + map_tempfile = pytest.helpers.temp_file( + "map.jinja", map_file, base_env_state_tree_root_dir + ) + state_tempfile = pytest.helpers.temp_file( + "test.sls", state_file, base_env_state_tree_root_dir + ) + with top_tempfile, map_tempfile, state_tempfile: + yield + + +@pytest.fixture(scope="module") +def state_tree_dir(base_env_state_tree_root_dir): + """ + State tree with files to test salt-ssh + when the map.jinja file is in another directory + """ + top_file = """ + {%- from "test/map.jinja" import abc with context %} + base: + 'localhost': + - test + '127.0.0.1': + - test + """ + map_file = """ + {%- set abc = "def" %} + """ + state_file = """ + {%- from "test/map.jinja" import abc with context %} + + Ok with {{ abc }}: + test.succeed_without_changes + """ + top_tempfile = pytest.helpers.temp_file( + "top.sls", top_file, base_env_state_tree_root_dir + ) + map_tempfile = pytest.helpers.temp_file( + "test/map.jinja", map_file, base_env_state_tree_root_dir + ) + state_tempfile = pytest.helpers.temp_file( + "test.sls", state_file, base_env_state_tree_root_dir + ) + + with top_tempfile, map_tempfile, state_tempfile: + yield diff --git a/tests/pytests/integration/ssh/state/test_state.py b/tests/pytests/integration/ssh/state/test_state.py index 62e8cbf513b..a7ebb22a601 100644 --- a/tests/pytests/integration/ssh/state/test_state.py +++ b/tests/pytests/integration/ssh/state/test_state.py @@ -101,3 +101,13 @@ def test_state_high(salt_ssh_cli): """ ret = salt_ssh_cli.run("state.high", '{"echo blah": {"cmd": ["run"]}}') assert ret.data["cmd_|-echo blah_|-echo blah_|-run"]["changes"]["stdout"] == "blah" + + +def test_state_test(salt_ssh_cli, state_tree): + ret = salt_ssh_cli.run("state.test", "test") + assert ret.returncode == 0 + assert ret.data + assert ( + ret.data["test_|-Ok with def_|-Ok with def_|-succeed_with_changes"]["result"] + is None + ) From fbf345e0d4ab685276fbe215e80cfd07e43310cf Mon Sep 17 00:00:00 2001 From: jeanluc Date: Tue, 28 Nov 2023 21:46:14 +0100 Subject: [PATCH 16/27] Add logmod SSH wrapper (cherry picked from commit 18bc40c77af75c491d2009ad851e86287fc3f6dd) --- changelog/65630.fixed.md | 1 + salt/client/ssh/wrapper/logmod.py | 79 +++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 changelog/65630.fixed.md create mode 100644 salt/client/ssh/wrapper/logmod.py diff --git a/changelog/65630.fixed.md b/changelog/65630.fixed.md new file mode 100644 index 00000000000..e8650abcdc1 --- /dev/null +++ b/changelog/65630.fixed.md @@ -0,0 +1 @@ +Added SSH wrapper for logmod diff --git a/salt/client/ssh/wrapper/logmod.py b/salt/client/ssh/wrapper/logmod.py new file mode 100644 index 00000000000..911fd7a1d4c --- /dev/null +++ b/salt/client/ssh/wrapper/logmod.py @@ -0,0 +1,79 @@ +""" +On-demand logging +================= + +.. versionadded:: 2017.7.0 + +The sole purpose of this module is logging messages in the minion. +It comes very handy when debugging complex Jinja templates, for example: + +.. code-block:: jinja + + {%- for var in range(10) %} + {%- do salt["log.info"](var) -%} + {%- endfor %} + +CLI Example: + +.. code-block:: bash + + salt '*' log.error "Please don't do that, this module is not for CLI use!" +""" + +import logging + +log = logging.getLogger(__name__) + +__virtualname__ = "log" + + +def __virtual__(): + return __virtualname__ + + +def debug(message): + """ + Log message at level DEBUG. + """ + log.debug(message) + return True + + +def info(message): + """ + Log message at level INFO. + """ + log.info(message) + return True + + +def warning(message): + """ + Log message at level WARNING. + """ + log.warning(message) + return True + + +def error(message): + """ + Log message at level ERROR. + """ + log.error(message) + return True + + +def critical(message): + """ + Log message at level CRITICAL. + """ + log.critical(message) + return True + + +def exception(message): + """ + Log message at level EXCEPTION. + """ + log.exception(message) + return True From db1dfb6784df26caccdce710a3423f99ced48626 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Mon, 6 Nov 2023 15:27:17 +0100 Subject: [PATCH 17/27] Fix unused var in `grains.get` wrapper `ordered=False` would not have worked before (cherry picked from commit 5e16d8483458d4f58dee2d968a781c8e006633ee) --- salt/client/ssh/wrapper/grains.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/salt/client/ssh/wrapper/grains.py b/salt/client/ssh/wrapper/grains.py index 400131e1517..70d2c7e72da 100644 --- a/salt/client/ssh/wrapper/grains.py +++ b/salt/client/ssh/wrapper/grains.py @@ -72,9 +72,7 @@ def get(key, default="", delimiter=DEFAULT_TARGET_DELIM, ordered=True): grains = __grains__.value() else: grains = salt.utils.json.loads(salt.utils.json.dumps(__grains__.value())) - return salt.utils.data.traverse_dict_and_list( - __grains__.value(), key, default, delimiter - ) + return salt.utils.data.traverse_dict_and_list(grains, key, default, delimiter) def has_value(key): From 8e54f2833307201f037e665726ffaf127e7d236c Mon Sep 17 00:00:00 2001 From: jeanluc Date: Mon, 24 Jun 2024 09:02:26 +0200 Subject: [PATCH 18/27] Fix state.test test, run pre-commit The test fix was part of 6a715107fa89b060175ef0c0ae0827b409411543 --- salt/client/ssh/wrapper/slsutil.py | 8 ++++---- tests/pytests/integration/ssh/state/conftest.py | 2 +- tests/pytests/integration/ssh/test_config.py | 4 +++- tests/pytests/unit/client/ssh/wrapper/test_config.py | 1 - 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/salt/client/ssh/wrapper/slsutil.py b/salt/client/ssh/wrapper/slsutil.py index e09ca1c2984..586d09ad2d6 100644 --- a/salt/client/ssh/wrapper/slsutil.py +++ b/salt/client/ssh/wrapper/slsutil.py @@ -173,7 +173,7 @@ def renderer(path=None, string=None, default_renderer="jinja|yaml", **kwargs): default_renderer, __opts__["renderer_blacklist"], __opts__["renderer_whitelist"], - **kwargs + **kwargs, ) return ret.read() if salt.utils.stringio.is_readable(ret) else ret @@ -185,12 +185,12 @@ def _get_serialize_fn(serializer, fn_name): if not fns: raise salt.exceptions.CommandExecutionError( - "Serializer '{}' not found.".format(serializer) + f"Serializer '{serializer}' not found." ) if not fn: raise salt.exceptions.CommandExecutionError( - "Serializer '{}' does not implement {}.".format(serializer, fn_name) + f"Serializer '{serializer}' does not implement {fn_name}." ) return fn @@ -419,7 +419,7 @@ def findup(startpath, filenames, saltenv="base"): # Verify the cwd is a valid path in the state tree if startpath and not path_exists(startpath, saltenv): raise salt.exceptions.SaltInvocationError( - "Starting path not found in the state tree: {}".format(startpath) + f"Starting path not found in the state tree: {startpath}" ) # Ensure that patterns is a string or list of strings diff --git a/tests/pytests/integration/ssh/state/conftest.py b/tests/pytests/integration/ssh/state/conftest.py index 14d645ae8e8..9de0d6bcad8 100644 --- a/tests/pytests/integration/ssh/state/conftest.py +++ b/tests/pytests/integration/ssh/state/conftest.py @@ -17,7 +17,7 @@ def state_tree(base_env_state_tree_root_dir): state_file = """ {%- from "map.jinja" import abc with context %} Ok with {{ abc }}: - test.succeed_without_changes + test.succeed_with_changes """ top_tempfile = pytest.helpers.temp_file( "top.sls", top_file, base_env_state_tree_root_dir diff --git a/tests/pytests/integration/ssh/test_config.py b/tests/pytests/integration/ssh/test_config.py index d3ae2b03a3e..7f38ec5a0a8 100644 --- a/tests/pytests/integration/ssh/test_config.py +++ b/tests/pytests/integration/ssh/test_config.py @@ -16,7 +16,9 @@ def test_items(salt_ssh_cli): @pytest.mark.parametrize("omit", (False, True)) def test_option_minion_opt(salt_ssh_cli, omit): # Minion opt - ret = salt_ssh_cli.run("config.option", "id", omit_opts=omit, omit_grains=True) + ret = salt_ssh_cli.run( + "config.option", "id", omit_opts=omit, omit_grains=True, omit_master=True + ) assert ret.returncode == 0 assert (ret.data != salt_ssh_cli.get_minion_tgt()) is omit assert (ret.data == "") is omit diff --git a/tests/pytests/unit/client/ssh/wrapper/test_config.py b/tests/pytests/unit/client/ssh/wrapper/test_config.py index 64e89c762ad..a708b925fdf 100644 --- a/tests/pytests/unit/client/ssh/wrapper/test_config.py +++ b/tests/pytests/unit/client/ssh/wrapper/test_config.py @@ -3,7 +3,6 @@ This tests the SSH wrapper module. """ - import fnmatch import pytest From ec663ec3a7c4b771669c724829bb65efc0763cbb Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 25 Jun 2024 00:28:19 -0700 Subject: [PATCH 19/27] move comment to helpful docstring --- salt/config/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/config/__init__.py b/salt/config/__init__.py index b6749868bd4..6d0bc947fc2 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -2216,6 +2216,10 @@ def include_config(include, orig_path, verbose, exit_on_config_errors=False): def should_prepend_root_dir(key, opts): + """ + Prepend root dir only when the key exists, has a value, and that value is + not a URI. + """ return ( key in opts and opts[key] is not None @@ -2519,7 +2523,6 @@ def syndic_config( "autosign_grains_dir", ] for config_key in ("log_file", "key_logfile", "syndic_log_file"): - # If this is not a URI and instead a local path if should_prepend_root_dir(config_key, opts): prepend_root_dirs.append(config_key) prepend_root_dir(opts, prepend_root_dirs) From 24d5a4ea4b4ffd2b70f3aebb0db98d369dd8b382 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 25 Jun 2024 02:48:14 -0700 Subject: [PATCH 20/27] Skip flawed test --- tests/pytests/integration/daemons/test_memory_leak.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/pytests/integration/daemons/test_memory_leak.py b/tests/pytests/integration/daemons/test_memory_leak.py index d61bb85b736..44111647a04 100644 --- a/tests/pytests/integration/daemons/test_memory_leak.py +++ b/tests/pytests/integration/daemons/test_memory_leak.py @@ -37,6 +37,9 @@ def file_add_delete_sls(tmp_path, salt_master): yield sls_name +# This test is fundimentally flawed. Needs to be re-factored to test the memory +# consuption of the minoin process not system wide memory. +@pytest.mark.skip(reason="Flawed test") @pytest.mark.skip_on_fips_enabled_platform @pytest.mark.skip_on_windows(reason="Windows is a spawning platform, won't work") @pytest.mark.skip_on_darwin(reason="MacOS is a spawning platform, won't work") From 89442132ff687b90df91e1d51ac43ea7dfb00bc9 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 22 Jun 2024 01:18:10 -0700 Subject: [PATCH 21/27] Add documentation about Salt's master packge user --- doc/ref/configuration/master.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/ref/configuration/master.rst b/doc/ref/configuration/master.rst index f056680cac5..b26f069251f 100644 --- a/doc/ref/configuration/master.rst +++ b/doc/ref/configuration/master.rst @@ -96,6 +96,14 @@ The user to run the Salt processes user: root +.. note:: + + Starting with version `3006.0`, Salt's offical packages ship with a default + configuration which runs the Master as a non-priviledged user. The Master's + configuration file has the `user` option set to `user: salt`. Unless you + are absolutly sure want to run salt as some other user, care should be + taken to preserve this setting in your Master configuration file.. + .. conf_master:: ret_port ``enable_ssh_minions`` From 78c29e16799f79bfc7f5745a6ea91b4b287f36b1 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 25 Jun 2024 02:04:33 -0700 Subject: [PATCH 22/27] Bump pymysql to 1.1.1 --- requirements/static/ci/linux.in | 2 +- requirements/static/ci/py3.10/lint.txt | 2 +- requirements/static/ci/py3.10/linux.txt | 2 +- requirements/static/ci/py3.11/lint.txt | 2 +- requirements/static/ci/py3.11/linux.txt | 2 +- requirements/static/ci/py3.12/lint.txt | 2 +- requirements/static/ci/py3.12/linux.txt | 2 +- requirements/static/ci/py3.7/linux.txt | 2 +- requirements/static/ci/py3.8/lint.txt | 2 +- requirements/static/ci/py3.8/linux.txt | 2 +- requirements/static/ci/py3.9/lint.txt | 2 +- requirements/static/ci/py3.9/linux.txt | 2 +- requirements/static/pkg/py3.10/windows.txt | 2 +- requirements/static/pkg/py3.11/windows.txt | 2 +- requirements/static/pkg/py3.12/windows.txt | 2 +- requirements/static/pkg/py3.7/windows.txt | 2 +- requirements/static/pkg/py3.8/windows.txt | 2 +- requirements/static/pkg/py3.9/windows.txt | 2 +- requirements/windows.txt | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/requirements/static/ci/linux.in b/requirements/static/ci/linux.in index 8d247386d61..c52c53dc58b 100644 --- a/requirements/static/ci/linux.in +++ b/requirements/static/ci/linux.in @@ -3,7 +3,7 @@ pyiface pygit2>=1.10.1 -pymysql>=1.0.2 +pymysql>=1.1.1 ansible>=9.1.0; python_version >= '3.10' twilio python-telegram-bot>=13.7 diff --git a/requirements/static/ci/py3.10/lint.txt b/requirements/static/ci/py3.10/lint.txt index 415b717d338..486f5600846 100644 --- a/requirements/static/ci/py3.10/lint.txt +++ b/requirements/static/ci/py3.10/lint.txt @@ -440,7 +440,7 @@ pylint==3.1.0 # via # -r requirements/static/ci/lint.in # saltpylint -pymysql==1.0.2 +pymysql==1.1.1 # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/linux.in diff --git a/requirements/static/ci/py3.10/linux.txt b/requirements/static/ci/py3.10/linux.txt index c77f42ab986..408bb559306 100644 --- a/requirements/static/ci/py3.10/linux.txt +++ b/requirements/static/ci/py3.10/linux.txt @@ -317,7 +317,7 @@ pyinotify==0.9.6 ; sys_platform != "win32" and sys_platform != "darwin" and plat # via -r requirements/static/ci/common.in pyjwt==2.4.0 # via twilio -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/static/ci/linux.in pynacl==1.5.0 # via diff --git a/requirements/static/ci/py3.11/lint.txt b/requirements/static/ci/py3.11/lint.txt index 120555d68e4..0f82eeb9812 100644 --- a/requirements/static/ci/py3.11/lint.txt +++ b/requirements/static/ci/py3.11/lint.txt @@ -415,7 +415,7 @@ pylint==3.1.0 # via # -r requirements/static/ci/lint.in # saltpylint -pymysql==1.0.2 +pymysql==1.1.1 # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/linux.in diff --git a/requirements/static/ci/py3.11/linux.txt b/requirements/static/ci/py3.11/linux.txt index 485b10fe04d..50f9d2e6c23 100644 --- a/requirements/static/ci/py3.11/linux.txt +++ b/requirements/static/ci/py3.11/linux.txt @@ -298,7 +298,7 @@ pyinotify==0.9.6 ; sys_platform != "win32" and sys_platform != "darwin" and plat # via -r requirements/static/ci/common.in pyjwt==2.4.0 # via twilio -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/static/ci/linux.in pynacl==1.5.0 # via diff --git a/requirements/static/ci/py3.12/lint.txt b/requirements/static/ci/py3.12/lint.txt index c0cb40aea24..561121643c3 100644 --- a/requirements/static/ci/py3.12/lint.txt +++ b/requirements/static/ci/py3.12/lint.txt @@ -415,7 +415,7 @@ pylint==3.1.0 # via # -r requirements/static/ci/lint.in # saltpylint -pymysql==1.0.2 +pymysql==1.1.1 # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/linux.in diff --git a/requirements/static/ci/py3.12/linux.txt b/requirements/static/ci/py3.12/linux.txt index a647e737fb1..b5f17364acf 100644 --- a/requirements/static/ci/py3.12/linux.txt +++ b/requirements/static/ci/py3.12/linux.txt @@ -298,7 +298,7 @@ pyinotify==0.9.6 ; sys_platform != "win32" and sys_platform != "darwin" and plat # via -r requirements/static/ci/common.in pyjwt==2.4.0 # via twilio -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/static/ci/linux.in pynacl==1.5.0 # via diff --git a/requirements/static/ci/py3.7/linux.txt b/requirements/static/ci/py3.7/linux.txt index 45d302e07ef..4cef9ee8a92 100644 --- a/requirements/static/ci/py3.7/linux.txt +++ b/requirements/static/ci/py3.7/linux.txt @@ -351,7 +351,7 @@ pyinotify==0.9.6 ; sys_platform != "win32" and sys_platform != "darwin" and plat # via -r requirements/static/ci/common.in pyjwt==2.4.0 # via twilio -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/static/ci/linux.in pynacl==1.5.0 # via diff --git a/requirements/static/ci/py3.8/lint.txt b/requirements/static/ci/py3.8/lint.txt index 0f29de9ca21..10379323d13 100644 --- a/requirements/static/ci/py3.8/lint.txt +++ b/requirements/static/ci/py3.8/lint.txt @@ -466,7 +466,7 @@ pylint==3.1.0 # via # -r requirements/static/ci/lint.in # saltpylint -pymysql==1.0.2 +pymysql==1.1.1 # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/linux.in diff --git a/requirements/static/ci/py3.8/linux.txt b/requirements/static/ci/py3.8/linux.txt index a941172a1b4..81e4f5887dd 100644 --- a/requirements/static/ci/py3.8/linux.txt +++ b/requirements/static/ci/py3.8/linux.txt @@ -337,7 +337,7 @@ pyinotify==0.9.6 ; sys_platform != "win32" and sys_platform != "darwin" and plat # via -r requirements/static/ci/common.in pyjwt==2.4.0 # via twilio -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/static/ci/linux.in pynacl==1.5.0 # via diff --git a/requirements/static/ci/py3.9/lint.txt b/requirements/static/ci/py3.9/lint.txt index 528d6b19a6d..1d9c6c700e8 100644 --- a/requirements/static/ci/py3.9/lint.txt +++ b/requirements/static/ci/py3.9/lint.txt @@ -464,7 +464,7 @@ pylint==3.1.0 # via # -r requirements/static/ci/lint.in # saltpylint -pymysql==1.0.2 +pymysql==1.1.1 # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/linux.in diff --git a/requirements/static/ci/py3.9/linux.txt b/requirements/static/ci/py3.9/linux.txt index 7ceba7b213f..b51f0334b34 100644 --- a/requirements/static/ci/py3.9/linux.txt +++ b/requirements/static/ci/py3.9/linux.txt @@ -337,7 +337,7 @@ pyinotify==0.9.6 ; sys_platform != "win32" and sys_platform != "darwin" and plat # via -r requirements/static/ci/common.in pyjwt==2.4.0 # via twilio -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/static/ci/linux.in pynacl==1.5.0 # via diff --git a/requirements/static/pkg/py3.10/windows.txt b/requirements/static/pkg/py3.10/windows.txt index 16140376647..f4f37456d24 100644 --- a/requirements/static/pkg/py3.10/windows.txt +++ b/requirements/static/pkg/py3.10/windows.txt @@ -88,7 +88,7 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.7 # via -r requirements/windows.txt -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.11/windows.txt b/requirements/static/pkg/py3.11/windows.txt index 8648d4d0a94..4a320588e3d 100644 --- a/requirements/static/pkg/py3.11/windows.txt +++ b/requirements/static/pkg/py3.11/windows.txt @@ -88,7 +88,7 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.7 # via -r requirements/windows.txt -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.12/windows.txt b/requirements/static/pkg/py3.12/windows.txt index 57a8aae61de..eedfb1bcc35 100644 --- a/requirements/static/pkg/py3.12/windows.txt +++ b/requirements/static/pkg/py3.12/windows.txt @@ -88,7 +88,7 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.7 # via -r requirements/windows.txt -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.7/windows.txt b/requirements/static/pkg/py3.7/windows.txt index 9328483442a..c89d669a617 100644 --- a/requirements/static/pkg/py3.7/windows.txt +++ b/requirements/static/pkg/py3.7/windows.txt @@ -88,7 +88,7 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.1 # via -r requirements/windows.txt -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.8/windows.txt b/requirements/static/pkg/py3.8/windows.txt index 4aad72e3e2f..8d96a3e9d88 100644 --- a/requirements/static/pkg/py3.8/windows.txt +++ b/requirements/static/pkg/py3.8/windows.txt @@ -88,7 +88,7 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.1 # via -r requirements/windows.txt -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt diff --git a/requirements/static/pkg/py3.9/windows.txt b/requirements/static/pkg/py3.9/windows.txt index 4f1d8efd7d8..096a32f28a0 100644 --- a/requirements/static/pkg/py3.9/windows.txt +++ b/requirements/static/pkg/py3.9/windows.txt @@ -88,7 +88,7 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.1 # via -r requirements/windows.txt -pymysql==1.0.2 +pymysql==1.1.1 # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt diff --git a/requirements/windows.txt b/requirements/windows.txt index 05884f31a70..ed5a71964c9 100644 --- a/requirements/windows.txt +++ b/requirements/windows.txt @@ -16,7 +16,7 @@ lxml>=4.6.3 pyasn1>=0.4.8 pycparser>=2.21 pymssql>=2.2.1 -pymysql>=1.0.2 +pymysql>=1.1.1 pyopenssl>=23.2.0 python-dateutil>=2.8.1 python-gnupg>=0.4.7 From 3821987b9dc5e3b6a1838c1732a863849a1fa6ae Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 25 Jun 2024 02:08:24 -0700 Subject: [PATCH 23/27] Add chengelog for dependency version updates --- changelog/66666.fixed.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/66666.fixed.md diff --git a/changelog/66666.fixed.md b/changelog/66666.fixed.md new file mode 100644 index 00000000000..076088f4d0c --- /dev/null +++ b/changelog/66666.fixed.md @@ -0,0 +1,4 @@ +Upgrade dependencies due to security issues: +- pymysql>=1.1.1 +- requests>=2.32.0 +- docker>=7.1.0 From 54ebfae38a745d316a6ee7d8bff6f282beaae4f7 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 25 Jun 2024 08:44:11 -0700 Subject: [PATCH 24/27] Remove pymysql from windows core requirements --- requirements/static/pkg/py3.10/windows.txt | 2 -- requirements/static/pkg/py3.11/windows.txt | 2 -- requirements/static/pkg/py3.12/windows.txt | 2 -- requirements/static/pkg/py3.7/windows.txt | 2 -- requirements/static/pkg/py3.8/windows.txt | 2 -- requirements/static/pkg/py3.9/windows.txt | 2 -- requirements/windows.txt | 1 - 7 files changed, 13 deletions(-) diff --git a/requirements/static/pkg/py3.10/windows.txt b/requirements/static/pkg/py3.10/windows.txt index f4f37456d24..bfe57f0e836 100644 --- a/requirements/static/pkg/py3.10/windows.txt +++ b/requirements/static/pkg/py3.10/windows.txt @@ -88,8 +88,6 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.7 # via -r requirements/windows.txt -pymysql==1.1.1 - # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt python-dateutil==2.8.1 diff --git a/requirements/static/pkg/py3.11/windows.txt b/requirements/static/pkg/py3.11/windows.txt index 4a320588e3d..e06961fc0b4 100644 --- a/requirements/static/pkg/py3.11/windows.txt +++ b/requirements/static/pkg/py3.11/windows.txt @@ -88,8 +88,6 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.7 # via -r requirements/windows.txt -pymysql==1.1.1 - # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt python-dateutil==2.8.1 diff --git a/requirements/static/pkg/py3.12/windows.txt b/requirements/static/pkg/py3.12/windows.txt index eedfb1bcc35..cc34a95759e 100644 --- a/requirements/static/pkg/py3.12/windows.txt +++ b/requirements/static/pkg/py3.12/windows.txt @@ -88,8 +88,6 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.7 # via -r requirements/windows.txt -pymysql==1.1.1 - # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt python-dateutil==2.8.1 diff --git a/requirements/static/pkg/py3.7/windows.txt b/requirements/static/pkg/py3.7/windows.txt index c89d669a617..3643bf7d4e1 100644 --- a/requirements/static/pkg/py3.7/windows.txt +++ b/requirements/static/pkg/py3.7/windows.txt @@ -88,8 +88,6 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.1 # via -r requirements/windows.txt -pymysql==1.1.1 - # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt python-dateutil==2.8.1 diff --git a/requirements/static/pkg/py3.8/windows.txt b/requirements/static/pkg/py3.8/windows.txt index 8d96a3e9d88..d90856f7480 100644 --- a/requirements/static/pkg/py3.8/windows.txt +++ b/requirements/static/pkg/py3.8/windows.txt @@ -88,8 +88,6 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.1 # via -r requirements/windows.txt -pymysql==1.1.1 - # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt python-dateutil==2.8.1 diff --git a/requirements/static/pkg/py3.9/windows.txt b/requirements/static/pkg/py3.9/windows.txt index 096a32f28a0..b41378856dd 100644 --- a/requirements/static/pkg/py3.9/windows.txt +++ b/requirements/static/pkg/py3.9/windows.txt @@ -88,8 +88,6 @@ pycryptodomex==3.19.1 # via -r requirements/crypto.txt pymssql==2.2.1 # via -r requirements/windows.txt -pymysql==1.1.1 - # via -r requirements/windows.txt pyopenssl==24.0.0 # via -r requirements/windows.txt python-dateutil==2.8.1 diff --git a/requirements/windows.txt b/requirements/windows.txt index ed5a71964c9..ecb512cf343 100644 --- a/requirements/windows.txt +++ b/requirements/windows.txt @@ -16,7 +16,6 @@ lxml>=4.6.3 pyasn1>=0.4.8 pycparser>=2.21 pymssql>=2.2.1 -pymysql>=1.1.1 pyopenssl>=23.2.0 python-dateutil>=2.8.1 python-gnupg>=0.4.7 From 83dc2acece98ebac5788ed8efbd487548513095a Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 27 Jun 2024 05:44:10 -0700 Subject: [PATCH 25/27] Fix pre-commit on 3006.x --- requirements/static/ci/py3.10/windows.txt | 4 ---- requirements/static/ci/py3.11/windows.txt | 4 ---- requirements/static/ci/py3.12/windows.txt | 4 ---- requirements/static/ci/py3.7/windows.txt | 4 ---- requirements/static/ci/py3.8/windows.txt | 4 ---- requirements/static/ci/py3.9/windows.txt | 4 ---- 6 files changed, 24 deletions(-) diff --git a/requirements/static/ci/py3.10/windows.txt b/requirements/static/ci/py3.10/windows.txt index 5b9624a13bf..7b8227fe106 100644 --- a/requirements/static/ci/py3.10/windows.txt +++ b/requirements/static/ci/py3.10/windows.txt @@ -287,10 +287,6 @@ pymssql==2.2.7 # via # -c requirements/static/ci/../pkg/py3.10/windows.txt # -r requirements/windows.txt -pymysql==1.0.2 - # via - # -c requirements/static/ci/../pkg/py3.10/windows.txt - # -r requirements/windows.txt pynacl==1.5.0 # via -r requirements/static/ci/common.in pyopenssl==24.0.0 diff --git a/requirements/static/ci/py3.11/windows.txt b/requirements/static/ci/py3.11/windows.txt index 10d280d88e3..bba963d83c4 100644 --- a/requirements/static/ci/py3.11/windows.txt +++ b/requirements/static/ci/py3.11/windows.txt @@ -283,10 +283,6 @@ pymssql==2.2.7 # via # -c requirements/static/ci/../pkg/py3.11/windows.txt # -r requirements/windows.txt -pymysql==1.0.2 - # via - # -c requirements/static/ci/../pkg/py3.11/windows.txt - # -r requirements/windows.txt pynacl==1.5.0 # via -r requirements/static/ci/common.in pyopenssl==24.0.0 diff --git a/requirements/static/ci/py3.12/windows.txt b/requirements/static/ci/py3.12/windows.txt index c104716e476..1399fedbb34 100644 --- a/requirements/static/ci/py3.12/windows.txt +++ b/requirements/static/ci/py3.12/windows.txt @@ -279,10 +279,6 @@ pyfakefs==5.3.1 # via -r requirements/pytest.txt pygit2==1.13.1 # via -r requirements/static/ci/windows.in -pymssql==2.2.7 - # via - # -c requirements/static/ci/../pkg/py3.12/windows.txt - # -r requirements/windows.txt pymysql==1.0.2 # via # -c requirements/static/ci/../pkg/py3.12/windows.txt diff --git a/requirements/static/ci/py3.7/windows.txt b/requirements/static/ci/py3.7/windows.txt index a4876a1bb85..f80bc01b0fe 100644 --- a/requirements/static/ci/py3.7/windows.txt +++ b/requirements/static/ci/py3.7/windows.txt @@ -302,10 +302,6 @@ pymssql==2.2.1 # via # -c requirements/static/ci/../pkg/py3.7/windows.txt # -r requirements/windows.txt -pymysql==1.0.2 - # via - # -c requirements/static/ci/../pkg/py3.7/windows.txt - # -r requirements/windows.txt pynacl==1.5.0 # via -r requirements/static/ci/common.in pyopenssl==24.0.0 diff --git a/requirements/static/ci/py3.8/windows.txt b/requirements/static/ci/py3.8/windows.txt index b4b7b370aae..6e4fc76fa20 100644 --- a/requirements/static/ci/py3.8/windows.txt +++ b/requirements/static/ci/py3.8/windows.txt @@ -288,10 +288,6 @@ pymssql==2.2.1 # via # -c requirements/static/ci/../pkg/py3.8/windows.txt # -r requirements/windows.txt -pymysql==1.0.2 - # via - # -c requirements/static/ci/../pkg/py3.8/windows.txt - # -r requirements/windows.txt pynacl==1.5.0 # via -r requirements/static/ci/common.in pyopenssl==24.0.0 diff --git a/requirements/static/ci/py3.9/windows.txt b/requirements/static/ci/py3.9/windows.txt index f286fbcccc3..df626b9c650 100644 --- a/requirements/static/ci/py3.9/windows.txt +++ b/requirements/static/ci/py3.9/windows.txt @@ -289,10 +289,6 @@ pymssql==2.2.1 # via # -c requirements/static/ci/../pkg/py3.9/windows.txt # -r requirements/windows.txt -pymysql==1.0.2 - # via - # -c requirements/static/ci/../pkg/py3.9/windows.txt - # -r requirements/windows.txt pynacl==1.5.0 # via -r requirements/static/ci/common.in pyopenssl==24.0.0 From 6984ae0ca1309aa98ab68578f6be657a9301dc4f Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 27 Jun 2024 06:32:24 -0700 Subject: [PATCH 26/27] Upgrade relenv to 0.17.0 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/nightly.yml | 8 ++++---- .github/workflows/scheduled.yml | 8 ++++---- .github/workflows/staging.yml | 8 ++++---- changelog/66663.fixed.md | 1 + cicd/shared-gh-workflows-context.yml | 2 +- 6 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 changelog/66663.fixed.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd3e777d3f9..20769929078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -416,7 +416,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-salt-onedir: @@ -432,7 +432,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-pkgs-onedir: @@ -445,7 +445,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "onedir" @@ -459,7 +459,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "src" build-ci-deps: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4f851c7d93c..93c4c09f55e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -470,7 +470,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-salt-onedir: @@ -486,7 +486,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-pkgs-onedir: @@ -499,7 +499,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "onedir" environment: nightly @@ -517,7 +517,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "src" environment: nightly diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index ca2e0ab3bd7..2ab7dc11b6d 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -455,7 +455,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-salt-onedir: @@ -471,7 +471,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-pkgs-onedir: @@ -484,7 +484,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "onedir" @@ -498,7 +498,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "src" build-ci-deps: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 3a1c39bd4ad..1313812f8ed 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -455,7 +455,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-salt-onedir: @@ -471,7 +471,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" build-pkgs-onedir: @@ -484,7 +484,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "onedir" environment: staging @@ -502,7 +502,7 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.16.1" + relenv-version: "0.17.0" python-version: "3.10.14" source: "src" environment: staging diff --git a/changelog/66663.fixed.md b/changelog/66663.fixed.md new file mode 100644 index 00000000000..14a40b4730e --- /dev/null +++ b/changelog/66663.fixed.md @@ -0,0 +1 @@ +Upgrade relenv to 0.17.0 (https://github.com/saltstack/relenv/blob/v0.17.0/CHANGELOG.md) diff --git a/cicd/shared-gh-workflows-context.yml b/cicd/shared-gh-workflows-context.yml index 9b2955f5974..9cd0641c739 100644 --- a/cicd/shared-gh-workflows-context.yml +++ b/cicd/shared-gh-workflows-context.yml @@ -1,6 +1,6 @@ nox_version: "2022.8.7" python_version: "3.10.14" -relenv_version: "0.16.1" +relenv_version: "0.17.0" mandatory_os_slugs: - rockylinux-9 - amazonlinux-2023-arm64 From 0c5022277523fadd73b1a0191cee0fd872aa0c96 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 29 Jun 2024 21:17:00 -0700 Subject: [PATCH 27/27] Fix pre-commit --- requirements/static/ci/py3.12/windows.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/static/ci/py3.12/windows.txt b/requirements/static/ci/py3.12/windows.txt index 1399fedbb34..10db47cc116 100644 --- a/requirements/static/ci/py3.12/windows.txt +++ b/requirements/static/ci/py3.12/windows.txt @@ -279,7 +279,7 @@ pyfakefs==5.3.1 # via -r requirements/pytest.txt pygit2==1.13.1 # via -r requirements/static/ci/windows.in -pymysql==1.0.2 +pymssql==2.2.7 # via # -c requirements/static/ci/../pkg/py3.12/windows.txt # -r requirements/windows.txt