Skip to content

Commit 994984c

Browse files
Use released Nexus SDK
1 parent 750f3a2 commit 994984c

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ plugins {
2222

2323
allprojects {
2424
repositories {
25-
mavenLocal()
2625
mavenCentral()
2726
}
2827
}
@@ -31,7 +30,7 @@ ext {
3130
// Platforms
3231
grpcVersion = '1.75.0' // [1.38.0,) Needed for io.grpc.protobuf.services.HealthStatusManager
3332
jacksonVersion = '2.15.4' // [2.9.0,)
34-
nexusVersion = '0.5.0-SNAPSHOT'
33+
nexusVersion = '0.5.0-alpha'
3534
// we don't upgrade to 1.10.x because it requires kotlin 1.6. Users may use 1.10.x in their environments though.
3635
micrometerVersion = project.hasProperty("edgeDepsTest") ? '1.13.6' : '1.9.9' // [1.0.0,)
3736

temporal-sdk/src/main/java/io/temporal/internal/common/NexusUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ public static io.temporal.api.failure.v1.Failure nexusFailureToTemporalFailure(
108108

109109
// Ensure these always get written
110110
apiFailure.setMessage(failureInfo.getMessage());
111+
if (failureInfo.getStackTrace() != null && !failureInfo.getStackTrace().isEmpty()) {
112+
apiFailure.setStackTrace(failureInfo.getStackTrace());
113+
}
111114

112115
return apiFailure.build();
113116
}

temporal-sdk/src/test/java/io/temporal/workflow/nexus/OperationFailMetricTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,18 +612,18 @@ public OperationHandler<String, String> operation() {
612612
(ctx, details, operation) -> {
613613
invocationCount.put(operation, invocationCount.getOrDefault(operation, 0) + 1);
614614
if (invocationCount.get(operation) > 1) {
615-
throw OperationException.failure(new RuntimeException("exceeded invocation count"));
615+
throw OperationException.failed(new RuntimeException("exceeded invocation count"));
616616
}
617617
switch (operation) {
618618
case "success":
619619
return operation;
620620
case "fail":
621-
throw OperationException.failure(new RuntimeException("intentional failure"));
621+
throw OperationException.failed(new RuntimeException("intentional failure"));
622622
case "fail-app":
623-
throw OperationException.failure(
623+
throw OperationException.failed(
624624
ApplicationFailure.newFailure("intentional failure", "TestFailure", "foo"));
625625
case "fail-msg-app":
626-
throw OperationException.failure(
626+
throw OperationException.failed(
627627
"failure message",
628628
ApplicationFailure.newFailure("intentional failure", "TestFailure", "foo"));
629629
case "cancel":

temporal-sdk/src/test/java/io/temporal/workflow/nexus/SyncOperationFailTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public OperationHandler<String, String> operation() {
133133
// Implemented inline
134134
return OperationHandler.sync(
135135
(ctx, details, name) -> {
136-
throw OperationException.failure("failed to call operation");
136+
throw OperationException.failed("failed to call operation");
137137
});
138138
}
139139
}

0 commit comments

Comments
 (0)