-
Notifications
You must be signed in to change notification settings - Fork 63
[FEATURE] Add option to provision synchronously #967
Description
Is your feature request related to a problem?
Presently, when provisioning a workflow (via either the provision API, create API with provision or param, the REST call returns immediately with a 200 (OK) response, but the caller must then poll the Workflow Status API to monitor the status of provisioning.
This asynchronous execution of provisioning was intentional to provide the ability for a front end to obtain status throughout provisioning, possibly including a progress bar or similar, and because some provisioning processes take longer than the expected time for a REST response.
However, there are some use cases where the user may be willing to wait for a completed response, and not have to poll. This would be particularly useful in cases similar to the ML Commons Remote Model deployment which provides such a synchronous API.
What solution would you like?
Add optional parameters to the create and provision work flow APIs to wait for the request to complete, with a timeout. Other OpenSearchAPIs use wait_for_completion and wait_for_completion_timeout so I'd suggest these names.
Alter the Provision Workflow Transport action, when this parameter is present, to wait to return until provisioning is complete (or the timeout).
What alternatives have you considered?
A separate wrapper API that does the retries internally.
Do you have any additional context?
This would be a much simpler approach for automation tools, that would not require them to code all the polling themselves.