Skip to content

Releases: temporalio/sdk-java

v1.27.0

06 Dec 21:10
a073e64
Compare
Choose a tag to compare

💥 BREAKING CHANGES

Update With Start (Pre-release)

WorkflowClient

  • WorkflowClient.updateWithStart has been renamed to WorkflowClient.startUpdateWithStart.
  • Instead of taking the workflow method, workflow arguments and a UpdateWithStartWorkflowOperation, WorkflowClient.startUpdateWithStart now takes the update method, update arguments and a WithStartWorkflowOperation. WithStartWorkflowOperation contains the workflow method and workflow arguments to be executed together with the update request.

WorkflowStub

  • WorkflowStub.updateWithStart has been renamed to WorkflowStub.startUpdateWithStart.
  • WorkflowStub.startUpdateWithStart now just takes the UpdateOptions, update arguments and workflow arguments.

Update (Public Preview)

  • The SDK now preforms more rigorous type validation when registering a Workflow with an @UpdateValidatorMethod to make sure the type parameters match the linked @UpdateMethod.
  • The SDK will no longer sometimes throw WorkflowUpdateException when calling WorkflowStub.startUpdate if the update is rejected. WorkflowUpdateException is now consistently throw when getting the result of the update
  • UpdateOptionsBuilder no longer generates a update ID when built. Now a unique UUID is generated when the options are used. This is similar to how WorkflowOptions and workflow ID work.

Nexus (Public Preview)

  • Workflow started by a Nexus operation now require the Workflow ID to be specified in the WorkflowOptions.
  • The SDK now preforms more rigorous type validation when registering a Nexus Service to make sure it implements the service properly.
  • All header maps for Nexus operations are now properly case-insensitive.

Highlights

Virtual Threads (Public Preview)

The Java SDK now has experimental support for virtual threads when using a JVM with a version of 21 or higher. Virtual threads can be used inside workflows by enabling WorkerFactoryOptions.setUsingVirtualWorkflowThreads. Users can also use virtual threads for task processing in a worker by enabling WorkerOptions.setUsingVirtualThreads.

Nexus (Public Preview)

WorkerInterceptor now has support for intercepting Nexus workers.

Update (Public Preview)

WorkflowClient now has a set of static methods called startUpdate that can be used to start an update, but not immediately wait on the result. This is a type safe analog to WorkflowStub.startUpdate.

Workflow Metadata (Public Preview)

  • The Java SDK now exposes a fixed summary option for local and normal activities.
  • The Java SDK now support __temporal_workflow_metadata query, this query allows users to get details about a workflow like its’ current description and what signal, update, and query handlers are registered.

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 - 805833c - Release v1.26.1 (#2293)
2024-10-24 - 93e30d7 - Avoid SyncOperationTimeoutTest spamming the test server (#2292)
2024-10-24 - b8c4b7b - Fix proto decoding in a Nexus Operation (#2281)
2024-10-25 - 2ded985 - Bump Java edge dependency version to 21 (#2296)
2024-10-25 - 6efbde3 - Update gradle 7.6.1 -> 8.10.2 (#2294)
2024-10-29 - 0b192d3 - Fix workflow implementation in springboot failing if no default constructor is present (#2300)
2024-10-30 - c96f8d6 - Add workflow metadata query (#2301)
2024-10-31 - 37081cc - Fix jacoco coverage (#2304)
2024-10-31 - b45e40d - Remove feature branch (#2303)
2024-11-03 - f6bf576 - Add support for virtual workflow threads (#2297)
2024-11-04 - c8a27ce - Add activity summary (#2306)
2024-11-12 - 24990db - Ad support for local activity metadata (#2309)
2024-11-12 - 83f47ef - Make sure workflow options from proxy call are propagated (#2310)
2024-11-12 - b53f304 - Expose fromWorkflowStub (#2311)
2024-11-13 - 02ff5cd - Add timeout to canRunWithResourceBasedTuner (#2313)
2024-11-14 - 4cee4e0 - Validate with generic parameter types for workflow init (#2318)
2024-11-14 - 7ab0f6c - Refactor workflow init validation (#2316)
2024-11-15 - 2a68883 - Generate update ID at call time if not set (#2319)
2024-11-22 - 16b0bb9 - Disable eager activities if task queue rate limits is set (#2325)
2024-11-22 - 1d86a57 - Support toString on workflow proxy types (#2315)
2024-11-22 - c6f0b58 - Do runtime check to ensure update validator has the same parameters as the update it validates (#2323)
2024-11-23 - 74022f1 - Add getResult to WorkflowUpdateHandle (#2324)
2024-11-25 - a2dd369 - Add high-level workflow describe (#2326)
2024-11-26 - 89021d0 - Add type safe API to execute an async update workflow request (#2320)
2024-12-01 - fcc0343 - Fix CI after GHA's drop of node16 actions (#2338)
2024-12-02 - 5212a34 - Skip flaky test (#2334)
2024-12-02 - 7245bf8 - Require workflow ID to be set for Nexus (#2330)
2024-12-02 - e3ef9b4 - Standardized update failure exception (#2339)
2024-12-03 - 8782de3 - Make nexus header check case-insensitive (#2335)
2024-12-03 - cbcf26c - Fix unbalanced locks in test server for Nexus (#2341)
2024-12-04 - c7fcf12 - Make headers in ExecuteNexusOperationInput case insensitive (#2342)
2024-12-06 - 30f391f - Add Nexus Worker interceptor (#2278)
2024-12-06 - 7073375 - Add operation Id to callback headers (#2336)
2024-12-06 - 9ac1af3 - New Update-with-Start API (#2337)

v1.26.2

21 Nov 22:45
0683b90
Compare
Choose a tag to compare

Bugfixes

Spring Boot

  • Fixed an issue where Workflows could not be registered if they used a constructor to autowire.

Nexus

  • Fixed an issue where some Workflow options were not passed when using WorkflowClientOperationHandlers.

What's Changed

2024-11-21 - 01530ec - Fix workflow implementation in springboot failing if no default constructor is present (#2300)
2024-11-21 - 8372337 - Make sure workflow options from proxy call are propagated (#2310)

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)