Skip to content
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

[FEATURE] Create Status API #22

Closed
owaiskazi19 opened this issue Sep 6, 2023 · 2 comments · Fixed by #148
Closed

[FEATURE] Create Status API #22

owaiskazi19 opened this issue Sep 6, 2023 · 2 comments · Fixed by #148
Assignees
Labels
enhancement New feature or request

Comments

@owaiskazi19
Copy link
Member

owaiskazi19 commented Sep 6, 2023

Is your feature request related to a problem?

Implement a GET API to fetch the status of the workflow setup. This API will be used to get information from the state index.

What solution would you like?

We will have a status api that by default just gives state, provisioning progress and error information
When _all=true it will return all the info back thats stored in the state and GC index.

GET _plugins/ai-flow/workflows/<workflowId>/_status
Response:

{
    "state": "FAILED",
    "error": "Some error message"
}
GET _plugins/ai-flow/workflows/<workflowId>/_status?_all=true
{
"state_id" : "3Dh6TXwBwf_U8gjURE0F"
"state": "RUNNING",
"error": "",
"provisioning_progress" : "IN_PROGRESS",
"provision_start_time": 1633399991933,
"provision_end_time": 163400401933,
"user": {
"name": "admin",
"backend_roles": [
"admin"
],
"roles": [
"own_index",
"all_access"
],
"custom_attribute_names": [],
"user_requested_tenant": "__user__"
}
"template": {
    "EVERYTHING IN THE USE CASE TEMPLATE"
}, //...Future fields:
{
 "ingest calls": 30,
 "search_calls": 3000,
 "search_failure_count": 0,
 "ingest_failure_count": 0,
  "last_update_time": {
      "type": "date",
      "format": "strict_date_time||epoch_millis"
    },
    "started_by": {
      "type": "keyword"
    },
    "stopped_by": {
      "type": "keyword"
    },
 }

Do you have any additional context?

This API would keep on evolving based on the requirement from frontend.

@owaiskazi19 owaiskazi19 added enhancement New feature or request untriaged labels Sep 6, 2023
@owaiskazi19 owaiskazi19 changed the title [FEATURE] Create a status API [FEATURE] Create Status API Sep 6, 2023
@owaiskazi19 owaiskazi19 self-assigned this Sep 6, 2023
@owaiskazi19
Copy link
Member Author

owaiskazi19 commented Nov 8, 2023

@amitgalitz will this API support status of each workflow step or just one status for the complete provisioning? Also, in the response we need to output resources_created, that's the only way user will get the response of the provisioning when the status is COMPLETED of the API.

@amitgalitz
Copy link
Member

@amitgalitz will this API support status of each workflow step or just one status for the complete provisioning? Also, in the response we need to output resources_created, that's the only way user will get the response of the provisioning when the status is COMPLETED of the API.

For first iteration I wont have each workflow step status, especially since these steps are so fast, I will have the error tho for exact step that failed. I can add the resources_created to the base response though here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants