[BUG] Data passed to highstate outputter is not a valid highstate return: {} when a child orchestration is not executed due requisites not satisfied
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
The following error is shown
2023-11-30 23:27:07,981 [salt.loaded.int.output.highstate:330 ][ERROR ][802069] Data passed to highstate outputter is not a valid highstate return: {}
when calling a "child" state.orch runner (other runners modules are ok) with salt.runner from an orchestration with
requisites like require, onchanges and onfail when the requisite is not satisfied, in other words this child orchestration is not executed
Examples:
- require on a state that the referred state failed
- onfail on a state that the referred state succeeded
- onchanges on a state that the referred state does not changed
Here you go a minimal orchestration to reproduce the error
sample_state:
test.configurable_test_state:
- changes: False
- result: True
another_state:
salt.runner:
- name: state.orch
- mods: some_orch_state # This does not even need to be real, even a fake path like this produces the same error
- onfail:
- sample_state
The onfail can be replaced by require or onchanges and tweak sample_state result or changes accordingly to get the same error.
The code throwing this error seems to be here
https://github.com/saltstack/salt/blob/master/salt/output/highstate.py#L328C12-L333C19
Steps to Reproduce the behavior
Run the provided orchestration to get the error
Expected behavior
To my understanding, this should not be shown as an error.
Versions Report
3006
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at salt/output/highstate.py around lines 328-333 and run the minimal orchestration from the issue with an unsatisfied onfail, require, or onchanges requisite. Trace how the skipped child state.orch result reaches the highstate outputter; done means the valid orchestration result no longer emits the shown error when the child is not executed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100