Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package salt for openSUSE:Factory checked in 
at 2026-10-28 17:45:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/salt (Old)
 and      /work/SRC/openSUSE:Factory/.salt.new.2252680 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "salt"

Wed Oct 28 17:45:11 2026 rev:208 rq:1393083 version:3006.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/salt/salt.changes        2026-09-18 
22:03:54.349973258 +0200
+++ /work/SRC/openSUSE:Factory/.salt.new.2252680/salt.changes   2026-10-28 
17:45:21.849091801 +0100
@@ -1,0 +2,14 @@
+Tue Oct 27 10:19:53 UTC 2026 - Marek Czernek <[email protected]>
+
+- Ignore network status when comparing docker networks
+- Fix Git state comment formatting
+- Fix surogateescape encoding typo in openscap module
+- Prevent schedule loss during master connection loss (bsc#1280583)
+
+- Added:
+  * fix-docker-tests-785.patch
+  * repair-git-state-comment-formatting-788.patch
+  * fix-surogateescape-typo-in-openscap-module-790.patch
+  * prevent-schedule-loss-when-minion-loses-master-conne.patch
+
+-------------------------------------------------------------------

New:
----
  fix-docker-tests-785.patch
  fix-surogateescape-typo-in-openscap-module-790.patch
  prevent-schedule-loss-when-minion-loses-master-conne.patch
  repair-git-state-comment-formatting-788.patch

----------(New B)----------
  New:- Added:
  * fix-docker-tests-785.patch
  * repair-git-state-comment-formatting-788.patch
  New:  * repair-git-state-comment-formatting-788.patch
  * fix-surogateescape-typo-in-openscap-module-790.patch
  * prevent-schedule-loss-when-minion-loses-master-conne.patch
  New:  * fix-surogateescape-typo-in-openscap-module-790.patch
  * prevent-schedule-loss-when-minion-loses-master-conne.patch
  New:  * fix-docker-tests-785.patch
  * repair-git-state-comment-formatting-788.patch
  * fix-surogateescape-typo-in-openscap-module-790.patch
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ salt.spec ++++++
--- /var/tmp/diff_new_pack.lkzKn7/_old  2026-10-28 17:45:26.346280036 +0100
+++ /var/tmp/diff_new_pack.lkzKn7/_new  2026-10-28 17:45:26.349280162 +0100
@@ -708,6 +708,18 @@
 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/786
 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/70231
 Patch229:       ignore-release-if-not-specified-in-the-pkg-state-bsc.patch
+# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/789
+# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/70579
+Patch230:       prevent-schedule-loss-when-minion-loses-master-conne.patch
+# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/790
+# PATCH-FIX_UPSTREAM: 
https://github.com/salt-extensions/saltext-openscap/pull/5
+Patch231:       fix-surogateescape-typo-in-openscap-module-790.patch
+# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/788
+# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/67945
+Patch232:       repair-git-state-comment-formatting-788.patch
+# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/785
+# PATCH-FIX_UPSTREAM: 
https://github.com/salt-extensions/saltext-dockermod/commit/7934f3d93b49882cf7465e4ee4272d54b3d4418d
+Patch233:       fix-docker-tests-785.patch
 
 ### IMPORTANT: The line below is used as a snippet marker. Do not touch it.
 ### SALT PATCHES LIST END

++++++ _lastrevision ++++++
--- /var/tmp/diff_new_pack.lkzKn7/_old  2026-10-28 17:45:26.511286943 +0100
+++ /var/tmp/diff_new_pack.lkzKn7/_new  2026-10-28 17:45:26.514287069 +0100
@@ -1,3 +1,3 @@
-9b98eebfdd0590dc79d69842e3f70703657eed38
+de49fdb73b7ed680ad0304e09c95c78997d8deab
 (No newline at EOF)
 

++++++ fix-docker-tests-785.patch ++++++
>From 2e6c28b26ab77f003026f63ac983db9da54da9f5 Mon Sep 17 00:00:00 2001
From: Marek Czernek <[email protected]>
Date: Tue, 27 Oct 2026 10:36:33 +0100
Subject: [PATCH] Fix docker tests (#785)

---
 salt/states/docker_network.py                          | 2 +-
 tests/pytests/functional/states/test_docker_network.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/salt/states/docker_network.py b/salt/states/docker_network.py
index 38e9027a1a..ace1481a8d 100644
--- a/salt/states/docker_network.py
+++ b/salt/states/docker_network.py
@@ -718,7 +718,7 @@ def present(
                 network["IPAM"]["Config"] = []
 
             changes = __salt__["docker.compare_networks"](
-                network, temp_net_info, ignore="Name,Id,Created,Containers"
+                network, temp_net_info, 
ignore="Name,Id,Created,Containers,Status"
             )
 
             if not changes:
diff --git a/tests/pytests/functional/states/test_docker_network.py 
b/tests/pytests/functional/states/test_docker_network.py
index 19868d03ad..5b652d85ec 100644
--- a/tests/pytests/functional/states/test_docker_network.py
+++ b/tests/pytests/functional/states/test_docker_network.py
@@ -427,6 +427,7 @@ def test_bridge_dupname_update(network, docker, 
docker_network):
         ret = docker_network.present(
             name=net.name,
             subnet=net.subnet,
+            gateway=net.gateway,
             driver="bridge",
             driver_opts=[{"com.docker.network.bridge.name": net.name[-8:]}],
         )
@@ -435,6 +436,7 @@ def test_bridge_dupname_update(network, docker, 
docker_network):
         ret = docker_network.present(
             name=net.name,
             subnet=net.subnet,
+            gateway=net.gateway,
             driver="bridge",
             driver_opts=[{"com.docker.network.bridge.name": net.name[-8:]}],
         )
-- 
2.56.0


++++++ fix-surogateescape-typo-in-openscap-module-790.patch ++++++
>From 7f36a33548e242684a7dd4b2ba09d87f71f6df9e Mon Sep 17 00:00:00 2001
From: Marek Czernek <[email protected]>
Date: Tue, 27 Oct 2026 10:33:51 +0100
Subject: [PATCH] Fix surogateescape typo in openscap module (#790)

---
 salt/modules/openscap.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/salt/modules/openscap.py b/salt/modules/openscap.py
index 7322c667dc..926c98db9e 100644
--- a/salt/modules/openscap.py
+++ b/salt/modules/openscap.py
@@ -153,7 +153,7 @@ def xccdf_eval(xccdffile, ovalfiles=None, **kwargs):
         tempdir = tempfile.mkdtemp()
         proc = Popen(cmd_opts, stdout=PIPE, stderr=PIPE, cwd=tempdir)
         (_, error) = proc.communicate()
-        error = error.decode('utf-8', errors='surogateescape')
+        error = error.decode('utf-8', errors='surrogateescape')
         success = _OSCAP_EXIT_CODES_MAP.get(proc.returncode, False)
         if proc.returncode < 0:
             error += "\nKilled by signal {}\n".format(proc.returncode)
@@ -205,7 +205,7 @@ def xccdf(params):
         tempdir = tempfile.mkdtemp()
         proc = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE, cwd=tempdir)
         (_, error) = proc.communicate()
-        error = error.decode('utf-8', errors='surogateescape')
+        error = error.decode('utf-8', errors='surrogateescape')
         success = _OSCAP_EXIT_CODES_MAP.get(proc.returncode, False)
         if proc.returncode < 0:
             error += "\nKilled by signal {}\n".format(proc.returncode)
-- 
2.56.0


++++++ prevent-schedule-loss-when-minion-loses-master-conne.patch ++++++
>From 90592151c20d20b49d5d3934d6a770ff4db5e906 Mon Sep 17 00:00:00 2001
From: Marek Czernek <[email protected]>
Date: Tue, 27 Oct 2026 10:33:11 +0100
Subject: [PATCH] Prevent schedule loss when minion loses master connection
 (#789)

---
 salt/minion.py                    |  2 -
 tests/pytests/unit/test_minion.py | 85 +++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 2 deletions(-)

diff --git a/salt/minion.py b/salt/minion.py
index 805e893341..731f02c48e 100644
--- a/salt/minion.py
+++ b/salt/minion.py
@@ -2809,8 +2809,6 @@ class Minion(MinionBase):
                         self.opts, io_loop=self.io_loop
                     )
 
-                    # put the current schedule into the new loaders
-                    self.opts["schedule"] = self.schedule.option("schedule")
                     (
                         self.functions,
                         self.returners,
diff --git a/tests/pytests/unit/test_minion.py 
b/tests/pytests/unit/test_minion.py
index 2f2faa741d..da9eb32f7a 100644
--- a/tests/pytests/unit/test_minion.py
+++ b/tests/pytests/unit/test_minion.py
@@ -8,12 +8,14 @@ import tornado
 import tornado.gen
 import tornado.testing
 import salt.minion
+import salt.payload
 import salt.syspaths
 import salt.utils.crypt
 import salt.utils.event as event
 import salt.utils.jid
 import salt.utils.platform
 import salt.utils.process
+import salt.utils.stringutils
 from salt._compat import ipaddress
 from salt.exceptions import SaltClientError, SaltMasterUnresolvableError, 
SaltSystemExit
 from tests.support.mock import MagicMock, patch
@@ -752,6 +754,89 @@ def test_minion_manage_schedule(minion_opts):
                 del minion
 
 
+def test_minion_keeps_schedule_on_master_reconnect(minion_opts):
+    """
+    Tests that re-initialising the subsystems after reconnecting to a master
+    does not replace the in-memory schedule with the one seen by the loaders,
+    which can be stale or empty.
+    """
+    minion_opts["master_alive_interval"] = 0
+    with patch("salt.minion.Minion.ctx", MagicMock(return_value={})), patch(
+        "salt.minion.Minion.sync_connect_master",
+        MagicMock(side_effect=RuntimeError("stop execution")),
+    ), patch(
+        "salt.utils.process.SignalHandlingProcess.start",
+        MagicMock(return_value=True),
+    ), patch(
+        "salt.utils.process.SignalHandlingProcess.join",
+        MagicMock(return_value=True),
+    ):
+        io_loop = tornado.ioloop.IOLoop()
+        io_loop.make_current()
+
+        with patch("salt.utils.schedule.clean_proc_dir", 
MagicMock(return_value=None)):
+            try:
+                # the loaders see a stale (empty) schedule
+                mock_functions = {
+                    "test.ping": None,
+                    "config.merge": MagicMock(return_value={}),
+                }
+
+                minion = salt.minion.Minion(minion_opts, io_loop=io_loop)
+                minion.opts["schedule"] = {
+                    "__mine_interval": {
+                        "function": "mine.update",
+                        "minutes": 60,
+                        "jid_include": True,
+                        "maxrunning": 2,
+                        "return_job": False,
+                    },
+                    "test_job": {
+                        "function": "test.ping",
+                        "seconds": 3600,
+                    },
+                }
+                expected = copy.deepcopy(minion.opts["schedule"])
+                minion.schedule = salt.utils.schedule.Schedule(
+                    minion.opts,
+                    mock_functions,
+                    returners={},
+                    new_instance=True,
+                )
+                minion.ready = True
+                minion.connected = True
+
+                @tornado.gen.coroutine
+                def mock_eval_master(*args, **kwargs):
+                    minion.connected = True
+                    return minion.opts["master"], MagicMock()
+
+                package = salt.utils.stringutils.to_bytes(
+                    salt.minion.master_event(type="disconnected") + 
event.TAGEND
+                ) + salt.payload.dumps({"master": minion.opts["master"]})
+
+                mock_load_modules = MagicMock(
+                    return_value=(mock_functions, {}, {}, {})
+                )
+                with patch.object(minion, "eval_master", mock_eval_master), 
patch(
+                    "salt.channel.client.AsyncReqChannel.factory", MagicMock()
+                ), patch.object(
+                    minion, "_load_modules", mock_load_modules
+                ), patch.object(
+                    minion, "_fire_master_minion_start", MagicMock()
+                ):
+                    io_loop.run_sync(lambda: minion.handle_event(package))
+
+                assert minion.connected
+                mock_load_modules.assert_called_once()
+                assert minion.opts["schedule"] == expected
+                assert minion.schedule.opts["schedule"] == expected
+            finally:
+                del minion.schedule
+                minion.destroy()
+                del minion
+
+
 def test_minion_manage_beacons(minion_opts):
     """
     Tests that the manage_beacons will call the add function, adding
-- 
2.56.0


++++++ repair-git-state-comment-formatting-788.patch ++++++
>From 85c2b18fec5ff868e74a2c0d92af8e06dd778504 Mon Sep 17 00:00:00 2001
From: Georg <[email protected]>
Date: Tue, 27 Oct 2026 10:35:11 +0100
Subject: [PATCH] Repair Git state comment formatting (#788)

The _uptodate() function already invokes _format_comments() on the
comments passed, avoid duplicate invocations of _format_comments()
which caused the joined string result from being joined with dots a
second time, effectively placing a dot after every character in the
resulting comment output.

Also amend the test suite to cover these output conditions.


(cherry picked from commit bfdfb18ea135d425ed5f9c000ecc7c8a5544cd83)

Signed-off-by: Georg Pfuetzenreuter <[email protected]>
---
 changelog/67944.fixed.md             |  1 +
 salt/states/git.py                   | 10 ++++------
 tests/integration/states/test_git.py | 11 +++++++++++
 3 files changed, 16 insertions(+), 6 deletions(-)
 create mode 100644 changelog/67944.fixed.md

diff --git a/changelog/67944.fixed.md b/changelog/67944.fixed.md
new file mode 100644
index 0000000000..b25be2844f
--- /dev/null
+++ b/changelog/67944.fixed.md
@@ -0,0 +1 @@
+Repair Git state comment formatting
diff --git a/salt/states/git.py b/salt/states/git.py
index 0f3f977442..c56c6bdd55 100644
--- a/salt/states/git.py
+++ b/salt/states/git.py
@@ -953,9 +953,7 @@ def latest(
                         target,
                         force_reset,
                     )
-                    return _uptodate(
-                        ret, target, _format_comments(comments), local_changes
-                    )
+                    return _uptodate(ret, target, comments, local_changes)
 
             if (
                 remote_rev_type == "sha1"
@@ -1184,7 +1182,7 @@ def latest(
                             # user of the actions taken.
                             ret["comment"] = _format_comments(actions)
                             return ret
-                        return _uptodate(ret, target, 
_format_comments(actions))
+                        return _uptodate(ret, target, actions)
 
                 # The fetch_url for the desired remote does not match the
                 # specified URL (or the remote does not exist), so set the
@@ -1294,7 +1292,7 @@ def latest(
                         if not revs_match and not update_head and 
formatted_actions:
                             ret["comment"] = formatted_actions
                             return ret
-                        return _uptodate(ret, target, 
_format_comments(actions))
+                        return _uptodate(ret, target, actions)
 
                 if not upstream and desired_upstream:
                     upstream_action = "Tracking branch was set to {}".format(
@@ -1692,7 +1690,7 @@ def latest(
             ret["comment"] = _format_comments(comments)
             ret["changes"]["revision"] = {"old": local_rev, "new": new_rev}
         else:
-            return _uptodate(ret, target, _format_comments(comments))
+            return _uptodate(ret, target, comments)
     else:
         if os.path.isdir(target):
             target_contents = os.listdir(target)
diff --git a/tests/integration/states/test_git.py 
b/tests/integration/states/test_git.py
index dba4340dab..fc9fa6fc1a 100644
--- a/tests/integration/states/test_git.py
+++ b/tests/integration/states/test_git.py
@@ -295,6 +295,17 @@ class GitTest(ModuleCase, SaltReturnAssertsMixin):
             "git.latest", name=TEST_REPO, target=target, force_reset=True
         )
         self.assertSaltTrueReturn(ret)
+        ret = ret[next(iter(ret))]
+        # beginning of comment
+        self.assertEqual(
+            f"Repository {target} is up-to-date\n",
+            ret["comment"][0 : 26 + len(target)],
+        )
+        self.assertIn("Uncommitted changes were discarded.", ret["comment"])
+        # ending of comment
+        self.assertEqual(
+            "Repository was hard-reset to remote HEAD (bbefe81).", 
ret["comment"][-51:]
+        )
 
         # Make sure that we no longer have uncommitted changes
         self.assertFalse(self.run_function("git.diff", [target, "HEAD"]))
-- 
2.56.0

Reply via email to