Please be as specific as possible and give set-up details.
empty_declaration: {}
extend:
empty_declaration: {}
$ salt-call state.apply extend_fail saltenv=base
[ERROR ] An un-handled exception was caught by Salt's global exception handler:
StopIteration:
Traceback (most recent call last):
File "/opt/salt/salt-call", line 23, in <module>
sys.exit(salt_call())
File "/opt/salt/lib/python3.10/site-packages/salt/scripts.py", line 443, in salt_call
client.run()
File "/opt/salt/lib/python3.10/site-packages/salt/cli/call.py", line 50, in run
caller.run()
File "/opt/salt/lib/python3.10/site-packages/salt/cli/caller.py", line 95, in run
ret = self.call()
File "/opt/salt/lib/python3.10/site-packages/salt/cli/caller.py", line 202, in call
ret["return"] = self.minion.executors[fname](
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 159, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1245, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/executors/direct_call.py", line 10, in execute
return func(*args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 159, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1245, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/modules/state.py", line 833, in apply_
return sls(mods, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/modules/state.py", line 1479, in sls
ret = st_.state.call_high(high_, orchestration_jid)
File "/opt/salt/lib/python3.10/site-packages/salt/state.py", line 3493, in call_high
high, ext_errors = self.reconcile_extend(high)
File "/opt/salt/lib/python3.10/site-packages/salt/state.py", line 1731, in reconcile_extend
state_type = next(x for x in body if not x.startswith("__"))
StopIteration
Traceback (most recent call last):
File "/opt/salt/salt-call", line 23, in <module>
sys.exit(salt_call())
File "/opt/salt/lib/python3.10/site-packages/salt/scripts.py", line 443, in salt_call
client.run()
File "/opt/salt/lib/python3.10/site-packages/salt/cli/call.py", line 50, in run
caller.run()
File "/opt/salt/lib/python3.10/site-packages/salt/cli/caller.py", line 95, in run
ret = self.call()
File "/opt/salt/lib/python3.10/site-packages/salt/cli/caller.py", line 202, in call
ret["return"] = self.minion.executors[fname](
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 159, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1245, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/executors/direct_call.py", line 10, in execute
return func(*args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 159, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1245, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/modules/state.py", line 833, in apply_
return sls(mods, **kwargs)
File "/opt/salt/lib/python3.10/site-packages/salt/modules/state.py", line 1479, in sls
ret = st_.state.call_high(high_, orchestration_jid)
File "/opt/salt/lib/python3.10/site-packages/salt/state.py", line 3493, in call_high
high, ext_errors = self.reconcile_extend(high)
File "/opt/salt/lib/python3.10/site-packages/salt/state.py", line 1731, in reconcile_extend
state_type = next(x for x in body if not x.startswith("__"))
StopIteration
local:
Summary for local
-----------
Succeeded: 0
Failed: 0
-----------
Total states run: 0
Total run time: 0.000 ms
Description
An empty state declaration (e.g.
empty_declaration: {}) is legal, and is a no-op. Extending the state (viaextends) with a similarly empty body triggers aStopIterationin the state compiler.Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
extend_fail.sls:
State application:
Expected behavior
The above example compiles cleanly, and (expectedly) does nothing, i.e.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
This issue does not present in Salt 3002.x
git blame suggests that the regression was introduced in the following commit: 8ec0c32