Releases: temporalio/sdk-java
v1.21.0
Highlights
Note
Skip this release and use v1.21.1
Bugfixes
- Fixes an issue with versioning in signal handlers leading to non determinism.
- Fixes an issue with ScheduleClient not throwing an exception on a failed create
Readonly Protection
Added protection in the SDK against running mutating workflow functions in a read only context.
A read only context is a query handler, update validator, side effect, or mutable side effect.
Previously, in some cases, the SDK would seem to allow it but silently generate an invalid workflow history.
This change allows developers to quickly catch their mistake and prevents generating invalid workflow histories
Changeset
2023-07-17 - 3be060b - ScheduleClient for SpringBoot (#1816)
2023-07-17 - 6054c31 - Make GetVersion more deterministic (#1807)
2023-07-17 - c5cf7bb - fix(schedule): try catch clause and rethrow StatusRuntimeException that does not match status c… (#1818)
2023-07-21 - 16755a1 - Block mutating workflow state in a read only context (#1821)
2023-07-21 - c2b941a - Add unit test for concurrent WFT (#1822)
2023-08-01 - 3ffe294 - Increase MaxBufferedQueryCount (#1829)
2023-08-01 - bf6ae4b - Fix jacoco code coverage (#1828)
v1.20.1
Highlights
Default implementation for exceptionToFailure and failureToException to fix an unintentional breaking change
in the DataConverter interface.
Changeset
2023-06-27 - 57cb086 - Add support for SDK metadata to test server (#1800)
2023-06-27 - c6aadda - Expose started time in ActivityInfo (#1798)
2023-06-29 - 9a45715 - Generate bom using java-platform plugin (#1796)
2023-07-03 - 15337d9 - Add Semgrep scanning (#1775)
2023-07-10 - 25387be - Add default methods for exceptionToFailure and failureToException (#1809)
2023-07-13 - f30d349 - Add description to bom project (#1813)
v1.20.0
Highlights
Schedules API
This version adds support for the schedule API to help users run workflows periodically.
Note: the following two features will require support from the Temporal server, to be available in release v1.21.0.
Experimental: Worker Versioning
This version adds support for our new Worker Versioning feature. Please note that this feature's API is subject to
change. This feature allows you to assign build identifiers to workers, and ensure that workers operating on a task
queue do not receive tasks that they will be incompatible with. You declare the relative [in]compatibility of build
identifiers. We will be publishing documentation on this feature soon (and these notes will be updated with a link).
Experimental: Workflow Update
This version adds support for Workflow Update. Workflow Update is another way to interact with a running workflow along
with signals and queries. Workflow update combines aspects of signals and queries. Like signals, updates can
mutate workflow state. Like queries, updates can return a value to the caller based on a workflows state.
Changeset
2023-03-30 - 0b7d1b7 - Allow Data Converter code to escape deadlock detection (#1723)
2023-04-12 - 4f91956 - Fix getOriginalExecutionRunId return value and add explicit @nonnull annotations (#1737)
2023-04-19 - 1e49493 - Add comment on Workflow#newQueue (#1747)
2023-04-21 - c1cff1c - Data Converters now have method deserializing all the Payloads at once (#1726)
2023-04-27 - ad27b61 - Add support for sync update (#1749)
2023-04-27 - d5b3e89 - Remove use of deprecated API (#1758)
2023-05-01 - 5ed77f7 - Allow task queue names to use property placeholders (#1760)
2023-05-10 - e354d1f - Add support for update to the Java test server (#1762)
2023-05-16 - 16dc271 - Update README.md (#1765)
2023-05-19 - 1be0cee - Add support for async update (#1766)
2023-05-31 - 18120b1 - Update CODEOWNERS (#1773)
2023-06-07 - a73e9d9 - Issue 1761 fix supplier reuse (#1779)
2023-06-07 - ee2f5d0 - Add update protocol commands (#1780)
2023-06-08 - 0985041 - Add schedules API (#1776)
2023-06-12 - bff4b6f - Typed search attributes (#1782)
2023-06-15 - 94424c8 - Treat UpdateWorkflowExecution as a long poll (#1784)
2023-06-16 - c215a78 - Worker / Build Id versioning (#1786)
2023-06-16 - c30e07d - Do not add accepted/rejected request to messages (#1787)
2023-06-19 - 479cf4b - WorkerOptions extend javadocs for default values (#1774)
2023-06-20 - 55e29ca - Avoid NPE on malformed/truncated failure stack traces (#1795)
v1.19.1
Highlights
Fixes native test server distribution not working correctly if search attributes are used.
JavaSDK users don't need to upgrade to this release until they build their own native test server distribution.
What's Changed
- Fix location of graal descriptors and a missing reflection reference for temporal-sdk module in #1713
v1.19.0
Highlights
- Encoding/encryption of Failures. See
CodecDataConverter#encodeFailureAttributes
- GraalVM descriptors for core modules
- New temporal-shaded module that shades grpc, protobuf, guava
- Eager Workflow Task Dispatch. Requires Temporal Server 1.20+
- Fixes for some overly verbose exception traces in the history
- Experimental
SerializationContext
support inPayloadConverter
andPayloadCodec
What's Changed
- Fix WorkflowHistoryIterator issue with unitialized field by @Spikhalskiy in #1636
- Release v1.18.1 by @Spikhalskiy in #1637
- Add an integration test that covers critical history pagination code by @Spikhalskiy in #1638
- Update protos, use #namespace in register SA request, use old protoc on M1 by @Spikhalskiy in #1625
- Use ByteString.EMPTY in EagerPaginator by @jeffschoner-stripe in #1643
- Fix Eager Activity Dispatch Worker state check, rework states of internal Workers by @Spikhalskiy in #1654
- Implement FailureConverter API by @mjameswh in #1645
- temporal-shaded that includes sdk and testing, shades grpc, protobuf, guava by @Spikhalskiy in #1656
- Fix temporal-shaded packaging type by @Spikhalskiy in #1657
- Don't relocate com.google.gson during shadowing by @Spikhalskiy in #1658
- Provide GraalVM descriptors for temporal-sdk, add docs for users using native-image by @Spikhalskiy in #1660
- Implement nonfirst attempt LA metering changes by @Sushisource in #1659
- Fix WorkflowStub#getExecution returning null after signalWithStart by @Spikhalskiy in #1670
- Fix overly sensitive count checks in la metering test by @Sushisource in #1673
- Update CODEOWNERS to sdk team by @Spikhalskiy in #1675
- Eager Workflow Task Dispatch by @Spikhalskiy in #1674
- Support terminate-if-running workflow ID reuse policy in test server by @jeffschoner-stripe in #1683
- Fix rare deadlock when event loop is triggered after a main thread threw an exception by @Spikhalskiy in #1690
- Provide SerializationContext for PayloadConverter and PayloadCodec by @Spikhalskiy in #1695
- Fix stacktrace cutoff methods initialization by @Spikhalskiy in #1699
- Fix premature triggering of eventLoop in case of activity cancelation before all events from WFT are applied by @Spikhalskiy in #1691
- Wait for worker slots to be fully released in the graceful worker shutdown by @Spikhalskiy in #1679
- Cleanup for release v1.19.0 by @Spikhalskiy in #1701
- Release v1.19.0 by @Spikhalskiy in #1702
Full Changelog: v1.18.0...v1.19.0
v1.18.2
Highlights
Fixes an issue with WorkflowStub#getExecution not returning an execution started by signalWithStart
introduced in v1.18.x
Full Changelog: v1.18.1...v1.18.2
v1.18.1
Highlights
Fixes a CRITICAL issue with an uninitialized issue in the history iterator (#1639)
What's Changed
- Fix WorkflowHistoryIterator issue with unitialized field by @Spikhalskiy in #1636
Full Changelog: v1.18.0...v1.18.1
v1.18.0
🛑 Critical bug. Skip this release and upgrade to v1.18.1 instead.
Highlights
Comprehensive rework of Local Activity Worker implementation
- Local Activities now respect all the timeouts set on
LocalActivityOptions
. - Lower ScheduleToStart latencies for Local Activities and a backpressure that prefers retries over new executions
LocalActivityOptions
gotscheduleToStart
timeout- Bugfix for OpenTelemetry/OpenTracing incorrectly showing exaggerated scheduleToStart latency for Local Activities (#1573)
Spring Boot module
- Spring Boot 3 support
*Options
Customizer beans for fine-grained control over*Options
instances used by Spring Boot- Workers names based configuration to keep Task Queue names contained in the config only
- More wired
WorkflowFactoryOptions
andWorkerOptions
properties - Bugfixes for beans ordering (#1614) and test environment setup (#1622)
New WorkflowClient
methods
WorkflowClient#listExecutions
for fetching and iterating through Workflow Executions based on Visibility QueriesWorkflowClient#fetchHistory
andWorkflowClient#streamHistory
for retrieving Workflow history from the Server to be used in replay or for export.
New WorkflowInfo
metadata available for Workflow code:
WorkflowInfo#getHistoryLength()
WorkflowInfo#getFirstExecutionRunId()
WorkflowInfo#getOriginalExecutionRunId()
Bugfixes
- Query on a stub that was was used for start a workflow now follows chain of runIds (#1612)
- Failures happened in Signal methods are now treated the same way as failures in Workflow methods (#1616)
Migration note
Previously Local Activity Workers didn't respect startToClose
and, in some cases, scheduleToClose
timeouts.
Some users may have LocalActivityOptions
configurations that don't accommodate their actual timings but previously were unenforced.
The enforcement will kick in after an upgrade on v1.18+ and may lead to Local Activity failures that were not happening before.
Users may need to test and adjust their LocalActivityOptions
timeouts before rolling out v1.18+ to production.
Spring Boot: org.springframework.context.ConfigurableApplicationContext.start
lifecycle method needs to be called for workers to auto-start.
What's Changed
- Mass replay API by @Sushisource in #1497
- Add WorkflowInfo#getHistoryLength by @Spikhalskiy in #1498
- Use longer retry interval on RESOURCE_EXHAUSTED by @mjameswh in #1465
- Switch to the latest server in CI/CD by @Spikhalskiy in #1499
- Port a server fix for the last heartbeat time being defaulted to the activity started time by @Spikhalskiy in #1508
- Fix SignalDuringLastWorkflowTaskTest by @Spikhalskiy in #1515
- Revisit Activity Timeouts by @Spikhalskiy in #1514
- Add gatherRuntimeDeps task by @Spikhalskiy in #1517
- Test Environments now respect metricsScope passed in TestEnvironmentOptions and ServiceStubOptions by @Spikhalskiy in #1521
- Add sdk-features ci trigger by @Sushisource in #1520
- The test server now generates a unique taskToken per an activity attempt by @Spikhalskiy in #1524
- More activity timeout failure compliance tests and improvements by @Spikhalskiy in #1525
- Rework Local Activity scheduling by @Spikhalskiy in #1507
- Implement retries of local activities that break local retry threshold by @Spikhalskiy in #1542
- Add generated proto classes info into javadoc jar by @Spikhalskiy in #1534
- Add scheduleToStart timeout to Local Activities by @Spikhalskiy in #1560
- Open WorkflowExecutionHistory as a public class by @Spikhalskiy in #1566
- Fix binary compatibility broken by #1566 by @Spikhalskiy in #1571
- Update C# and Ruby namespace/package for test server protos by @cretz in #1572
- Remove usage of Workflow time from tracing spans by @Spikhalskiy in #1573
- Set heartbeat details for TestActivityEnvironment by @tylercunnion in #1581
- List workflow API by @Spikhalskiy in #1583
- Fail WFT if Local Activity execution experienced an Error by @Spikhalskiy in #1591
- Exposing an ability to fail WorkflowTask for any callback in executor code by @Spikhalskiy in #1589
- Release v1.18.0-RC1 by @Spikhalskiy in #1598
- Rename sdk-features to features by @bergundy in #1599
- Fix grammar mistake and typo by @ManuverGujjar in #1602
- Added ActivityOutput.activityId by @mfateev in #1608
- Add history fetching API by @Spikhalskiy in #1600
- Now query on workflow stub that was was used for start follows runIds by @Spikhalskiy in #1612
- Start Spring Boot workers on the Spring Context Start instead of Refresh by @Spikhalskiy in #1614
- TemporalFailure thrown from Signal method now fails Workflow Execution by @Spikhalskiy in #1616
- Sprint Boot TestWorkflowEnvironment now respects configured MetricsRegistry, Tracer, DataConverter by @Spikhalskiy in #1622
- Add CORS headers to the RDE Server sample implementation by @Spikhalskiy in #1617
- Spring Boot 3 support by @Spikhalskiy in #1620
- Add WorkflowInfo#getFirstExecutionRunId and #getOriginalExecutionRunId by @Spikhalskiy in #1624
- Add auto discovery binding strategy by worker name to Spring Boot by @Spikhalskiy in #1623
- Add TemporalOptionsCustomizer to allow users to modify the options constructed by Spring Boot Auto Configuration by @Spikhalskiy in #1627
- Unregistered Local Activity now fails Workflow Task by @Spikhalskiy in #1628
- Wire some WorkerFactoryOptions and WorkerOptions properties to Spring Boot Configuration by @Spikhalskiy in #1633
New Contributors
- @cretz made their first contribution in #1572
- @bergundy made their first contribution in #1599
- @ManuverGujjar made their first contribution in #1602
Full Changelog: v1.17.0...v1.18.0
v1.18.0-RC1
Highlights
v1.18 release will bring a comprehensive rework of Local Activity Worker implementation
- Local Activities now respect all the timeouts set on
LocalActivityOptions
. - Lower ScheduleToStart latencies for Local Activities and a backpressure that prefers retries over new executions
LocalActivityOptions
gotscheduleToStart
timeout
Migration note:
Previously Local Activity Workers didn't respect startToClose
and, in some cases, scheduleToClose
timeouts.
Some users may have LocalActivityOptions
configurations that don't accommodate their actual timings but previously were unenforced.
The enforcement will kick in after an upgrade on v1.18+ and may lead to Local Activity failures that were not happening before.
Users may need to test and adjust their LocalActivityOptions
timeouts before rolling out v1.18+ to production.
What's Changed
- Mass replay API by @Sushisource in #1497
- Add WorkflowInfo#getHistoryLength by @Spikhalskiy in #1498
- Use longer retry interval on RESOURCE_EXHAUSTED by @mjameswh in #1465
- Switch to the latest server in CI/CD by @Spikhalskiy in #1499
- Port a server fix for the last heartbeat time being defaulted to the activity started time by @Spikhalskiy in #1508
- Fix SignalDuringLastWorkflowTaskTest by @Spikhalskiy in #1515
- Revisit Activity Timeouts by @Spikhalskiy in #1514
- Add gatherRuntimeDeps task by @Spikhalskiy in #1517
- Test Environments now respect metricsScope passed in TestEnvironmentOptions and ServiceStubOptions by @Spikhalskiy in #1521
- Add sdk-features ci trigger by @Sushisource in #1520
- The test server now generates a unique taskToken per an activity attempt by @Spikhalskiy in #1524
- More activity timeout failure compliance tests and improvements by @Spikhalskiy in #1525
- Rework Local Activity scheduling by @Spikhalskiy in #1507
- Implement retries of local activities that break local retry threshold by @Spikhalskiy in #1542
- Add generated proto classes info into javadoc jar by @Spikhalskiy in #1534
- Add scheduleToStart timeout to Local Activities by @Spikhalskiy in #1560
- Open WorkflowExecutionHistory as a public class by @Spikhalskiy in #1566
- Fix binary compatibility broken by #1566 by @Spikhalskiy in #1571
- Update C# and Ruby namespace/package for test server protos by @cretz in #1572
- Remove usage of Workflow time from tracing spans by @Spikhalskiy in #1573
- Set heartbeat details for TestActivityEnvironment by @tylercunnion in #1581
- List workflow API by @Spikhalskiy in #1583
- Fail WFT if Local Activity execution experienced an Error by @Spikhalskiy in #1591
- Exposing an ability to fail WorkflowTask for any callback in executor code by @Spikhalskiy in #1589
- Release v1.18.0-RC1 by @Spikhalskiy in #1598
New Contributors
Full Changelog: v1.17.0...v1.18.0-RC1
v1.17.0
Highlights
This release brings a lot of performance improvements for high throughput scenarios.
Eager Activity Dispatch is added. This feature requires Temporal Server 1.19+ and is not effective on earlier releases.
What's Changed
- Port config of default Jackson timestamp deserialization to kotlin by @Spikhalskiy in #1388
- Align Test Server behavior with the real one if completion command is not the last by @Spikhalskiy in #1399
- Test Server doesn't reset sticky queue if timeout fired for an outdated workflow task by @Spikhalskiy in #1401
- Set larger maxInboundMetadataSize to accommodate unbounded Server error messages by @Spikhalskiy in #1397
- History iteration should never ever fail a workflow execution by @Spikhalskiy in #1404
- Fix guard clause to allow passing key and cert chain as strings by @yassineb in #1409
- Deprecate addWorkflowImplementationFactory and give a register* alternative with an expected contract by @Spikhalskiy in #1410
- Reduce threads churn by increasing pool timeouts by @Spikhalskiy in #1418
- Reduce contention on workflow cache by @Spikhalskiy in #1419
- Provide task queue kind in long polls for workflow tasks by @Spikhalskiy in #1420
- Rework workflow threads reporting from using blocking ThreadPoolExecutor#getActiveThreads by @Spikhalskiy in #1421
- Each worker now has its own sticky task queue by @Spikhalskiy in #1423
- Implement executor slots reservation for workflow tasks by @Spikhalskiy in #1431
- Reduce eagerly executed work needed to create an ActivityStub by @Spikhalskiy in #1434
- Rework some reflection out of Test Server to help Graal by @Spikhalskiy in #1435
- Optimize unneeded string concatenation by @Spikhalskiy in #1433
- Reduce deterministic runner lock reentrance by @Spikhalskiy in #1436
- Implement dynamic sticky queue polling based on the reported backlog by @Spikhalskiy in #1438
- Fix MTLS configuration in spring boot autoconfiguration by @yassineb in #1441
- Upgrade dependencies by @Spikhalskiy in #1446
- Add support for Eager Activity Dispatch by @mjameswh in #1439
- SDK doesn't allow a single WorkflowTask poller and forces the value to '2' if specified by @Spikhalskiy in #1451
- Fix leaking Eager Activity Reservation by @Spikhalskiy in #1452
- Refactor WorkflowWorker to put eager activity dispatch in the right place by @Spikhalskiy in #1453
- Rework WorkflowExecutorCache to remove a global lock by @Spikhalskiy in #1454
- Limit eager activity dispatch for one workflow task completion by @Spikhalskiy in #1455
- testing module now brings json-path as a transitive dependency by @Spikhalskiy in #1450
- Update API protos to 1.12 by @Spikhalskiy in #1461
- Release v1.17.0-RC1 by @Spikhalskiy in #1462
- Fix incorrect handling of -RC suffix in version by @mjameswh in #1466
- Add diagnostic output for flaky taskTimeoutWillRescheduleTheTaskOnTheGlobalList by @Spikhalskiy in #1468
- Cleanup WorkflowExecutorCache by @Spikhalskiy in #1478
- Don't use BackoffThrottler in multithread contexts by @mjameswh in #1467
- Dependency updates and spring-boot-starter pom fix for Maven by @Spikhalskiy in #1480
- Upgrade CI docker images from openjdk to eclipse-temurin by @Spikhalskiy in #1492
- Pre-release cleanup by @Spikhalskiy in #1495
- Release v1.17.0 by @Spikhalskiy in #1496
New Contributors
Full Changelog: v1.16.0...v1.17.0