-
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
Add timeout for each workflow steps #317
Conversation
Signed-off-by: Jackie Han <[email protected]>
Signed-off-by: Jackie Han <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice code, and I learned something! Two general comments:
- Let's use
TimeValue
rather thanString
as early as we can in parsing - Let's handle exceptions as early as we can in parsing
src/main/java/org/opensearch/flowframework/model/WorkflowStepValidator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/model/WorkflowStepValidator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/model/WorkflowStepValidator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/model/WorkflowStepValidator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
Thanks for the quick review! Yeah, I immediately regretted the decision not to handle exceptions in parsing right after I sent out this PR and closed my laptop. But since I had already closed my laptop, I wanted to wait until Tuesday to address this. I will send out a new revision soon to address it. :) |
I prefer to leave
|
Signed-off-by: Jackie Han <[email protected]>
src/main/java/org/opensearch/flowframework/model/WorkflowNode.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/WorkflowProcessSorter.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jackie Han <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a nit and few outstanding comments from prior review.
src/main/java/org/opensearch/flowframework/model/WorkflowStepValidator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jackie Han <[email protected]>
* read timeout from workflow-steps Signed-off-by: Jackie Han <[email protected]> * change indices name Signed-off-by: Jackie Han <[email protected]> * address comments Signed-off-by: Jackie Han <[email protected]> * address comment - parse timeout into TimeValue Signed-off-by: Jackie Han <[email protected]> * address minor comments Signed-off-by: Jackie Han <[email protected]> --------- Signed-off-by: Jackie Han <[email protected]> (cherry picked from commit 9fdf03c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Add timeout for each workflow steps (#317) * read timeout from workflow-steps * change indices name * address comments * address comment - parse timeout into TimeValue * address minor comments --------- (cherry picked from commit 9fdf03c) Signed-off-by: Jackie Han <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12/26 revision:
Change the system default
NODE_TIMEOUT_DEFAULT_VALUE
to10s
Removed all
10s
timeout values in the workflow-step.json file, only leaving the timeout field for those workflow steps that require an overwrite timeout value other than10s
.For example,
register_local_model
has default timeout value as 60s, anddeploy_model
has default timeout value as 15sDo try catch at where we read
workflow-step.json
file instead of passing it up.Add a new unit test case to cover all possible ways of how we parse
timeout
valueDescription
This pr does two things:
.plugins-ai-global-context
->.plugins-flow-framework-templates
.plugins-workflow-state
->.plugins-flow-framework-state
Issues Resolved
#249
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.