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

Update Java SDK #705

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Update Java SDK #705

merged 4 commits into from
Dec 10, 2024

Conversation

stephanos
Copy link
Contributor

@stephanos stephanos commented Dec 6, 2024

What was changed

Updated Java SDK to pull in new Update-with-Start API.

updateResult =
WorkflowClient.executeUpdateWithStart(
workflow::returnInitResult,
UpdateOptions.<TxResult>newBuilder().build(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner implementation!

@@ -34,4 +36,10 @@ public WorkflowInboundCallsInterceptor interceptWorkflow(WorkflowInboundCallsInt
public ActivityInboundCallsInterceptor interceptActivity(ActivityInboundCallsInterceptor next) {
return new SimpleCountActivityInboundCallsInterceptor(next);
}

@Override
public NexusOperationInboundCallsInterceptor interceptNexusOperation(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "correct" solution is these samples should be SimpleCountWorkerInterceptor extends BaseWorkerInterceptor


public class SimpleCountWorkerInterceptor implements WorkerInterceptor {
public class SimpleCountWorkerInterceptor extends WorkerInterceptorBase {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To provide a base implementation for Nexus.

@stephanos stephanos marked this pull request as ready for review December 7, 2024 01:17
@stephanos stephanos requested review from tsurdilo, antmendoza and a team as code owners December 7, 2024 01:17
@@ -105,9 +105,8 @@ public void testUpdateIdempotency() {
.newWorkflowStub(
ClusterManagerWorkflow.class,
WorkflowOptions.newBuilder().setTaskQueue(testWorkflowRule.getTaskQueue()).build());
CompletableFuture<ClusterManagerWorkflow.ClusterManagerResult> result =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error for an unused variable 🤷

Copy link
Contributor

@steveandroulakis steveandroulakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early return client code updates look good

updateResult =
WorkflowClient.executeUpdateWithStart(
workflow::returnInitResult,
UpdateOptions.<TxResult>newBuilder().build(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner implementation!

@stephanos stephanos merged commit 69db545 into main Dec 10, 2024
8 checks passed
@stephanos stephanos deleted the new-uws-api branch December 10, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants