From b7d107ba539ba4d03e34b51debf618a95cd53387 Mon Sep 17 00:00:00 2001 From: Vladimir Gavrilenko Date: Thu, 15 Oct 2026 13:51:37 +0000 Subject: [PATCH] chore: bump cadence-client from 3.7.2 to 3.12.7 **Which sample(s) or area?** build, common **What changed?** Bumped `cadence-client` from 3.7.2 to 3.12.7 in `build.gradle`. Updated `WorkflowExecutionHistoryPrinter` to call `getHistory(...)` and pass the result to `prettyPrintHistory(Iterator, boolean)`, because the `prettyPrintHistory(IWorkflowService, String, WorkflowExecution, boolean)` overload was removed after 3.12.0. **Why?** Keep the samples on a current client release. The removed overload only called `getHistory(...)` and then `prettyPrintHistory(Iterator, boolean)`, so the replacement is the same two calls made explicitly. **How did you test it?** Build, on JDK 11 (the version CI uses): `./gradlew clean build` Manual test against a local Cadence server (SQLite): 1. Start the server, from a cadence checkout: `make bins install-schema-sqlite && ./cadence-server --zone sqlite start` 2. Register the domain, once the server is up: `./gradlew -q execute -PmainClass=com.uber.cadence.samples.common.RegisterDomain` 3. Run a sample: `./gradlew -q execute -PmainClass=com.uber.cadence.samples.hello.HelloActivity` Ran this way (same command, different class): HelloActivity, HelloActivityRetry, HelloAsync, HelloAsyncLambda, HelloAsyncActivityCompletion, HelloChild, HelloException, HelloQuery, HelloConsistentQuery, HelloSignal, HelloSideEffect, HelloLocalActivity, HelloSaga, HelloCancellation, HelloSearchAttributes and HelloDataConverter. All printed the expected output. HelloSignalAndResponse and HelloCancelChild did not exit on their own; they behave the same on 3.7.2. WorkflowExecutionHistoryPrinter (`--args=" "`) printed the history of a real workflow. Not run: HelloCron, HelloPeriodic, HelloMetric, HelloWorkerSetup, and the samples outside the hello package. **Potential risks** Dependency upgrade (3.7.2 -> 3.12.7); transitive dependency versions changed. WorkflowExecutionHistoryPrinter output now includes whatever fields the 3.12.7 history model has, so it differs from 3.7.2 in field order and in a few extra fields. **Release notes** N/A **Documentation Changes** N/A Signed-off-by: Vladimir Gavrilenko --- build.gradle | 2 +- .../samples/common/WorkflowExecutionHistoryPrinter.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d367cc2de..dc31b6e9f 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ repositories { dependencies { errorprone("com.google.errorprone:error_prone_core:2.23.0") - implementation group: 'com.uber.cadence', name: 'cadence-client', version: '3.7.2' + implementation group: 'com.uber.cadence', name: 'cadence-client', version: '3.12.7' implementation group: 'commons-configuration', name: 'commons-configuration', version: '1.9' implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3' implementation group: 'com.uber.m3', name: 'tally-core', version: '0.10.0' diff --git a/src/main/java/com/uber/cadence/samples/common/WorkflowExecutionHistoryPrinter.java b/src/main/java/com/uber/cadence/samples/common/WorkflowExecutionHistoryPrinter.java index af466d8d5..3a694268f 100644 --- a/src/main/java/com/uber/cadence/samples/common/WorkflowExecutionHistoryPrinter.java +++ b/src/main/java/com/uber/cadence/samples/common/WorkflowExecutionHistoryPrinter.java @@ -47,6 +47,7 @@ public static void main(String[] args) throws Exception { String runId = args[1]; workflowExecution.setRunId(runId); System.out.println( - WorkflowExecutionUtils.prettyPrintHistory(cadenceService, DOMAIN, workflowExecution, true)); + WorkflowExecutionUtils.prettyPrintHistory( + WorkflowExecutionUtils.getHistory(cadenceService, DOMAIN, workflowExecution), true)); } }