From 2091ca1fb7e281acb5027b6d373a9a8a84a95502 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:33:51 -0400 Subject: [PATCH 1/6] Bump org.mockito:mockito-core from 5.8.0 to 5.11.0 (#594) Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.8.0 to 5.11.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.8.0...v5.11.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- core/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/build.gradle b/core/build.gradle index f9c30129..b8706023 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -37,7 +37,7 @@ dependencies { implementation 'com.codingrodent:jackson-json-crypto:1.1.0' testImplementation "junit:junit:4.13.2" - testImplementation "org.mockito:mockito-core:5.8.0" + testImplementation "org.mockito:mockito-core:5.11.0" testImplementation(platform("org.junit:junit-bom:5.10.2")) testImplementation "org.junit.jupiter:junit-jupiter-api" From 27f84a6a4586226a459141654517a8f08f7e4038 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:35:09 -0400 Subject: [PATCH 2/6] Bump ch.qos.logback:logback-classic from 1.5.0 to 1.5.3 (#600) Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.0 to 1.5.3. - [Commits](https://github.com/qos-ch/logback/compare/v_1.5.0...v_1.5.3) --- updated-dependencies: - dependency-name: ch.qos.logback:logback-classic dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- core/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/build.gradle b/core/build.gradle index b8706023..64d5d363 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -11,7 +11,7 @@ dependencies { implementation "io.micrometer:micrometer-registry-prometheus" - implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.0' + implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.3' implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.9.0' implementation(platform("io.opentelemetry:opentelemetry-bom:$otelVersion")) From 854ece33e3f65f8772026312f613f2f7d4f9cf23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:35:30 -0400 Subject: [PATCH 3/6] Bump com.fasterxml.jackson:jackson-bom from 2.16.1 to 2.17.0 (#601) Bumps [com.fasterxml.jackson:jackson-bom](https://github.com/FasterXML/jackson-bom) from 2.16.1 to 2.17.0. - [Commits](https://github.com/FasterXML/jackson-bom/compare/jackson-bom-2.16.1...jackson-bom-2.17.0) --- updated-dependencies: - dependency-name: com.fasterxml.jackson:jackson-bom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- core/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/build.gradle b/core/build.gradle index 64d5d363..9a584b65 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -5,7 +5,7 @@ dependencies { testImplementation("io.temporal:temporal-testing:$javaSDKVersion") // Needed for SDK related functionality - implementation(platform("com.fasterxml.jackson:jackson-bom:2.16.1")) + implementation(platform("com.fasterxml.jackson:jackson-bom:2.17.0")) implementation "com.fasterxml.jackson.core:jackson-databind" implementation "com.fasterxml.jackson.core:jackson-core" From 4058f18e499d01c0a0c9377520133ee58ae17019 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:35:52 -0400 Subject: [PATCH 4/6] Bump com.google.errorprone:error_prone_core from 2.25.0 to 2.26.1 (#602) Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.25.0 to 2.26.1. - [Release notes](https://github.com/google/error-prone/releases) - [Commits](https://github.com/google/error-prone/compare/v2.25.0...v2.26.1) --- updated-dependencies: - dependency-name: com.google.errorprone:error_prone_core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- core/build.gradle | 2 +- springboot-basic/build.gradle | 4 ++-- springboot/build.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 9a584b65..68c005aa 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -46,7 +46,7 @@ dependencies { dependencies { errorproneJavac('com.google.errorprone:javac:9+181-r4173-1') - errorprone('com.google.errorprone:error_prone_core:2.25.0') + errorprone('com.google.errorprone:error_prone_core:2.26.1') } } diff --git a/springboot-basic/build.gradle b/springboot-basic/build.gradle index 6a2c9c95..42b8637a 100644 --- a/springboot-basic/build.gradle +++ b/springboot-basic/build.gradle @@ -10,9 +10,9 @@ dependencies { dependencies { errorproneJavac('com.google.errorprone:javac:9+181-r4173-1') if (JavaVersion.current().isJava11Compatible()) { - errorprone('com.google.errorprone:error_prone_core:2.25.0') + errorprone('com.google.errorprone:error_prone_core:2.26.1') } else { - errorprone('com.google.errorprone:error_prone_core:2.25.0') + errorprone('com.google.errorprone:error_prone_core:2.26.1') } } } diff --git a/springboot/build.gradle b/springboot/build.gradle index d9939248..7ae490ca 100644 --- a/springboot/build.gradle +++ b/springboot/build.gradle @@ -16,7 +16,7 @@ dependencies { testImplementation "org.springframework.boot:spring-boot-starter-test" dependencies { errorproneJavac('com.google.errorprone:javac:9+181-r4173-1') - errorprone('com.google.errorprone:error_prone_core:2.25.0') + errorprone('com.google.errorprone:error_prone_core:2.26.1') } } From 2964133f7b8171db0ea1ce9704ccc2e6f04e331a Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Wed, 3 Apr 2024 10:32:34 -0400 Subject: [PATCH 5/6] update sdk version to 1.23.1 (#608) Signed-off-by: Tihomir Surdilovic --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 16e719fd..a31abc5a 100644 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,7 @@ subprojects { ext { otelVersion = '1.30.1' otelVersionAlpha = "${otelVersion}-alpha" - javaSDKVersion = '1.23.0' + javaSDKVersion = '1.23.1' camelVersion = '3.22.1' jarVersion = '1.0.0' } From d069d2bf7d66b20644989a8422160cc51241c490 Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Wed, 3 Apr 2024 11:56:07 -0400 Subject: [PATCH 6/6] Add KeyWordList type to typed SA sample (#607) * Add KeyWordList type to typed SA sample Signed-off-by: Tihomir Surdilovic * formatting Signed-off-by: Tihomir Surdilovic --------- Signed-off-by: Tihomir Surdilovic --- .../hello/HelloTypedSearchAttributes.java | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/io/temporal/samples/hello/HelloTypedSearchAttributes.java b/core/src/main/java/io/temporal/samples/hello/HelloTypedSearchAttributes.java index 589778c1..df196d76 100644 --- a/core/src/main/java/io/temporal/samples/hello/HelloTypedSearchAttributes.java +++ b/core/src/main/java/io/temporal/samples/hello/HelloTypedSearchAttributes.java @@ -34,10 +34,24 @@ import java.time.Duration; import java.time.OffsetDateTime; import java.time.ZoneOffset; +import java.util.Arrays; +import java.util.List; +import java.util.StringJoiner; /** * Sample Temporal workflow that demonstrates setting up, updating, and retrieving workflow search * attributes using the typed search attributes API. + * + *

NOTE: you may need to add these custom search attributes yourself before running the sample. + * If you are using autosetup image for service, you will need to create the + * "CustomKeywordListField" search attribute with Temporal cli, for example: + * + *

temporal operator search-attribute create -name "CustomKeywordListField" -type "KeywordList" + * + *

If you run your test and don't have some custom SA defined that are used here you would see + * error like: INVALID_ARGUMENT: Namespace default has no mapping defined for search attribute + * CustomBoolField when trying to start the workflow execution. In that case use cli to add the + * needed search attribute with its needed type. */ public class HelloTypedSearchAttributes { @@ -50,6 +64,8 @@ public class HelloTypedSearchAttributes { // Define all our search attributes with appropriate types static final SearchAttributeKey CUSTOM_KEYWORD_SA = SearchAttributeKey.forKeyword("CustomKeywordField"); + static final SearchAttributeKey> CUSTOM_KEYWORD_LIST_SA = + SearchAttributeKey.forKeywordList("CustomKeywordListField"); static final SearchAttributeKey CUSTOM_LONG_SA = SearchAttributeKey.forLong("CustomIntField"); static final SearchAttributeKey CUSTOM_DOUBLE_SA = @@ -95,7 +111,7 @@ public interface GreetingWorkflow { @ActivityInterface public interface GreetingActivities { @ActivityMethod - String composeGreeting(String greeting, String name); + String composeGreeting(String greeting, List salutations, String name); } // Define the workflow implementation which implements our getGreeting workflow method. @@ -124,8 +140,9 @@ public String getGreeting(String name) { io.temporal.common.SearchAttributes searchAttributes = Workflow.getTypedSearchAttributes(); // Get a particular value out of the container using the typed key String greeting = searchAttributes.get(CUSTOM_KEYWORD_SA); + List salutations = searchAttributes.get(CUSTOM_KEYWORD_LIST_SA); // This is a blocking call that returns only after the activity has completed. - return activities.composeGreeting(greeting, name); + return activities.composeGreeting(greeting, salutations, name); } } @@ -135,8 +152,13 @@ public String getGreeting(String name) { */ static class GreetingActivitiesImpl implements GreetingActivities { @Override - public String composeGreeting(String greeting, String name) { - return greeting + " " + name + "!"; + public String composeGreeting(String greeting, List salutations, String name) { + StringJoiner greetingJoiner = new StringJoiner(" "); + greetingJoiner.add(greeting); + greetingJoiner.add(name); + salutations.forEach(s -> greetingJoiner.add(s)); + + return greetingJoiner.toString(); } } @@ -211,6 +233,7 @@ public static void main(String[] args) { private static io.temporal.common.SearchAttributes generateTypedSearchAttributes() { return io.temporal.common.SearchAttributes.newBuilder() .set(CUSTOM_KEYWORD_SA, "keyword") + .set(CUSTOM_KEYWORD_LIST_SA, Arrays.asList("how", "are", "you", "doing?")) .set(CUSTOM_LONG_SA, 1l) .set(CUSTOM_DOUBLE_SA, 0.1) .set(CUSTOM_BOOL_SA, true)