Skip to content

Releases: temporalio/sdk-java

v1.26.1

24 Oct 17:47
805833c
Compare
Choose a tag to compare

Bugfixes

Update With Start

  • Fixed a issue where Workflow inputs were not being sent properly when using WorkflowClient.updateWithStart.
  • Fixed a issue where WorkflowClient.updateWithStart would fail if used with an UpdateWithStartWorkflowOperation created with an update name.

Nexus

  • Fixed a issue where the Operations parameter type was not being properly sent to the DataConverter.
  • Fixed an exception being thrown if a null result was returned from a sync handlers.
  • Fixed a bug where the time skipping test server would instantly timeout an operation if not timeout was set.

What's Changed

2024-10-16 - acfadbf - Avoid spamming retries in nexusOperationApplicationFailureFailureConversion (#2272)
2024-10-16 - eb64ec3 - Fix code coverage (#2275)
2024-10-17 - 25f5536 - Fix Null pointer exception on passing empty search attribute (#2277)
2024-10-21 - 0ce1d6e - Bump edge test dependencies (#2279)
2024-10-21 - 301e129 - Fix test server operation timeout (#2282)
2024-10-21 - ac3526b - Avoid warning from un-accessed operation promise (#2280)
2024-10-22 - 3410677 - Fix UpdateWithStart untyped operation (#2288)
2024-10-22 - 7bcade2 - Fix UpdateWithStart workflow args (#2286)
2024-10-24 - 27d998a - Add failure_reason to nexus_task_execution_failed (#2274)
2024-10-24 - 93e30d7 - Avoid SyncOperationTimeoutTest spamming the test server (#2292)
2024-10-24 - b8c4b7b - Fix proto decoding in a Nexus Operation (#2281)

v1.26.0

15 Oct 22:43
cda0471
Compare
Choose a tag to compare

Highlights

Nexus (Pre-Release)

Note: This feature requires a server version 1.25+ and must be enabled. For self-hosted see Trying Nexus Out. For Temporal Cloud Nexus support is available as public preview.

Temporal Nexus is a new feature of the Temporal platform designed to connect durable executions across team, namespace, region, and cloud boundaries. It promotes a more modular architecture for sharing a subset of your team’s capabilities via well-defined service API contracts for other teams to use, that abstract underlying Temporal primitives, like Workflows, or execute arbitrary code.

Learn more at temporal.io/nexus.

More Java-specific docs and samples coming soon.

Update-With-Start (Pre-Release)

Note: This feature requires a server version 1.24+ and must be enabled. For self-hosted you can set frontend.enableExecuteMultiOperation. For Temporal Cloud please reach out to your Temporal account team or Temporal Support Team to enable update with start in your namespace.

This release adds support for Workflow Update-With-Start. Update-With-Start allows users to send a Workflow Update request along with a Start Workflow request in the same RPC. Users can think of Update-With-Start as analogous to Signal-With-Start except for Updates instead of Signals. To make an Update-with-start request users can call WorkflowClient.updateWithStart.

Workflow Init

Added a new annotation @WorkflowInit users can add to the constructor of their workflow implementations to specify that the constructor accepts the workflow input arguments. The constructor annotated with this annotation is called when a new workflow instance is created. It will be called before the main workflow method and any signal or update handlers. The constructor must be public and take the same arguments as the main workflow method. All normal workflow constraints also apply in the constructor.

NOTE: Workflow Init is currently NOT supported with our Spring-Boot integration

Upsert Memo

Added a new Workflow API Workflow.upsertMemo . This allows users to modify a workflow's memo field inside the workflow. Normal determinism constraints apply to upsertMemo.

User Metadata (Public Preview)

Note: This feature requires a server version 1.25+

This release adds support for user metadata inside Workflows. This lets users set custom metadata on Workflow executions and certain APIs inside workflow, that will be visible in the UI.

Currently, the Java SDK supports:

  • Fixed "summary" and "details" on workflow start
  • Fixed "summary" and "details" on child workflows
  • Details on timer names through TimerOptions

💥 BREAKING CHANGES

Workflow Update

  • Changed the return type of DynamicUpdateHandler::handleExecute from EncodedValuesObject to align with other dynamic handlers in the Java SDK.
  • Renamed io.temporal.client.UpdateHandle to io.temporal.client.WorkflowUpdateHandle to align with other SDKs.

Workflow Registration

The SDK will now attempt to perform more validation on workflows at registration time rather then waiting until the workflow is invoked. Specifically the SDK now checks if a workflow has a default public constructor at registration time instead of invocation time.

Bugfixes

Refactored SDK internals to avoid holding onto large user payloads like activity or child workflow inputs after the operation was scheduled.

What's Changed

2024-09-03 - ecd26b7 - Rename UpdateHandle to WorkflowUpdateHandle (#2204)
2024-09-05 - add6c4e - Add support for upsert memo (#2202)
2024-09-12 - a173dbe - Fix Dynamic Update Handler return type (#2210)
2024-09-13 - 2163b8f - Test server support for async Nexus operations (#2198)
2024-09-16 - 03f7182 - Add support for user meta data (#2218)
2024-09-16 - 21d15ae - Add workflow init support (#2222)
2024-09-17 - 6f0cf07 - Fix timeout during operation retry (#2221)
2024-09-17 - 7525c65 - Test Server: Fix Nexus operation cancel before start (#2223)
2024-09-23 - 0e58687 - Add getMetricsScope interceptor (#2224)
2024-09-23 - 6150dc1 - Fill in namespace capabilities in describe response (#2228)
2024-09-23 - 71e89f9 - Block invalid calls in Await (#2225)
2024-09-23 - 97322ec - Update Test Server Capabilities (#2226)
2024-09-25 - 238c5e1 - Update-with-Start (#2199)
2024-09-25 - 52aa9e8 - Add option to configure the deadline of getSystemInfo (#2240)
2024-10-01 - 156f4f1 - SDKTestWorkflowRule wasn't calling shutdown (#2243)
2024-10-03 - 089bbea - Set CanceledFailureInfo for all canceled Nexus outcomes (#2253)
2024-10-08 - d1dc2e1 - Add update info to MDC context (#2259)
2024-10-10 - 393045d - Test server support for bidi links (#2258)
2024-10-10 - 92692b4 - Call shutdown RPC on worker shutdown (#2264)
2024-10-15 - af7b5b7 - Fix memory leak of command inputs (#2262)
2024-10-15 - eff3ca2 - Merge Nexus into Master (#2270)

v1.25.2

25 Sep 22:21
91275de
Compare
Choose a tag to compare

Highlights

In v1.24.0 the Java SDK fixed a bug causing the initial connection health check and server capabilities discovery
to not have a proper deadline set. Some users may have been unintentionally relying on this lack of deadline when
the first request to the Temporal service is slow. This release adds a new option to configure the deadline of
this initial connection. Added ServiceStubsOptions.setSystemInfoTimeout() to configure the deadline of this
initial connection. Setting the deadline to your RPC timeout would emulate the previous behavior of not having
a deadline set.

Changeset

2024-09-25 - 4f14ece - Add option to configure the deadline of getSystemInfo (#2240)

v1.25.1

21 Aug 21:04
1a054bb
Compare
Choose a tag to compare

Highlights

Bugfixes

Fixes a bug where workers may not properly shutdown if awaitTermination was not called.

Changeset

2024-08-15 - 448f264 - Fix workflow start delay docs to say signal does not interrupt delay (#2190)
2024-08-16 - 0c135d6 - Remove feature repo tag (#2191)
2024-08-20 - 4eaeb9e - Fix shutdown behavior of unstarted LA slot queue (#2196)
2024-08-20 - f2e113a - Adding attempt number into MDC context for better diagnosing (#2193)

v1.25.0

15 Aug 22:40
7229a45
Compare
Choose a tag to compare

Highlights

Slot Auto-Tuning (Preview)

Added WorkerTuner - this wraps the previously added SlotSupplier classes to bring worker tuning options together under one class passed to the WorkerOptions
* Added ResourceBasedTuner and ResourceBasedSlotSupplier - these classes can be used to tune the workers slot count based on available memory and cpu resources.
Set a memory/cpu target and the worker will automatically try to reach those target usage levels.
* Added CompositeTuner - this allows you to combine different kinds of SlotSuppliers to implement WorkerTuner.

Please give the resource based tuning a try and let us know how it works for you (feedback on community slack is welcome)!
The easiest thing to do is instantiate and pass a ResourceBasedTuner to WorkerOptions.
It'll work best if the worker is the only thing on your host using significant resources.
Try setting the thresholds to a reasonable value like 0.8, and make sure that your JVM -Xmx value is set appropriately.

Note: Custom Slot Supplier is currently considered experimental and not intended for production use.

Handler Warnings

Previously if you had a signal handler or update handler that was not complete when the workflow was marked complete,
it'd silently be ignored/abandoned. Now you will get a warning. Users are encouraged to add
Workflow.await(() -> Workflow.isAllHandlersFinished()) to the bottom of their workflow to ensure they
have no outstanding handlers. If the previous no-warn situation is preferred, the signal/update annotation has a setting
to just abandon.

Changeset

2024-06-25 - 659fee5 - Switch checkout in prepare-release.yml to v3 (#2126)
2024-06-27 - abd9f2d - Point feature repo back to main (#2130)
2024-07-08 - 0f90334 - Release v1.24.1 (#2140)
2024-07-08 - 46b239d - Revert configurable slot provider (#2134)
2024-07-08 - 99585c1 - Change build_native_images mac runner to macos-13 (#2135)
2024-07-09 - 3b26db7 - Make sure workflow_failed is incremented on NonDeterministicException (#2141)
2024-07-17 - eb7d9ee - Release v1.24.2 (#2147)
2024-07-19 - 0ba6188 - Experimental cloud operations client (#2146)
2024-07-23 - b95322f - Reintroduce slot supplier & add many tests (#2143)
2024-07-24 - eabd51f - Ensure identity copied to Builder from source WorkerOptions (#2151)
2024-07-30 - 1acafa3 - Ensure shutdown of LA slot queue isn't swallowed (#2161)
2024-07-30 - 6b39e44 - Align Update API across test server and real server (#2153)
2024-07-30 - b92c97d - Workflow-friendly concurrency primitives (#2133)
2024-07-30 - bbf2de7 - Move workflow update polling inside of interceptor (#2159)
2024-07-30 - e5c08a1 - Enable next retry delay test for server (#2129)
2024-07-30 - f7c7341 - Fix transition in LA when handling canceled child wf (#2156)
2024-07-31 - 27a1fc2 - Add support for query in listSchedules (#2163)
2024-08-01 - 5d22bb5 - Add getCurrentUpdateInfo (#2158)
2024-08-05 - 4871168 - Test server Nexus endpoint operator apis (#2162)
2024-08-06 - 531d3cb - Wrap GRPC::CANCELED and DEADLINE_EXCEEDED in new exception type (#2172)
2024-08-06 - 98b2e78 - Disallow continue as new in update handlers (#2167)
2024-08-08 - 59c485e - Filter out third party protos (#2174)
2024-08-08 - e0851f0 - Build omes worker image in CI (#2171)
2024-08-11 - e2d2608 - Warn on dangling handlers and add method to help await on all handlers. (#2144)
2024-08-12 - a885812 - Ad support for updating schedule search attributes (#2168)
2024-08-14 - a5d6e60 - Fix isEveryHandlerFinished doc string (#2182)
2024-08-15 - 1d668c6 - Activity slot test flake (#2186)
2024-08-15 - 33bfef0 - Add to graal bindings (#2185)
2024-08-15 - abc5323 - Implement test server support for sync Nexus operation commands (#2176)
2024-08-15 - b9eeda0 - Improve test time and flaky schedule test (#2183)
2024-08-15 - ccfb368 - Concurrent poll request lock test fix (#2187)

v1.24.3

31 Jul 22:04
d326d7f
Compare
Choose a tag to compare

Highlights

Bugfixes

Fixes a state machine bug when starting a local activity after cancelling a child workflow.

Changeset

2024-07-30 - 6cd57ea - Enable next retry delay test for server (#2129)
2024-07-30 - 8f036af - Fix transition in LA when handling canceled child wf (#2156)
2024-07-30 - f78ce7f - Ensure identity copied to Builder from source WorkerOptions (#2151)

v1.24.2

17 Jul 22:16
eb7d9ee
Compare
Choose a tag to compare

Highlights

Bugfixes

Fixes a bug where workflow_failed metric may not be incremented if the workflow fails do to a NonDeterministicException.

Changeset

2024-07-09 - 3b26db7 - Make sure workflow_failed is incremented on NonDeterministicException (#2141)

v1.24.1

08 Jul 19:31
0f90334
Compare
Choose a tag to compare

Breaking Changes

This patch release reverts "Slot Auto-Tuning" support as it was causing a regression in local activity slot management
and metrics.

Changeset

2024-06-27 - abd9f2d - Point feature repo back to main (#2130)
2024-07-08 - 46b239d - Revert configurable slot provider (#2134)
2024-07-08 - 99585c1 - Change build_native_images mac runner to macos-13 (#2135)

v1.24.0

25 Jun 22:53
659fee5
Compare
Choose a tag to compare

⚠️ Note: There is a regression in this release with worker_task_slots_available for local activities where it may not be emitted properly and the slot may not be properly released in all situations. We recommend users use v1.24.1.

Highlights

Slot Auto-Tuning (Preview)

Added WorkerTuner - this wraps the previously added SlotSupplier classes to bring worker tuning options together under one class passed to the WorkerOptions
* Added ResourceBasedTuner and ResourceBasedSlotSupplier - these classes can be used to tune the workers slot count based on available memory and cpu resources.
Set a memory/cpu target and the worker will automatically try to reach those target usage levels.
* Added CompositeTuner - this allows you to combine different kinds of SlotSuppliers to implement WorkerTuner.

Please give the resource based tuning a try and let us know how it works for you (feedback on community slack is welcome)!
The easiest thing to do is instantiate and pass a ResourceBasedTuner to WorkerOptions.
It'll work best if the worker is the only thing on your host using significant resources.
Try setting the thresholds to a reasonable value like 0.8, and make sure that your JVM -Xmx value is set appropriately.

Note: Custom Slot Supplier is currently considered experimental and not intended for production use.

Breaking Changes

Workflow Update (Preview)

This release includes some breaking changes to the Workflow Update client API.

  • temporal.client.UpdateOptions.setWaitPolicy has been changed to temporal.client.UpdateOptions.setWaitForStage
  • WaitForStage is now a required option in temporal.client.UpdateOptions and no longer defaults to Accepted
  • io.temporal.client.WorkflowStub.startUpdate now requires a WorkflowUpdateStage.
  • io.temporal.client.WorkflowStub.startUpdate now respects the WorkflowUpdateStage.
    • Previously startUpdate may have returned a handle before the desired WaitForStage was reached.

SpringBoot Integration (Preview)

As part of preparation for Spring Boot Integration GA we have renamed our Spring Boot packages to remove the alpha tag:
* temporal-spring-boot-starter-alpha -> temporal-spring-boot-starter
* temporal-spring-boot-autoconfigure-alpha -> temporal-spring-boot-autoconfigure

Users should update their package names when upgrading the Java SDK.

Stay tuned for future news about SpringBoot integration GA.

Changeset

2024-04-02 - e603fd8 - Fix environment variables in CI github action (#2024)
2024-04-04 - 26a8595 - SpringBoot - add workflow and activity metadata to RegisteredInfo (#1995)
2024-04-08 - 3568970 - Update github actions (#2027)
2024-04-08 - 779d90c - Make StickyQueueBalancer synchronized (#2025)
2024-04-10 - 920a361 - Add note on using snapshot releases (#2032)
2024-04-10 - d2a06fc - Slot supplier interface & fixed-size implementation (#2014)
2024-04-15 - 81cc6e0 - Update proto API to 1.32.0 (#2039)
2024-04-15 - c6cceca - Fix recursion in TracingWorkerInterceptor (#2040)
2024-04-17 - ed211fa - Fix exception in GrpcRetryer. (#2021)
2024-05-03 - 0013675 - Add ScheduleClientInterceptor APIs (fixes #2048) (#2050)
2024-05-08 - a41c64e - Add support for update admitted event (#2041)
2024-05-10 - 9cdff7a - Fix UnsupportedOperationException in handleSingleEventLookahead (#2061)
2024-05-21 - 5ccb859 - Send original update request back in accept/reject response (#2074)
2024-05-21 - 82d5a88 - Don't return update handles until desired stage reached (#2066)
2024-05-21 - 9a856f3 - Send unset catchupWindow in schedules if not specified (#2067)
2024-05-23 - 5e5cf0b - Add shortcut to set API key (#2052)
2024-05-29 - 0d7ae22 - Add support for nextRetryDelay (#2081)
2024-05-29 - 0d847a6 - Add identity to WorkflowOptions (#2080)
2024-05-29 - ae6597f - Fix schedule workflow action retry policy (#2082)
2024-05-30 - 0c8073e - Fix a few issues with the describeSchedules test (#2085)
2024-05-31 - 08b220c - Bump some GH action dependencies (#2083)
2024-05-31 - 5c464e8 - Fix issue with isReplaying causing direct query to spam logs (#2087)
2024-05-31 - cde114c - Fix signal CAN non determinism test (#2084)
2024-06-03 - 1ad1c04 - Require WaitForStage in StartUpdate (#2088)
2024-06-03 - 4eda239 - Add setWorkflowIdConflictPolicy (#2055)
2024-06-04 - 1e79592 - Add exception for calling an update method on a stub (#2095)
2024-06-05 - 265590d - Add toString to ServiceStubOptions (#2089)
2024-06-06 - 42b9803 - Fix caching in LazyUpdateHandleImpl (#2098)
2024-06-06 - bf392f5 - Bump some GHA actions back due to glibc compatibility (#2096)
2024-06-10 - 4f781b3 - Allow SDK to handle speculative workflow task with command events (#2099)
2024-06-10 - f0a30a6 - Fix flake in resetWorkflowIdFromWorkflowTaskTest (#2105)
2024-06-11 - 6da11b9 - Add integration test for reset with update (#2104)
2024-06-13 - ddda99b - Fix ConcurrentModificationException in LocalActivityMeteringHelper (#2108)
2024-06-21 - 69769cb - Fix empty-string fields on CaN not working (#2120)
2024-06-21 - 8a2d5cd - Resource based tuner (#2110)
2024-06-25 - 43a4aa0 - Remove Spring Boot alpha tag (#2115)
2024-06-25 - 8872e33 - Update dependencies to address some CVE scans (#2123)

v1.23.2

30 Apr 15:55
Compare
Choose a tag to compare

Changeset

2024-04-02 - e603fd8 - Fix environment variables in CI github action (#2024)
2024-04-30 - 57988f0 - Update proto API to 1.32.0 (#2039)