-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Need to normalize salt-api responses #37043
Comments
@mchugh19 i think this is a sound idea to keep track of these issues here instead for salt-api :) ping @whiteinge just as a fyi |
Definitely agree. This has been a long-standing annoyance. Well summarized. The exit codes addition to Salt-core provide a good opportunity for us to surface this information in salt-api. Prior to that initiative the behavior is very CLI-centric, such as returning errors as strings. I an uncertain what the current state of support and documentation there is for these internal exit codes but as mentioned in one of the above-linked issues, it will be important to collaborate with the core team to get these into Salt's Python API and then salt-api. This issue should be considered blocked by #18510.
|
+1 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Calm it down stalebot, this is still a major issue and not resolved. |
Thank you for updating this issue. It is no longer marked as stale. |
The three checkboxes I mentioned above around exposing exit codes have been addressed (see #41356 for more info). That won't help the structural issues around Local/Runner/WheelClient differences or differences across all the modules in common formats or how errors are raised, however. |
Salt-api is very useful, but also in need of response normalization. This issue is partially tracked through a few different issues, and it would be helpful to keep progress in a single place. See: #20301 #18510 jenkinsci/saltstack-plugin#18 jenkinsci/saltstack-plugin#36
Here are some short examples demonstrating the problems:
Most state responses include a result key which contains the appropriate success status. So far so good
Other times the API does not include the necessary info at all:
CLI
API
This same issue occurs with the service execution module. Here is an example of a service failing to restart:
And some errors are in different structures
Or
The problem isn't just errors either. Commands like the manage.present runner respond with successful, but again completely different output, making parsing difficult.
Overall, the responses generated by salt-api are somewhat all over the board making for constant edge cases increasing complexity.
The text was updated successfully, but these errors were encountered: