st2
st2 copied to clipboard
Add additional context to Inquiries
A user in Slack mentioned he would like to be able to store additional useful information that can help inform a response to an inquiry. The use case is that core.ask is used before applying a terraform plan - it would be nice if the user could get prompted with the output from terraform plan before they have to respond to the inquiry. Right now the only way to do this is to place the output into the datastore and then look it up in a notification workflow that responds to an inquiry trigger.
I still firmly believe that the ID and route are the only fields that should be in the inquiry trigger. It's more RBAC-friendly. But we could consider adding a field to the inquirer runner for storing useful context like this. Users can see this field after retrieving the full inquiry via the API, as they have to do today to see other fields like the schema.
Should also add an st2.get_inquiry or similar action, to make it easier to retrieve inquiry details.
I understand the RBAC concerns of passing arbitrary data to the trigger, however the essence of this issue is around the notification for the inquiry (for the use case provided above). To that end, having the data in the trigger would make it super simple to build an effective user notification without having to build out other actions/workflows. To that end, if there is anymore room for argument on this point, I am happy to be there :)
If however, the st2.get_inquiry action comes to life at the same time, that would be a workable solution.
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.
It would be helpful if there is a mock up of the desired behavior for reference.
any news about st2.get_inquiry action or similar way like api ?In my case i need it badly
@CaesarC https://api.stackstorm.com/api/v1/inquiries/#/inquiries_controller.get_one