-
Notifications
You must be signed in to change notification settings - Fork 37
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
[META] Create APIs to save and provision a workflow #49
Comments
|
Given provisioning could be expensive, should it return a task ID right away to track the progress, instead of a synchronous wait for the workflow ID to be returned? If I recall this is the plan for the orchestrate API as well. If provisioning is false, maybe we return with the doc ID right away |
Sure, this sounds like a better idea, ill go ahead and modify this.
I agree, returning the ID directly and then executing the provisioning process would benefit us in cases where the provisioning process would take some time. The user can then take that returned ID to query for the status, but it does raise the question of whether or not the taskID and the workflow ID would be the same. @owaiskazi19 WDYT |
If provisioning time is long enough to require for async execution which it might like you suggest, then I think its a good idea to have a task ID returned with an accompying get task API. We can also do something similar to ml-commons where they have an async param to allow for either async or sync training but that can be over engineering for P0. |
Should we maybe have a save API to seperate this since we are only really indexing here. Additionally should we also add a section for the API to save other information like UI metadata and status to a state index upon starting to execute |
I agree to returning a taskID asynchronously and then using the status API to track the provision workflow. We also need to keep in mind that we are building a framework to simply the complex setup for use cases. We don't want to make our setup complex in anyway. Moreover, this API can be built incrementally: It will be better to convert this as a META issue @joshpalis and also if you can add payload of the request and response phase wise would be great. |
@ohltyler is there any specific use case from the frontend side for the below API:
Can we use
to save the template and then invoke
to execute the workflow? |
@owaiskazi19 yes, I agree with the above, which also aligns with the updated proposal in this issue. This follows the conventions of AD & other plugins. |
Is it fine if we remove |
Yes, I'm onboard with that |
Here are the updated URIs based on discussion with @owaiskazi19:
This proposal will remove the following URI path : This API was meant to handle both saving and executing a use case template. As a result, from a user perspective, they will first have to save and then provision separately. I'll update this meta issue and then update the PR as well |
@joshpalis update API should be
|
@joshpalis wait what is the reasoning from changing from the last iteration to adding |
@ohltyler How about |
@ohltyler I have no strong opinions regarding the URI for the create API We can either do : Option 1 OR Option 2 OR Option 3 |
@joshpalis I would prefer option 3 for simplicity and for consistency with existing OpenSearch plugins. |
@joshpalis let's go with 3rd one |
Option 3 it is :) |
Am I too late to vote for option 3? |
|
Good point @austintlee |
Thanks for the suggestion @austintlee, I'll make this change |
Is your feature request related to a problem?
_Note : These API designs assumes that the
global context index
will automatically generate a document Id upon insert. This document Id will be passed back to the user to either update or execute the infrastructure provisioning process of a previously stored use case template. ThedocumentId
of theglobal context index
entry will be mapped to a corresponding entry thestatus
index (pending implementation), which the user can use to determine the status of the infrastructure provisioning process.Goals
POST
API to store a use case template. This API will accept a use case template, which will be indexed into the global context index and the generateddocumentId
will be returned to the user.PUT
API to update a stored use case template. This API will accept adocumentId
parameter and a use case template request body. ThedocumentId
will be returned.POST
API to execute a stored use case template's infrastructure provisioning process. This API will accept adocumentId
which will identify the stored use case template and return the samedocumentId
. ThisdocumentId
can then be used to query the status of the provisioning process.Example use case template
The following example use case template format may evolve, but represents the request body of the API :
Create / Update Workflow API
Creates and stores a use case template into the
global context
index, returns theworkflow_id
of the documentUpdates a stored use case template
Provision Workflow API
Executes the infrastructure provisioning process for the stored use case template
The text was updated successfully, but these errors were encountered: