Create execution and state developement guidelines (error handling, return values) #19797
Labels
Bug
broken, incorrect, or confusing behavior
Documentation
Relates to Salt documentation
P2
Priority 2
Pending-Discussion
The issue or pull request needs more discussion before it can be closed or merged
Platform
Relates to OS, containers, platform-based utilities like FS, system based apps
severity-low
4th level, cosemtic problems, work around exists
stale
Milestone
We've been having a difficult time coming to a proper agreement on how our execution modules should handle return values and exceptions. If we allow exceptions to propagate, then the state modules will catch the exceptions and display them in the failed states, which is really helpful, but it also means that when you call the execution module from another module, an undocumented and unknown exception will propogate there as well. In some modules we always return a tuple with the return value and an error message, so that there's a consistent return value and the message can still be propagated.
There's pros and cons for each approach, but if would be nice if there was upstream guidelines so that we can have a known consistent behavior across modules.
The text was updated successfully, but these errors were encountered: