Skip to content

Conversation

@dwoz
Copy link
Contributor

@dwoz dwoz commented Dec 14, 2025

Empty SLS files were not being tracked properly for requisite checking, causing 'requisite not found' errors. This fix ensures empty SLS files are processed and tracked correctly for requisite dependencies.

  • Added _processed_sls_files set to track processed SLS files
  • Track SLS files in compile_high_data even if they produce no chunks
  • Check _processed_sls_files when validating SLS requisites
  • Handle empty SLS requisites in call_chunk execution
  • Track SLS files in render_state and get_highstate
  • Added test case to test_require.py to verify the fix

Fixes #30971

Empty SLS files were not being tracked properly for requisite checking,
causing 'requisite not found' errors. This fix ensures empty SLS files
are processed and tracked correctly for requisite dependencies.

- Added _processed_sls_files set to track processed SLS files
- Track SLS files in compile_high_data even if they produce no chunks
- Check _processed_sls_files when validating SLS requisites
- Handle empty SLS requisites in call_chunk execution
- Track SLS files in render_state and get_highstate
- Added test case to test_require.py to verify the fix
from salt.serializers.msgpack import serialize as msgpack_serialize
from salt.template import compile_template, compile_template_str
from salt.utils.datastructures import DefaultOrderedDict, HashableOrderedDict
from salt.utils.odict import DefaultOrderedDict, HashableOrderedDict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right. Weren't all the usages intentionally moved out of odict to datastructures and odict deprecated?

@twangboy
Copy link
Contributor

Changelog

@twangboy twangboy added this to the Sulfur v3006.18 milestone Dec 16, 2025
Comment on lines -1234 to -1235
if isinstance(low_data["check_cmd"], str):
low_data["check_cmd"] = [low_data["check_cmd"]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it was inadvertently removed

# Track all SLS files that were processed, even if they produced no chunks
# This is needed to handle SLS files that produce no output but are still
# required by other states (Issue #30971)
processed_sls_files = set()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This processed_sls_files variable appears to be unused. It is added to below but I don't see where it is ever read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants