Skip to content

Releases: temporalio/sdk-java

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)

v1.23.1

01 Apr 22:26
bc726c9
Compare
Choose a tag to compare

Highlights

Fixed an issue where serialization context may not be applied when serializing failures in certain scenarios.

Changeset

2024-03-11 - a64b6e5 - Replace buildkite with github actions (#2004)
2024-03-13 - abea318 - Switch build status badge to GH action (#2005)
2024-03-25 - f205d1c - Remove experimental flag from StartDelay (#2015)
2024-03-28 - 0c6c566 - Add StickyTaskQueueDrainTimeout (#2019)
2024-03-31 - 29d23d0 - Make sure task failures use a serialization context (#2022)

v1.23.0

07 Mar 20:04
dc094a1
Compare
Choose a tag to compare

Highlights

Breaking Changes

Workflow execution history default format changes

WorkflowExecutionHistory.toJson method now emit proper protobuf JSON fields in SCREAMING_SNAKE_CASE rather
than PascalCase. Older versions of the Java SDK will not understand this format.
Users can revert to the old format by setting legacyFormat to true.

See also: #2001

HTTP/2 Keep Alive

HTTP/2 Keep alive is now enabled by default. This should help avoid request timeouts on previously idle connections.
If users want to revert to the old behavior they can set ServiceStubOptions.setEnableKeepAlive to false.

See also: #1873

Connection Options

Default retry options have been updated to match the core based SDKs. This should help with consistency across the SDKs.

See also: #1989

Bugfixes

  • Dynamic workflows now consistently use context aware data converters.
  • Workflow retry policy is now propagated during continue-as-new and to ContinueAsNewOptions.

Changeset

2023-11-08 - 237ea64 - Update Workflow ID reuse policy java doc (#1930)
2023-11-08 - 4f0119f - Treat signal after workflow complete as NonDeterministicException (#1923)
2023-11-16 - 499593f - Enable TCP keep alive by default (#1873)
2023-11-16 - a2c8a2b - Tag workflow_task_execution_failed with error type (#1932)
2023-11-17 - 9cd9dca - Delete .github/workflows/semgrep.yml (#1934)
2023-12-05 - a411b52 - Switch to temporalio/auto-setup (#1949)
2023-12-06 - bb43d37 - Allow WorkflowImplementationOptions to be passed in TestWorkflowExten… (#1948)
2023-12-14 - 7ee8f96 - Fix ArithmeticException in toJavaDuration. (#1950)
2023-12-18 - 440965b - Removed heardcoded 10 second timeout for an activity under test (#1957)
2024-01-01 - 0bb0782 - Small update to Spring Boot Readme (#1958)
2024-01-02 - 9174397 - Added workflow retry policy propagation during continue-as-new and to ContinueAsNewOptions. (#1961)
2024-01-05 - 1f7a59c - Add build id to workflow info (#1964)
2024-01-11 - 10db5e3 - Remove gogoproto junk (#1968)
2024-01-12 - 201240a - Allow creating a stub of an update only interface (#1967)
2024-01-16 - 806eab7 - Fix start-workers config (#1972)
2024-01-22 - 3c4be9d - Unwrap ExecutionException on sync update (#1974)
2024-01-22 - 4c1bf9f - Clarify local connection option (#1976)
2024-02-01 - 72ebff1 - Prefix some errors with rule identifiers (#1975)
2024-02-16 - 4da4591 - Update Guava to v32.0.1 (#1979)
2024-02-16 - f4a572a - Apply serialization context to Dynamic Workflows (#1992)
2024-02-20 - 78e37a6 - SpringBoot - Add registered workflow and activity impl info to workers template (#1986)
2024-02-23 - 2b05f07 - Update Java SDK retry options for poll operations to match Core SDK. (#1989)
2024-02-29 - ad1dabc - SpringBoot - add server-name to mtls config options (#1998)
2024-03-04 - b182d78 - Ignore history events with worker_may_ignore: true. (#2000)
2024-03-05 - 0e4ef15 - Support newer JSON history format (#2001)

v1.22.3

06 Nov 17:54
4745afb
Compare
Choose a tag to compare

Highlights

Bugfixes

  • Fixes a rare bug that could cause the SDK to not fully replay histories on server version pre 1.21
  • Fixes a bug causing workflow task failure if a local activity was scheduled on the same workflow task
    the workflow tried to continue as new.

Changeset

2023-10-25 - 8b3be3b - Don't schedule local activities on a completed workflow (#1908)
2023-10-30 - 2f5fdf1 - Test continue as new in an update (#1917)
2023-10-30 - 503cae7 - Verify history is replayed up to StartedEventId (#1916)
2023-10-30 - 8af4a26 - ReadOnly Exception in update validator fail WFT (#1918)
2023-10-30 - abb1deb - Add proto-google-common-protos to temporal-shaded (#1912)
2023-11-03 - 7077b54 - Add getWorkerTaskReachability API (#1919)
2023-11-06 - 5d1bbbe - Test continue as new with local activities (#1922)

v1.22.2

23 Oct 23:24
9b0dcbb
Compare
Choose a tag to compare

Highlights

Bugfixes

  • Add TemporalChangeVersion search attribute to test server.
  • Fix race condition in test server search attribute.

Changeset

2023-10-23 - 02bb1ad - Fix race condition in test server SA (#1905)

v1.22.1

16 Oct 19:34
111d8ce
Compare
Choose a tag to compare

Highlights

Bugfixes

Add WorkflowContext more consistently in the SDK. WorkflowContext will now also be added in:

  • Memo
  • Last failure
  • Schedules (Note: The workflowId in WorkflowContext may differ on serialization and deserialization.)

(Experimental) Start delay

Added StartDelay option to WorkflowOptions. StartDelay will cause Temporal to wait before dispatching the first workflow task.
If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest
of the delay will be ignored.

Changeset

2023-10-11 - 06ef0df - Add identity to Terminate call (#1894)
2023-10-16 - 4fe296e - Add start delay (#1897)
2023-10-16 - 538508b - Apply data converter context in more places (#1896)

v1.22.0

10 Oct 22:47
cc32472
Compare
Choose a tag to compare

Highlights

Tracing improvements

Improved tracing support in signals, queries, and update.

Bugfixes

  • Fixes a bug where after a server failure a worker could end up only polling on the sticky task queue and
    never poll on the normal task queue
  • Fix caching in WorkflowLocal/WorkflowThreadLocal to match behavior of ThreadLocal
  • Fixes a bug where the SDK would receive a workflow task, but may not run the users Workflow code.

Migration note for SpringBoot users:

Changed the SDK from using ContextStartedEvent to ApplicationReadyEvent to avoid the need to start
application context again after it is already started. See #1837
for more details.

Changeset

2023-08-16 - f922c06 - Fix bug in VersionStateMachine causing wrong version to get returned (#1841)
2023-08-17 - 0f37297 - Remove unbound variable (#1846)
2023-08-19 - c012357 - add WorkflowImplementationOptions customizer (#1835)
2023-08-28 - 4298dad - Reconcile typed search attributes with schedules (#1848)
2023-08-30 - ac474fa - Add new workflow info fields (#1853)
2023-09-07 - 18162b7 - Reset sticky queue backlog on empty response (#1859)
2023-09-25 - 456da32 - Fix null pointer on trigger immediately (#1865)
2023-09-25 - d50d274 - Tracing support improvements (#1819)
2023-09-26 - 717ee05 - Release WF slot on UnableToAcquireLockException (#1871)
2023-09-26 - aa5cb41 - Fix workflow options equality (#1868)
2023-10-02 - 198c780 - Fix caching in WorkflowLocal/WorkflowThreadLocal (#1876) (#1878)
2023-10-02 - 751a0b6 - Expose worker versioning via spring boot autoconfig (#1869)
2023-10-03 - 3670bce - Support Spring Boot 3 native image build (#1877)
2023-10-05 - b083a70 - Disable eager start by default (#1879)
2023-10-10 - 1606de5 - Update Spring Boot to v2.7.12 (#1884)
2023-10-10 - 1fb089f - Avoid incrementing WFT failure metric on respond failure (#1887)
2023-10-10 - 2475838 - Reset lastHandledEventId on speculative WFT (#1881)
2023-10-10 - 720a9cb - Only rely on next page token for pagination (#1886)
2023-10-10 - d5d96f8 - Use ApplicationReadyEvent to start spring workers (#1882)
2023-10-10 - dac53be - Fix build for Linux for aarch64 (#1891)

v1.21.2

27 Sep 16:27
ff90389
Compare
Choose a tag to compare

Highlights

Bugfixes

Fixes a bug where after a server failure a worker could end up only polling on the sticky task queue and
never poll on the normal task queue

Changeset

2023-09-27 - 67a5afb - Remove unbound variable (#1846)
2023-09-27 - d4671e3 - Reset sticky queue backlog on empty response (#1859)
2023-09-27 - d8091d1 - Release WF slot on UnableToAcquireLockException (#1871)

v1.21.1

16 Aug 16:37
73735d2
Compare
Choose a tag to compare

Highlights

Bugfixes

  • Fixes a CRITICAL issue with GetVersion returning the wrong version on replay.
    Upgrade to this version instead of 1.21.0

Changeset

2023-08-04 - 5ce6f10 - Replace interpolated variables (#1834)
2023-08-14 - 622edc0 - Build test server on ubuntu 18 (#1836)
2023-08-16 - f922c06 - Fix bug in VersionStateMachine causing wrong version to get returned (#1841)