Releases: temporalio/sdk-java
v1.18.0-RC1
Highlights
v1.18 release will bring a comprehensive rework of Local Activity Worker implementation
- Local Activities now respect all the timeouts set on
LocalActivityOptions. - Lower ScheduleToStart latencies for Local Activities and a backpressure that prefers retries over new executions
LocalActivityOptionsgotscheduleToStarttimeout
Migration note:
Previously Local Activity Workers didn't respect startToClose and, in some cases, scheduleToClose timeouts.
Some users may have LocalActivityOptions configurations that don't accommodate their actual timings but previously were unenforced.
The enforcement will kick in after an upgrade on v1.18+ and may lead to Local Activity failures that were not happening before.
Users may need to test and adjust their LocalActivityOptions timeouts before rolling out v1.18+ to production.
What's Changed
- Mass replay API by @Sushisource in #1497
- Add WorkflowInfo#getHistoryLength by @Spikhalskiy in #1498
- Use longer retry interval on RESOURCE_EXHAUSTED by @mjameswh in #1465
- Switch to the latest server in CI/CD by @Spikhalskiy in #1499
- Port a server fix for the last heartbeat time being defaulted to the activity started time by @Spikhalskiy in #1508
- Fix SignalDuringLastWorkflowTaskTest by @Spikhalskiy in #1515
- Revisit Activity Timeouts by @Spikhalskiy in #1514
- Add gatherRuntimeDeps task by @Spikhalskiy in #1517
- Test Environments now respect metricsScope passed in TestEnvironmentOptions and ServiceStubOptions by @Spikhalskiy in #1521
- Add sdk-features ci trigger by @Sushisource in #1520
- The test server now generates a unique taskToken per an activity attempt by @Spikhalskiy in #1524
- More activity timeout failure compliance tests and improvements by @Spikhalskiy in #1525
- Rework Local Activity scheduling by @Spikhalskiy in #1507
- Implement retries of local activities that break local retry threshold by @Spikhalskiy in #1542
- Add generated proto classes info into javadoc jar by @Spikhalskiy in #1534
- Add scheduleToStart timeout to Local Activities by @Spikhalskiy in #1560
- Open WorkflowExecutionHistory as a public class by @Spikhalskiy in #1566
- Fix binary compatibility broken by #1566 by @Spikhalskiy in #1571
- Update C# and Ruby namespace/package for test server protos by @cretz in #1572
- Remove usage of Workflow time from tracing spans by @Spikhalskiy in #1573
- Set heartbeat details for TestActivityEnvironment by @tylercunnion in #1581
- List workflow API by @Spikhalskiy in #1583
- Fail WFT if Local Activity execution experienced an Error by @Spikhalskiy in #1591
- Exposing an ability to fail WorkflowTask for any callback in executor code by @Spikhalskiy in #1589
- Release v1.18.0-RC1 by @Spikhalskiy in #1598
New Contributors
Full Changelog: v1.17.0...v1.18.0-RC1
v1.17.0
Highlights
This release brings a lot of performance improvements for high throughput scenarios.
Eager Activity Dispatch is added. This feature requires Temporal Server 1.19+ and is not effective on earlier releases.
What's Changed
- Port config of default Jackson timestamp deserialization to kotlin by @Spikhalskiy in #1388
- Align Test Server behavior with the real one if completion command is not the last by @Spikhalskiy in #1399
- Test Server doesn't reset sticky queue if timeout fired for an outdated workflow task by @Spikhalskiy in #1401
- Set larger maxInboundMetadataSize to accommodate unbounded Server error messages by @Spikhalskiy in #1397
- History iteration should never ever fail a workflow execution by @Spikhalskiy in #1404
- Fix guard clause to allow passing key and cert chain as strings by @yassineb in #1409
- Deprecate addWorkflowImplementationFactory and give a register* alternative with an expected contract by @Spikhalskiy in #1410
- Reduce threads churn by increasing pool timeouts by @Spikhalskiy in #1418
- Reduce contention on workflow cache by @Spikhalskiy in #1419
- Provide task queue kind in long polls for workflow tasks by @Spikhalskiy in #1420
- Rework workflow threads reporting from using blocking ThreadPoolExecutor#getActiveThreads by @Spikhalskiy in #1421
- Each worker now has its own sticky task queue by @Spikhalskiy in #1423
- Implement executor slots reservation for workflow tasks by @Spikhalskiy in #1431
- Reduce eagerly executed work needed to create an ActivityStub by @Spikhalskiy in #1434
- Rework some reflection out of Test Server to help Graal by @Spikhalskiy in #1435
- Optimize unneeded string concatenation by @Spikhalskiy in #1433
- Reduce deterministic runner lock reentrance by @Spikhalskiy in #1436
- Implement dynamic sticky queue polling based on the reported backlog by @Spikhalskiy in #1438
- Fix MTLS configuration in spring boot autoconfiguration by @yassineb in #1441
- Upgrade dependencies by @Spikhalskiy in #1446
- Add support for Eager Activity Dispatch by @mjameswh in #1439
- SDK doesn't allow a single WorkflowTask poller and forces the value to '2' if specified by @Spikhalskiy in #1451
- Fix leaking Eager Activity Reservation by @Spikhalskiy in #1452
- Refactor WorkflowWorker to put eager activity dispatch in the right place by @Spikhalskiy in #1453
- Rework WorkflowExecutorCache to remove a global lock by @Spikhalskiy in #1454
- Limit eager activity dispatch for one workflow task completion by @Spikhalskiy in #1455
- testing module now brings json-path as a transitive dependency by @Spikhalskiy in #1450
- Update API protos to 1.12 by @Spikhalskiy in #1461
- Release v1.17.0-RC1 by @Spikhalskiy in #1462
- Fix incorrect handling of -RC suffix in version by @mjameswh in #1466
- Add diagnostic output for flaky taskTimeoutWillRescheduleTheTaskOnTheGlobalList by @Spikhalskiy in #1468
- Cleanup WorkflowExecutorCache by @Spikhalskiy in #1478
- Don't use BackoffThrottler in multithread contexts by @mjameswh in #1467
- Dependency updates and spring-boot-starter pom fix for Maven by @Spikhalskiy in #1480
- Upgrade CI docker images from openjdk to eclipse-temurin by @Spikhalskiy in #1492
- Pre-release cleanup by @Spikhalskiy in #1495
- Release v1.17.0 by @Spikhalskiy in #1496
New Contributors
Full Changelog: v1.16.0...v1.17.0
v1.17.0-RC1
Highlights
This release brings performance improvements for high throughput scenarios.
What's Changed
- Port config of default Jackson timestamp deserialization to kotlin by @Spikhalskiy in #1388
- Align Test Server behavior with the real one if completion command is not the last by @Spikhalskiy in #1399
- Test Server doesn't reset sticky queue if timeout fired for an outdated workflow task by @Spikhalskiy in #1401
- Set larger maxInboundMetadataSize to accommodate unbounded Server error messages by @Spikhalskiy in #1397
- History iteration should never ever fail a workflow execution by @Spikhalskiy in #1404
- Fix guard clause to allow passing key and cert chain as strings by @yassineb in #1409
- Deprecate addWorkflowImplementationFactory and give a register* alternative with an expected contract by @Spikhalskiy in #1410
- Reduce threads churn by increasing pool timeouts by @Spikhalskiy in #1418
- Reduce contention on workflow cache by @Spikhalskiy in #1419
- Provide task queue kind in long polls for workflow tasks by @Spikhalskiy in #1420
- Rework workflow threads reporting from using blocking ThreadPoolExecutor#getActiveThreads by @Spikhalskiy in #1421
- Each worker now has its own sticky task queue by @Spikhalskiy in #1423
- Implement executor slots reservation for workflow tasks by @Spikhalskiy in #1431
- Reduce eagerly executed work needed to create an ActivityStub by @Spikhalskiy in #1434
- Rework some reflection out of Test Server to help Graal by @Spikhalskiy in #1435
- Optimize unneeded string concatenation by @Spikhalskiy in #1433
- Reduce deterministic runner lock reentrance by @Spikhalskiy in #1436
- Implement dynamic sticky queue polling based on the reported backlog by @Spikhalskiy in #1438
- Fix MTLS configuration in spring boot autoconfiguration by @yassineb in #1441
- Add support for Eager Activity Dispatch by @mjameswh in #1439
- SDK doesn't allow a single WorkflowTask poller and forces the value to '2' if specified by @Spikhalskiy in #1451
- Fix leaking Eager Activity Reservation by @Spikhalskiy in #1452
- Refactor WorkflowWorker to put eager activity dispatch in the right place by @Spikhalskiy in #1453
- Rework WorkflowExecutorCache to remove a global lock by @Spikhalskiy in #1454
- Limit eager activity dispatch for one workflow task completion by @Spikhalskiy in #1455
- testing module now brings json-path as a transitive dependency by @Spikhalskiy in #1450
- Update API protos to 1.12 by @Spikhalskiy in #1461
New Contributors
Full Changelog: v1.16.0...v1.17.0-RC1
v1.16.0
Highlights
This release brings an experimental Spring Boot module. This is an alpha for a preview and feedback and there are no compatibility guarantees.
Fixes
- A rare case of a Query that is arriving to a Worker with an outdated meta-information is handled gracefully now (#1371)
What's Changed
- Port static and jacoco synthetic methods fix from Activity interfaces to Workflows interfaces by @Spikhalskiy in #1356
- Rework POJOWorkflowMetadata classes, add test coverage, use in Spring Boot by @Spikhalskiy in #1362
- Upgrade dependencies & code cleanup by @Spikhalskiy in #1355
- Additional Spring Boot wiring by @Spikhalskiy in #1363
- Add an ability to register custom DataConverter in Spring Boot Autoconfiguration by @Spikhalskiy in #1372
- Upgrade protoc for Apple Silicone builds by @Spikhalskiy in #1376
- Revisit Sprint Boot Readme by @Spikhalskiy in #1379
- Spring Boot Autoconfiguration doesn't require temporal-testing module to be in classpath anymore by @Spikhalskiy in #1380
- Refactor WorkflowContext classes by @Spikhalskiy in #1381
- Specify some standard Spring AutoConfiguration before Temporal ones explicitly by @Spikhalskiy in #1384
- Switch to using opentelemetry bom and Spring Boot upgrade by @Spikhalskiy in #1385
- Fix situation when direct query comes outdated (inconsistent) and applied to a more advanced cached workflow instance by @Spikhalskiy in #1375
- Release v1.16.0 by @Spikhalskiy in #1386
Full Changelog: v1.15.1...v1.16.0
v1.15.1
Highlights
This release fixes the native distribution of the test server. No changes for java users.
What's Changed
- Cleanup dead code by @Spikhalskiy in #1353
- Fix graal reflection config for new protobuf version by @Spikhalskiy in #1359
Full Changelog: v1.15.0...v1.15.1
v1.15.0
Highlights
This release brings PayloadCodec and Remote Data Converter capabilities to JavaSDK.
GlobalDataConverter got decoupled from DefaultDataConverter.
Fixes
- Stacktrace query responses are not encoded using a custom encoder anymore which makes them always decodable by the WebUI and tctl
- Upgraded grpc-java 1.48 and netty 4.1.77 come with a fix for grpc crash on Alpine: #1332 grpc/grpc-java#8751
Migration notes
Users which were specifying a Custom Converter globally will get some deprecation warnings to resolve,
which should be trivial like replacing DefaultDataConverter#setDefaultDataConverter with GlobalDataConverter#register
What's Changed
- Cleanup dead state machines code by @Spikhalskiy in #1302
- Add tests and javadocs for WorkflowStub#signal by @Spikhalskiy in #1292
- Make stacktrace query result to be serialized using standard data converter only by @Spikhalskiy in #1304
- Add initial Spring Boot implementation by @Spikhalskiy in #1305
- Fix javadoc for WorkflowReusePolicy stating an incorrect default by @Spikhalskiy in #1307
- Cleanup worker creation for Spring Boot Auto Configuration and add validation of the explicit worker config by @Spikhalskiy in #1308
- Switch from dependency version ranges to specific versions by @Spikhalskiy in #1314
- Implement fetching server capabilities before the first server call is made by @Spikhalskiy in #1313
- Refactor GrpcRetryer to enforce usage of GrpcRetryerOptions by @Spikhalskiy in #1316
- No retrying on INTERNAL gRPC errors with new Server versions by @Spikhalskiy in #1317
- Fix Test Server erroneously propagates some timeouts from the parent to the child workflow by @Spikhalskiy in #1320
- Separate Global DefaultDataConverter and Standard DataConverter notion by @Spikhalskiy in #1327
- Fix TestActivityEnvironmentInternal#close preventing subsequent usages of the class by @Spikhalskiy in #1329
- Upgrade Gradle, deps and cleanup duplicated outdated license files by @Spikhalskiy in #1340
- Upgrade Graal options by @Spikhalskiy in #1343
- Remote Data Converter & PayloadCodec by @Spikhalskiy in #1330
- Replays of workflow failures caused by queries don't spam worker logs anymore by @Spikhalskiy in #1351
- Add Jacoco code-coverage reports generation and aggregation by @Spikhalskiy in #1171
- Release v1.15.0 by @Spikhalskiy in #1352
Full Changelog: v1.14.0...v1.15.0
v1.14.0
Highlights
This release fixes a bug that may lead to workflows being stuck when sequential synchronous calls of local activities are present.
See #1262 for more details.
What's Changed
- Fix erroneous closing of workflow tasks instead of heartbeating in some edge cases by @Spikhalskiy in #1295
Full Changelog: v1.13.0...v1.14.0
v1.13.0
Highlights
The release focused on the resiliency of Workflow Workers.
Fixes:
- Version State Machine ignored a range check during replay if the history was unversioned
- Cancellation of child workflows didn't work in some edge cases
- Awaiting on child workflow start promise was not throwing exceptions if the start is not possible leading to stuck workflows
- and more
What's Changed
- Test Server responds NOT_FOUND if the activity is in incorrect state by @Spikhalskiy in #1228
- Add WorkerInterceptorBase and improve WorkerInterceptor docs to help new users of interceptors by @Spikhalskiy in #1231
- Fix Version State Machine ignoring range check during replay if the history was unversioned by @Spikhalskiy in #1240
- Fix WorkflowStub.getResultAsync leading to unbalanced time locking in test environment by @Spikhalskiy in #1244
- Make Temporal standard non-retryable gRPC codes not configurable by @Spikhalskiy in #1247
- Improve io.temporal.internal.worker package structure and worker shutdown by @Spikhalskiy in #1253
- Fix sticky poller using unique id from the sticky queue as a workerIdentity by @Spikhalskiy in #1254
- Make DeterministicRunner#close always block until the closing is done by @Spikhalskiy in #1255
- Simplify code and error handling between ActivityWorker and LocalActivityWorker by @Spikhalskiy in #1263
- Cleanup never used confusing ActivityTaskHandler#Result#requestRetryOptions by @Spikhalskiy in #1264
- Invalidate cached workflow state if worker fails to send the result to the server by @Spikhalskiy in #1265
- Throw if the server workflow progress is below the progress known to the Workflow Worker by @Spikhalskiy in #1267
- Guard against applying new events to workflow state machines if there is a gap by @Spikhalskiy in #1268
- Fix state machines NullPointerException during one of the modes of child workflow cancellation by @Spikhalskiy in #1269
- Fix build on aarch64 (M1) by @AndreevDm in #1274
- Add toString method to ActivityInfo and WorkflowInfo by @AndreevDm in #1275
- Fix child workflow execution start promise not throwing exceptions by @Spikhalskiy in #1271
- Rework LocalActivities waiting code to use nanoseconds by @Spikhalskiy in #1277
- Add log waring if workflow eviction / closure is taking too long time to close by @Spikhalskiy in #1282
- Fix test server publishing the Completion of child workflows before the Start sometimes by @Spikhalskiy in #1289
New Contributors
- @AndreevDm made their first contribution in #1274
Full Changelog: v1.12.0...v1.13.0
v1.12.0
Highlights
This release mostly contains changes and fixes for the WorkflowClient and WorkflowStub behavior.
Fixes
sticky_cache_sizemetric behavior, stale value may be observed before- Fixed a problem with test server not respecting disabled time skipping introduced in 1.9.0
- SDK doesn't log exceptions internally that are getting propagated to the user code anymore
- The behavior of
Workflow#getResult,WorkflowStub#cancelandWorkflowStub#terminategot aligned with their contract for exceptions
What's Changed
- Add documentation to ManualActivityCompletionClient, fix absent service call retries by @Spikhalskiy in #1181
- Polish ConnectedWorkflowServiceStubs method by @GreyTeardrop in #1186
- Fix workflow_active_thread_count, abstract WorkflowThreadExecutor instead of using a broad thread pool by @Spikhalskiy in #1185
- Fix absent request level metrics not logging with incorrectly implemented custom grpc interceptor by @Spikhalskiy in #1188
- Align Test Server direct query behavior with the real server by @Spikhalskiy in #1191
- Local Activity uses Server time and elapsed period to update workflow task timestamp by @Spikhalskiy in #1196
- Make signalWithStart set search attributes if it starts a new execution by @Spikhalskiy in #1199
- Rework async long poll to use the same configuration as the main long poll by @Spikhalskiy in #1204
- Fix Test Server throwing on queries without a deadline by @Spikhalskiy in #1207
- Fix test server with disabled time skipping mode by @Spikhalskiy in #1210
- Make getResult methods to throw TimeoutException instead of raw gRPC DEADLINE_EXCEEDED by @Spikhalskiy in #1209
- Add unit test verifying behavior of finishing Activity with CancellationType=ABANDON if it was canceled by the workflow by @Spikhalskiy in #1217
- Implement firstExecutionRunId attribute in TestServer by @Spikhalskiy in #1225
- Fix WorkflowStub#cancel and WorkflowStub#terminate exceptions contract by @Spikhalskiy in #1218
- Deescalate GrpcRetryer logging to trace level by @Spikhalskiy in #1227
Full Changelog: v1.11.0...v1.12.0
v1.11.0
Highlights
This release changes the default preferred behavior of WorkflowServiceStubs from eager connectivity and throwing error if the Temporal Server is not available to a lazy connectivity on the first request. See migration notes.
Fixes
- sticky_cache_size was updating only during forced evictions
- test service stubs were time-sensitive to time skipping that may require long execution of application code and were throwing DEADLINE_EXCEEDED
- OpenTracing was logging forced thread evictions from the cache as errors
Migration notes
WorkflowServiceStubs#newInstance, WorkflowServiceStubsOptions.Builder#setDisableHealthCheck,
WorkflowServiceStubsOptions.Builder#setHealthCheckAttemptTimeout and WorkflowServiceStubsOptions.Builder#setHealthCheckTimeout
are deprecated.
- The new preferred default is
WorkflowServiceStubs#newServiceStubs. - Switch to
WorkflowServiceStubs#newServiceStubsif you were disabling health check on the client start previously. - Switch to
WorkflowServiceStubs#newConnectedServiceStubsif you prefer an explicit health check call on client creation. Pass your oldWorkflowServiceStubsOptions.Builder#setHealthCheckTimeoutas atimeoutparameter value to this method (nullsupported for default).
What's Changed
- Add trivial describeNamespace test server implementation by @Spikhalskiy in #1160
- Fix sticky_cache_size gauge behavior by @Spikhalskiy in #1159
- Add TestEnvironmentOptions#registerSearchAttribute by @Spikhalskiy in #1161
- Evictions are not logged as errors in opentracing anymore by @Spikhalskiy in #1164
- Rework #setChannelInitializer method for easier access, remove old deprecated classes and methods by @Spikhalskiy in #1170
- Add a clear message to signal user mistake if newWorkflowThread is overridden to null by @Spikhalskiy in #1173
- Fix test service stubs throwing DEADLINE_EXCEEDED by @Spikhalskiy in #1174
- Improve illegal custom interceptors error reporting by @Spikhalskiy in #1175
- Unify the limit on gRPC incoming message across SDKs to 128Mb by @Spikhalskiy in #1176
- Explicit methods for lazy and eager connecting client, new #healthCheck method on stubs by @Spikhalskiy in #1168
- Improve javadocs around interceptors by @Spikhalskiy in #1180
Full Changelog: v1.10.0...v1.11.0