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 for Temporal Sever v1.26.2 #2357

Merged
merged 12 commits into from
Jan 6, 2025

Conversation

Quinn-With-Two-Ns
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Dec 27, 2024

There was some changes in Temporal Sever v1.26.2. This PR updates the Java SDK tests and test server to handle the new behaviour

@Quinn-With-Two-Ns Quinn-With-Two-Ns changed the title Lower refreshNexusEndpointsMinWait Update Java SDK for Temporal Sever v1.26.2 Jan 6, 2025
@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review January 6, 2025 17:01
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner January 6, 2025 17:01
@@ -189,7 +189,14 @@ private TemporalFailure failureToExceptionImpl(Failure failure, DataConverter da
}
case FAILUREINFO_NOT_SET:
default:
throw new IllegalArgumentException("Failure info not set");
// All unknown types are considered to be retryable ApplicationError.
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 checked all other SDKs and the Java SDK was the only SDK that was throwing an exception here instead of converting to an application failure

@@ -58,17 +58,6 @@ public void syncOperationImmediatelyCancelled() {
"operation canceled before it was started", canceledFailure.getOriginalMessage());
}

@Test
public void syncOperationCancelled() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this test since the Server dropped support for cancelling failing sync operations

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Two minor non-blocking comments

Assert.assertEquals(
"operation terminated",
((ApplicationFailure) nexusFailure.getCause()).getOriginalMessage());
// TODO: Test server needs to be fixed to return the correct type
Copy link
Member

Choose a reason for hiding this comment

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

If this TODO is to be done separately, can we open an issue and reference it here?

@@ -86,6 +87,17 @@
import org.slf4j.LoggerFactory;

class TestWorkflowMutableStateImpl implements TestWorkflowMutableState {
static final Failure FAILED_UPDATE_ON_WF_COMPLETION =
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a test confirming that this at least looks mostly like the real server's version? Unsure if Java has tests against actual server and test server with the same code, but I just want to make sure if/when this changes server side we can catch it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I can do that

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 82d3c93 into temporalio:master Jan 6, 2025
8 checks passed
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.

2 participants