Releases: temporalio/sdk-java
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
v1.7.0
Highlights
- This is mostly a bugfix release
- ProtobufJsonPayloadConverter and ProtobufPayloadConverter now adds messageType to metadata (this can be disabled by providing excludeProtobufMessageTypes flag to the converter's constructor)
- This release upgrades recommended version of Jackson to 2.13.1 that fixes a security vulnerability. [XRAY-191477; SNYK-JAVA-COMFASTERXMLJACKSONCORE-2326698] This vulnerability doesn't affect Temporal functionality and usage of Jackson [https://github.com/FasterXML/jackson-databind/issues/3328]
What's Changed
- Improve an error message for an unexpected local activity marker event by @Spikhalskiy in #923
- Shutdown of WorkflowFactory now invalidates the workflow cache by @Spikhalskiy in #916
- Improve wording around WorkflowClient#start by @Spikhalskiy in #924
- Improve Workflow#getMetricsScope docstring by @Spikhalskiy in #926
- Avoid ConcurrentModificationExceptions in describeWorkflowExecution by @nagl-stripe in #936
- Allow disabling timeskipping on TestWorkflowEnvironment by @nagl-stripe in #937
- Condense README and rename to sdk-java by @lorensr in #931
- Fix POJOActivityImplMetadata not being able to handle activity impl that uses inheritance by @aniketbhatnagar in #930
- Support for PKCS12 keys in SimpleSslContextBuilder by @Spikhalskiy in #941
- Heartbeat throttling is revisited for a new design, gets a default if heartbeatTimeout is not specified by @Spikhalskiy in #943
- Refactor a local/regular activities difference out from POJOActivityTaskHandler by @Spikhalskiy in #949
- Fix opentracing context propagation to async executed function by @Spikhalskiy in #951
- Set Fossa to run non-blocking in buildkite by @mcbryde in #956
- Cancel pollers when client disconnects by @mmcshane in #953
- Guarantee context listener removal by @mmcshane in #957
- Fix continue-as-new wiring, interception, context propagation and OpenTracing integration by @Spikhalskiy in #954
- Fix absent workflow statuses in TestService#listOpenWorkflowExecutions by @Spikhalskiy in #958
- Add metadata.messageType to protobuf payloads by @lorensr in #942
- WorkflowUnsafe#isWorkflowThread by @Spikhalskiy in #959
- Upgrade dependencies to the latest versions by @Spikhalskiy in #962
- Release v1.7.0 by @Spikhalskiy in #963
New Contributors
- @lorensr made their first contribution in #931
- @aniketbhatnagar made their first contribution in #930
- @mcbryde made their first contribution in #956
- @mmcshane made their first contribution in #953
Full Changelog: v1.6.0...v1.7.0
v1.6.0
Highlights
- This release contains important fixes that improve the stability of workers.
- Numerous fixes for worker thread leaks and handling of failure cases.
- There is a race condition in gRPC-java that may break workers. This release contains a workaround until the issue is fixed.
Migration notes
temporal-testing-junit4
, temporal-testing-junit5
, and temporal-testing
merged into one temporal-testing
module that exposes Gradle "capabilities."
For Gradle:
See https://github.com/temporalio/sdk-java/tree/master/temporal-testing#usage for Gradle-specific instructions. Or you can just switch to temporal-testing
and provide junit dependency yourself without digging into Gradle's capabilities.
For other build tools:
Just switch onto using just temporal-testing
instead of temporal-testing-junit4
or temporal-testing-junit5
.
What's Changed
- Upgrade proto to the latest server API by @Spikhalskiy in #859
- Updates temporal-sdk dep in temporal-kotlin by @natalie-zamani in #867
- Fix test service state machines to handle situation when activity get cancelled from SCHEDULED state before being picked up by @Spikhalskiy in #866
- Adds workflow id and run id into workflows method names by @Spikhalskiy in #868
- Merge 3 existing testing modules into one temporal-testing by @Spikhalskiy in #870
- Report WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR status by @Spikhalskiy in #869
- Improve trace logging around WorkflowExecutorCache by @Spikhalskiy in #876
- Memory/resource leak improvements in TestWorkflowService by @nagl-stripe in #877
- Polish WorkflowThreadContext thread status switching by @Spikhalskiy in #879
- Adds warning log message in case of subsequent new worker calls for the same task queue by @Spikhalskiy in #885
- Fix thread leak in legacy query path by @Spikhalskiy in #881
- Adds more details into WorkflowCancellationRunningActivityTest by @Spikhalskiy in #884
- Fix the type of an exception from the test service by @nagl-stripe in #890
- Disable grpc idleTimer as a temporary solution to race condition in gRPC-java by @Spikhalskiy in #889
- Modify test assertions to give more information for flakes investigation by @Spikhalskiy in #892
- Cleanup Activity exception javadocs by @Spikhalskiy in #891
- Exposes getWorkflowExecutionHistory on TestWorkflowEnvironment by @Spikhalskiy in #897
- Add validation for maximumInterval vs minimumInterval by @Spikhalskiy in #899
- Expose methods for loading history from files as WorkflowExecutionHistoryLoader by @Spikhalskiy in #903
- Rearrange WFT handle logging and metrics to accommodate all failure modes by @Spikhalskiy in #905
- Improve documentation on the Signal method by @Spikhalskiy in #907
- [Refactoring] Move errorprone settings into a separate script by @Spikhalskiy in #909
- [Refactoring] Cleanup resource management in tests by @Spikhalskiy in #910
- Fix signalWithStart integration with tracing by @Spikhalskiy in #913
- Add @bergundy and @mmcshane to CODEOWNERS by @Spikhalskiy in #919
- Doc describing building test-server into a native binary using GraalVM native-image by @Spikhalskiy in #917
- Upgrade grpc version to 1.42.1 by @Spikhalskiy in #920
- Release v1.6.0 by @Spikhalskiy in #921
New Contributors
- @natalie-zamani made their first contribution in #867
Full Changelog: v1.5.0...v1.6.0
v1.5.0
Highlights
- temporal-kotlin module gets extension functions that makes configuration of Temporal in Kotlin much cleaner
- Version State Machine went through a significant overhaul that addresses know issues with Workflow.getVersion
- OpenTracing module error reporting was redone to use conventional tag and log names
- Dependencies were relaxed to use the largest possible version ranges
Full Changeset
- Improve WorkerStressTests by @mincong-h in #807
- Remove Error throwing from DeterministicRunner#executeInWorkflowThread is case if execution is closed by @Spikhalskiy in #817
- Respect WorkflowClientInterceptors in newUntypedWorkflowStub(WorkflowExecution, ...) by @nagl-stripe in #813
- Upgrade dependencies by @Spikhalskiy in #819
- Improve diagnostic message of workflow state machines when validation of command-event pair fails by @Spikhalskiy in #820
- Test service should not run cron workflow initially if it's not per cron schedule by @vkoby in #812
- Improve ActivityCancellationTest with additional checks and addressing flakiness by @Spikhalskiy in #822
- Improve ActivityOptions#setCancellationType javadoc with detail value details by @Spikhalskiy in #821
- Allow more control in state machines test framework over replayTo, executeTo indexes by @Spikhalskiy in #823
- Improve buildkite pipelines structure by @Spikhalskiy in #824
- Upgrade micrometer version and allow larger range of grpc and protobuf versions by @Spikhalskiy in #826
- Reenable a bunch of previously disabled flaky tests by @Spikhalskiy in #829
- WorkflowExecutionUtils method renaming and a new WFT helper method by @Spikhalskiy in #831
- Fix WorkflowExecutionHistory problem with deserializing history jsons from the new server versions by @Spikhalskiy in #837
- Fix NullPointer in RetryOptions#merge by @Spikhalskiy in #834
- Added a newUntypedWorkflowStub method to WorkflowClient by @vkoby in #841
- Use jackson-bom platform dependency management by @Spikhalskiy in #843
- Fix handling of version marker if it's the last command event of WFT by @Spikhalskiy in #845
- Fix Version StateMachine vs Cancellation bug by introducing preloading of version marker events by @Spikhalskiy in #805
- Changed to hour step function so that passing of the test doesn't depend on the number of days in the month by @vkoby in #848
- Kotlin extensions for Java SDK methods by @GreyTeardrop in #727
- Rework OpenTracing module to use conventional error reporting by @Spikhalskiy in #854
- Upgrade gson dep to the last version and switch on using a version range by @Spikhalskiy in #855
- Release v1.5.0 by @Spikhalskiy in #858
New Contributors
- @mincong-h made their first contribution in #807
Full Changelog: v1.4.0...v1.5.0
v1.4.0
Highlights
TestWorkflowRule
doesn't enforce timeouts anymore, users should use JUnit or other test frameworks functionality to enforce test level timeouts- Dynamic Workflow Failures are handled correctly
TEMPORAL_DEBUG
mode is fixed in regards to Deadlock exceptions- JavaSDK migrated to the unified
tctl
version of history in replays - Fixed duplication of workflow metrics during replays
- Workflow client stubs now respect context propagators set on
WorkflowClientOptions#contextPropagators
Migration notes
Previous versions of JavaSDK (<v1.4.0) were generating JSON histories in an incorrect format (#300).
Users who already have pregenerated JSON Workflow Histories as a part of their test suite may need to perform a migration if these histories were generated by the previous version of JavaSDK.
io.temporal.internal.common.HistoryJsonUtils.protoJsonToHistoryFormatJson
may be used to convert JSON histories generated by the old versions of JavaSDK to the unified tctl format.
This note is applicable only if you used JavaSDK to generate the original histories. Nothing needs to be done if the histories were generated by the Temporal command-line tool or WebUI, they are already in a correct format.
Full Changeset
- Post-release cleanup and versions upgrade by @Spikhalskiy in #715
- WorkflowExecutionUtils refactoring by @Spikhalskiy in #717
- Move check for isTemporalDebugModeOn down to WorkflowThreadContext#runUntilBlocked to avoid missing checks on the calling side by @Spikhalskiy in #720
- Improve LongLocalActivityWorkflowTaskHeartbeatFailureTest flakiness by @Spikhalskiy in #703
- Support tctl format of history by @Spikhalskiy in #729
- Switch SelfAdvancingTimerImplTest to use fixed clock to reduce flakes and improve the quality of checks by @Spikhalskiy in #728
- Add error handling for dynamic workflow failure by @mfateev in #723
- LargeHistoryTest is unignored by @Spikhalskiy in #725
- User-facing TestWorkflowRule doesn't enforce test timeouts anymore by @Spikhalskiy in #719
- Removed unnecessary thread interrupt by @vkoby in #722
- Cleanup LongPoll code and update Async version by @Spikhalskiy in #730
- Create UnitTest namespace in dockerized Temporal before running temporal-kotlin module tests by @Spikhalskiy in #733
- Add logback-test to kotlin module to decrease verbosity of building logs on docker from netty by @Spikhalskiy in #734
- Adapt GetVersionAfterScopeCancellationTest so it runs against external docker without time skipping by @Spikhalskiy in #736
- Update proto and micrometer dependencies by @vitarb in #750
- Remove target when setting channel in workflow test environment options by @vitarb in #751
- Record last worker identity during heartbeat by @vkoby in #698
- Relocate CODEOWNERS file to be consistent with go-sdk by @Spikhalskiy in #755
- Improve javadocs around ActivityCancellationType by @Spikhalskiy in #754
- Fix AbandonOnCancelActivityTest flake by @Spikhalskiy in #757
- Adapt CheckedExceptionWrapper to Throwables that are not Exceptions and Errors by @Spikhalskiy in #758
- Expose AuthorizationGrpcMetadataProvider constructor by @Spikhalskiy in #763
- Fix a timeskipping bug in the test service by @nagl-stripe in #764
- Cleanup for using external docker in CI and a temporary fix for server namespaces publishing delay by @Spikhalskiy in #735
- Update and reorganize dependencies by @Spikhalskiy in #776
- Restore assertion clauses of BinaryChecksumSetWhenTaskCompletedTest by @Spikhalskiy in #767
- Beautify the output of prettyPrint for history to make test histories much easier to read by @Spikhalskiy in #780
- Various debugging utils developed during state machine bug investigation by @Spikhalskiy in #781
- Make TestService ignore heartbeat identity like dockerized server does by @vkoby in #782
- Handle case where getMemo requests a non-existent key by @jeffschoner-stripe in #783
- Fix HealthCheckTest to run with dockerized buildkite environment by @Spikhalskiy in #785
- Fix flaky ActivityThrowingErrorTest by @Spikhalskiy in #786
- Turn on unit testing with Docker by @vkoby in #644
- Identity for pending activity comes from pollRequest in TestService by @vkoby in #784
- Dependency Update by @vkoby in #791
- Enable IdentityInPendingActivityTest for Dockerized Temporal by @Spikhalskiy in #792
- Disable emitting of completion metrics when replaying workflow by @asmadsen in #769
- Use ReplayAwareScope to don't double report completion on replays, fix STICKY_CACHE_THREAD_FORCED_EVICTION double reporting by @Spikhalskiy in #795
- Deleted this test. DescribeTest already covers this functionality. by @vkoby in #797
- WorkflowClientOptions#contextPropagators is now used for Workflow stubs if not overridden on WorkflowOptions by @Spikhalskiy in #798
- Implement activity_succeed_endtoend_latency and local_activity_succeed_endtoend_latency metrics by @Spikhalskiy in #800
- Fix the way SNAPSHOT versions are created by @Spikhalskiy in #801
- Make grpc-netty-shaded dep API scoped by @Spikhalskiy in #803
- Release v1.4.0 by @Spikhalskiy in #804
New Contributors
- @jeffschoner-stripe made their first contribution in #783
- @asmadsen made their first contribution in #769
Full Changelog: v1.3.1...v1.4.0
v1.3.1 release
Highlights:
This release includes a hotfix for handling DEADLINE_EXCEEDED to address a potential regression introduced by v1.3.0
All changes:
2021-09-11 - 0da3149 - GrpcRetryer now retries underlying DEADLINE_EXCEEDED if the root gRPC context deadline is not expired (#709)
2021-09-13 - d19bdcd - Test service now enforces 1 Minute timeout on long polls (#713)
v1.3.0 release
Highlights:
- Improved Kotlin support (#319) Kotlin users should include temporal-kotlin module in the classpath.
- Context deadline exceeded gRPC error will be considered as non-retryable (#654) and will include details from the previous exception when possible (#674). Normal behavior for most other retryable server errors would be to retry them until deadline is exceeded.
- Added support for JWT tokens (#678)
- Allowed using custom headers during health check (#690)
- Multiple bug fixes
All changes:
2021-08-10 - 15ca508 - Refactor how DeterministicRunnerImpl and SyncWorkflowContext handle creation of workflow root and method threads (#557)
2021-08-10 - 6f75b67 - Added configurable OpenTracerSpanContextCodec to OpenTracingOptions (#624)
2021-08-13 - 58f02fe - Code style improvements around DataConverters and WorkflowContext (#627)
2021-08-14 - 759526e - Add temporal-kotlin module that provides correct Kotlin support for Async (#319)
2021-08-16 - 35dae76 - Stop enforcing TestWorkflowRule timeout when run in Temporal debug mode, respect JUnit(timeout) over TestRule timeout (#633)
2021-08-16 - 5d8734b - SDKTestWorkflowRule is moved into temporal-testing-junit4 to allow reusing by other modules (#635)
2021-08-16 - 6d98270 - Fix misc thread safety issues with WorkflowThreadContext (#642)
2021-08-16 - 762e571 - Do not retry local activity when non-retryable ApplicationFailure is thrown (#638)
2021-08-18 - 25da5d2 - Add newFailureWithCause and newNonRetryableFailureWithCause to ApplicationFailure that allow to setup cause field (#649)
2021-08-18 - 9f53c13 - Fix handling of Version events in WorkflowStateMachines in case of cancelled commands in a queue (#614)
2021-08-24 - 0c09e62 - GrpcRetryer now respects DEADLINE_EXCEEDED as non-retryable (#654)
2021-08-26 - 6d55180 - Add backoff to WorkflowExecutionUtils#getInstanceCloseEvent (#667)
2021-08-26 - 73d7fbd - Preserve a previous exception in GrpcRetryer in case of DEADLINE_EXCEEDED (#674)
2021-08-26 - b034a0f - Add getMemo to Workflow (#611)
2021-08-30 - 206d758 - Add DescribeWorkflowExecution to TestWorkflowService (#670)
2021-08-31 - 1e77577 - Refactored HeaderUtils#intoPayloadMapWithDefaultConverter to accept converter as parameter. (#686)
2021-08-31 - 3d0be05 - Cleanup naming inside AuthorizationGrpcMetadataProvider (#691)
2021-08-31 - 914ecf1 - Refactored TestWorkflowMutableState and removed unused methods from ReplayWorkflowContext (#679)
2021-08-31 - 95d7e0a - Add support for JWT tokens for Temporal server authorization (#678)
2021-08-31 - d837780 - Call health check on intercepted channel (#690)
2021-09-08 - b077ec1 - Fix getResult hang after termination using test service (#700)