-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Fix #30971: Handle requisites correctly for empty SLS files #68534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3006.x
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this comment.
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?
|
Changelog |
| if isinstance(low_data["check_cmd"], str): | ||
| low_data["check_cmd"] = [low_data["check_cmd"]] |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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.
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.
Fixes #30971