Skip to content

Releases: temporalio/sdk-java

v1.9.0

12 Apr 23:07
bb85855
Compare
Choose a tag to compare

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

24 Feb 02:19
acce87e
Compare
Choose a tag to compare

Highlights:

  • This is a bugfix release fixing the problem with published 1.8.0 artifacts and Maven

What's Changed

New Contributors

Full Changelog: v1.8.0...v1.8.1

v1.8.0

01 Feb 21:23
9c06115
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v1.7.1...v1.8.0

v1.7.1

12 Jan 20:26
297ccbc
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v1.7.0...v1.7.1

v1.7.0

11 Jan 20:25
dc77a7b
Compare
Choose a tag to compare

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

Full Changelog: v1.6.0...v1.7.0

v1.6.0

06 Dec 23:22
4c3ef2b
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v1.5.0...v1.6.0

v1.5.0

04 Nov 18:02
411459b
Compare
Choose a tag to compare

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

Full Changelog: v1.4.0...v1.5.0

v1.4.0

06 Oct 23:42
4957754
Compare
Choose a tag to compare

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

Full Changelog: v1.3.1...v1.4.0

v1.3.1 release

13 Sep 17:48
01a1b9f
Compare
Choose a tag to compare

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

09 Sep 22:47
6da56e8
Compare
Choose a tag to compare

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)