File make-sure-saltcacheloader-use-correct-fileclient-519.patch of Package salt

From cdd5edaa40233d83e3ed2eb61de3fbf70bc29dfb Mon Sep 17 00:00:00 2001
From: Witek Bedyk <wbedyk@suse.com>
Date: Thu, 19 May 2022 12:52:12 +0200
Subject: [PATCH] Make sure SaltCacheLoader use correct fileclient (#519)

Backported from https://github.com/saltstack/salt/pull/61895

Signed-off-by: Witek Bedyk <witold.bedyk@suse.com>
---
 salt/state.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/salt/state.py b/salt/state.py
index b759c8e0ee..2c785233c5 100644
--- a/salt/state.py
+++ b/salt/state.py
@@ -4061,6 +4061,9 @@ class BaseHighState:
             )
         else:
             try:
+                # Make sure SaltCacheLoader use correct fileclient
+                if context is None:
+                    context = {"fileclient": self.client}
                 state = compile_template(
                     fn_,
                     self.state.rend,
-- 
2.36.0


openSUSE Build Service is sponsored by