-
Notifications
You must be signed in to change notification settings - Fork 36
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
Replace all CompletableFutures with PlainActionFutures #419
Replace all CompletableFutures with PlainActionFutures #419
Conversation
@zane-neo mind taking a look. |
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! A few suggestions:
- We use the completed future for
WorkflowData.EMPTY
so often we should make it a constant (probalby in theWorkflowData
class - You can really streamline the
ProcessNode
collection of predecessor future values. The previous multi-step was only there to enable a varargs array forallOf()
. - Replace all
future.isDone()
with a test forfuture.getState()
matchingCOMPLETED
. - Double-check the exception handling everywhere you've replaced
join()
with eitherget()
oractionGet()
as it's different.
src/main/java/org/opensearch/flowframework/transport/ProvisionWorkflowTransportAction.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/transport/DeprovisionWorkflowTransportAction.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/DeleteModelGroupStep.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/workflow/DeleteAgentStepTests.java
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/workflow/DeleteAgentStepTests.java
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/workflow/DeleteConnectorStepTests.java
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/workflow/DeleteConnectorStepTests.java
Show resolved
Hide resolved
src/test/java/org/opensearch/flowframework/workflow/ProcessNodeTests.java
Show resolved
Hide resolved
a4b0f6e
to
2c9c4a4
Compare
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!
src/test/java/org/opensearch/flowframework/workflow/CreateConnectorStepTests.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/ProcessNode.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
2c9c4a4
to
1914a6b
Compare
Signed-off-by: Daniel Widdis <[email protected]>
1914a6b
to
107b495
Compare
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[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.
Changes LGTM
* Intial commit to remove CompletableFuture Signed-off-by: Owais Kazi <[email protected]> * Removed CompletableFuture from ProcessNode and tests Signed-off-by: Owais Kazi <[email protected]> * Removed CompletableFuture from create index and pipeline workflow steps Signed-off-by: Owais Kazi <[email protected]> * Passing tests Signed-off-by: Owais Kazi <[email protected]> * Addressed initial comments Signed-off-by: Owais Kazi <[email protected]> * Move log line Signed-off-by: Daniel Widdis <[email protected]> * Reenable multi-node tests Signed-off-by: Daniel Widdis <[email protected]> * Disable fail-fast Signed-off-by: Daniel Widdis <[email protected]> --------- Signed-off-by: Owais Kazi <[email protected]> Signed-off-by: Daniel Widdis <[email protected]> Co-authored-by: Daniel Widdis <[email protected]> (cherry picked from commit 92d9108) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#433) Replace all CompletableFutures with PlainActionFutures (#419) * Intial commit to remove CompletableFuture * Removed CompletableFuture from ProcessNode and tests * Removed CompletableFuture from create index and pipeline workflow steps * Passing tests * Addressed initial comments * Move log line * Reenable multi-node tests * Disable fail-fast --------- (cherry picked from commit 92d9108) Signed-off-by: Owais Kazi <[email protected]> Signed-off-by: Daniel Widdis <[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> Co-authored-by: Daniel Widdis <[email protected]>
Description
Replace all CompletableFutures with PlainActionFutures
Except
CompletableFuture.runAsync
Issues Resolved
Fixes #409
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.