Releases: temporalio/sdk-java
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_size
metric 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#cancel
andWorkflowStub#terminate
got 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#newServiceStubs
if you were disabling health check on the client start previously. - Switch to
WorkflowServiceStubs#newConnectedServiceStubs
if you prefer an explicit health check call on client creation. Pass your oldWorkflowServiceStubsOptions.Builder#setHealthCheckTimeout
as atimeout
parameter value to this method (null
supported 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
v1.10.0
Highlights
This release contains fixes for performance and stability issues
What's Changed
- Moved NO_COMPLETION counter reporting to handle all cases by @Spikhalskiy in #1149
- Refactor and cleanup "exception to failure" conversion code by @Spikhalskiy in #1148
- Make WorkflowThreadContext#destroy non-blocking and remove deadlock detector from the call by @Spikhalskiy in #1151
- Rework PotentialDeadlockException to don't override the original stacktrace by @Spikhalskiy in #1152
- Reimplemented WorkflowRunLockManager to fix design flaw with an unsafe unlock by @Spikhalskiy in #1147
- Fix for Worker#isSuspended not returning the correct state by @Spikhalskiy in #1155
Full Changelog: v1.9.1...v1.10.0
v1.9.1
Highlights
Test server not timing out workflow task in case of subsequent "unhandled command" failures anymore fixing the behavior introduced in Test Server 1.9.0 and Temporal Server 1.16
What's Changed
- Don't time out WFT in case of subsequent UNHANDLED_COMMAND failures by @Spikhalskiy in #1140
- Align Test Server describeWorkflowExecution message with Temporal Server by @Spikhalskiy in #1142
- Fix workflow thread name strategy to append a clear marker of truncation by @Spikhalskiy in #1144
- setMetricsScope is wired into test rules by @Spikhalskiy in #1143
- Release v1.9.1 by @Spikhalskiy in #1145
Full Changelog: v1.9.0...v1.9.1
v1.9.0
Highlights
This release is focused on providing new Search Attributes functionality:
- New
Workflow.getSearchAttribute(String)
,Workflow.getSearchAttributeValues(String)
,
Workflow.getSearchAttributes()
methods to get deserialized search attributes - Unit tests can register new search attributes on both Test Server and dockerized Temporal Server
- Unit tests can use Test Server to verify search attributes behavior and implementation.
Test server exposes new gRPC TestService providing time skipping API to be used in other SDKs.
An upgrade of Temporal Server and Temporal docker-compose to 1.16 is highly recommended to use the new Search Attribute APIs.
Fixes
- Edge case of "unexpected event WORKFLOW_TASK_COMPLETED" when querying a non-completed workflow evicted from sticky cache #1134
- Deadlock Detection may cause "Operation allowed only while eventLoop is running" in the workflow code #1127
- Protobuf version range that was making 1.8.x release hard to use with Maven
Migration notes
Previously unit tests setting search attributes were running using the test server without any setup. The test server previously didn't use search attributes at all. This release brings full support for search attributes in the test server and the attributes need to be registered now before they are used in unit tests (as with the real Temporal server).
See: TestWorkflowRule.Builder#registerSearchAttribute
, TestWorkflowExtension.Builder#registerSearchAttribute
, TestWorkflowEnvironment#registerSearchAttribute
.
What's Changed
- Improve operation resilience of prepare-release by @mmcshane in #1058
- Expose OrchestratorServiceStubs by @Spikhalskiy in #1057
- Code cleanup around Pollers by @Spikhalskiy in #1070
- Synchronize GrpcSyncRetryer and GrpcAsyncRetryer behavior, make non-final exceptions INFO level by @Spikhalskiy in #1065
- Implement Test Operator Service by @Spikhalskiy in #1071
- Fix flake with dockerized temporal when signal gets reordered with the first workflow task by @Spikhalskiy in #1075
- Fix comments for newUntypedExternalWorkflowStub by @tsurdilo in #1077
- Time Skipping Service by @Spikhalskiy in #1076
- Fix Search in Javadocs by @Spikhalskiy in #1078
- Fix for WorkerOptions Builder using maxConcurrentActivityExecutionSize for local activities in partial build() by @Spikhalskiy in #1082
- Exclude synthetic and static methods from Activity Interface Hierarchy by @Spikhalskiy in #1083
- Add support for UpsertSearchAttributes to describe in the test service by @nagl-stripe in #1090
- Improve context propagator javadocs by @Spikhalskiy in #1092
- Improve client WorkflowFailedException message with the reason by @Spikhalskiy in #1095
- Swallow "Subchannel shutdown" gRPC errors during worker shutdown by @Spikhalskiy in #1089
- Improve Poller's shutdown log message with a poll task class by @Spikhalskiy in #1108
- Tests verifying that getVersion inside a signal handler works correctly by @Spikhalskiy in #1121
- Test Server times out workflow task in case of workflow task failure after the second attempt by @Spikhalskiy in #1124
- Improve PotentialDeadlockException message with timestamps by @Spikhalskiy in #1122
- Fix "Operation allowed only while eventLoop is running" exception if deadlock is detected by @Spikhalskiy in #1127
- State Machines now don't try to handle already handled events a second time by @Spikhalskiy in #1134
- Deserialized Search Attributes API and full Test Server implementation for Search Attributes by @Spikhalskiy in #1067
Full Changelog: v1.8.1...v1.9.0
v1.8.1
Highlights:
- This is a bugfix release fixing the problem with published 1.8.0 artifacts and Maven
What's Changed
- Prep-release cleanup by @mmcshane in #1023
- Final prep release cleanup by @mmcshane in #1024
- Expose ActivityInfo#getCurrentAttemptScheduledTimestamp by @Spikhalskiy in #1026
- Improve Promise and io.temporal.workflow javadocs by @Spikhalskiy in #1029
- Unify worker pollers options naming between GoSDK and JavaSDK by @Spikhalskiy in #1031
- Switch to specific versions for dependencies with Platforms to make release Maven compatible by @Spikhalskiy in #1034
- Add publish-snapshot workflow by @mmcshane in #1040
- Add a trivial query test by @Spikhalskiy in #1038
- Use correct JsonPath config on history serialization by @Spikhalskiy in #1041
- Deps upgrade by @Spikhalskiy in #1052
- Allow OpenTracing interceptor to ignore certain exceptions by @tylercunnion in #1045
- Include more enums transformation into history json transformation by @Spikhalskiy in #1043
- Fix flaky ChildWorkflowCancellationTest by @Spikhalskiy in #1053
- Release v1.8.1 by @Spikhalskiy in #1054
New Contributors
- @tylercunnion made their first contribution in #1045
Full Changelog: v1.8.0...v1.8.1
v1.8.0
Highlights
- We now build test server into native executables!
WorkflowImplementationOptions.setLocalActivityOptions
has been added allowing specification of local activity options on workflow configuration.worker_task_slots_available
metric was added.- Some metrics were renamed for consistency across SDKs. Old metric names were deprecated, check
io.temporal.worker.MetricsType
for reference. - Maven release was reworked to include broad ranges of supported dependencies instead of strict versions.
What's Changed
- Expose turning off time skipping for WorkflowRule and WorkflowExtension by @tsurdilo in #967
- Remove "Resolved versions" dependencies resolution strategy during Nexus publishing by @Spikhalskiy in #965
- Fix WorkflowServiceStubsOptions#rpcRetryOptions wiring by @Spikhalskiy in #972
- Improve WorkflowServiceStubsOptions#setRpcTimeout javadoc by @Spikhalskiy in #973
- Make GraalVM exe generation part of the build by @mmcshane in #974
- Upgrade protobuf-java-util for CVE-2021-22569 by @h7kanna in #980
- Split out temporal-test-server module by @mmcshane in #978
- Provide configuration hooks extending usage of standard SDK configuration functionality by @Spikhalskiy in #984
- Synchronize activity metric names with Core and GoSDK, old names are deprecated by @Spikhalskiy in #985
- Fix a problem with LocalActivityWorker ignoring initial and maximum intervals by @Spikhalskiy in #990
- Remove deprecated name.remal.check-updates plugin by @Spikhalskiy in #992
- Add Jackson jdk8 support in JacksonJsonPayloadConverter by @tsurdilo in #993
- Adding additional Optional deserialization example by @Spikhalskiy in #994
- Rework and cleanup Worker metrics and contexts by @Spikhalskiy in #987
- Add worker_task_slots_available metric and worker_type tag by @Spikhalskiy in #997
- Expose WorkflowInfo.getCronSchedule by @tsurdilo in #996
- Introduce GH actions for native-image builds by @mmcshane in #1000
- Add WorkflowImplementationOptions.setLocalActivityOptions (#975) by @imalao in #1001
- Workflow input defaults should be strings by @mmcshane in #1002
- Polish #1001 by @Spikhalskiy in #1003
- Retain strong references to all Gauges by @Spikhalskiy in #1006
- Prevent Windows 2022 being used for native-images by @mmcshane in #1008
- Adds a prep-release workflow by @mmcshane in #1018
- Dependencies upgrade by @Spikhalskiy in #1020
- Rework slf4j version to a version range by @Spikhalskiy in #1021
- Release v1.8.0 by @Spikhalskiy in #1022
New Contributors
Full Changelog: v1.7.1...v1.8.0
v1.7.1
Highlights
- It's a patch release for 1.7.0 containing a fix for SimpleSslContextBuilder throwing an exception when provided with a certificate chain or a private key.
What's Changed
- Fix bug where TLS certificate streams are read twice by @mrjgreen in #968
- Fix SimpleSslContextBuilderTest not testing anything by not loading keys correctly by @Spikhalskiy in #970
- Release v1.7.1 by @Spikhalskiy in #971
New Contributors
Full Changelog: v1.7.0...v1.7.1