Releases: temporalio/sdk-typescript
1.11.5
Noteworthy Changes
-
Normalize construction of user facing enums (#1534)
All user-facing enums have been revisited to be more in line with usual TypeScript conventions, rather than sticking to Temporal's Protobuf enum definitions.
In short, that means:
- No more redundant prefixes on enum values;
- No more
UNSPECIFIED
values β TypeScript'sundefined
already means that; - Enum types are now string unions, and users may choose to provide the string value directly.
For example:
await startChild(sleep, { - parentClosePolicy: ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON, + parentClosePolicy: ParentClosePolicy.ABANDON, /* or even */ + parentClosePolicy: 'ABANDON', });
Built-time compatibility is preserved for enum values that existed before. For example, code using
ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON
will still compile, but a deprecation will be reported.π₯ Compile-time backward compatibility is only preserved for enums that were imported from user facing packages, such as
@temporalio/common
,@temporalio/client
and@temporalio/workflow
. Enum definitions imported directly from the@temporalio/proto
package may no longer compile.
Features
-
Add experimental support for user-implementable Slot Supplier. (#1553, temporalio/sdk-core#838, temporalio/sdk-core#842)
-
Add support for Workflow ID conflict policy. (#1490)
-
Expose classes
TextEncoder
andTextDecoder
inside of the Workflow sandbox. (#1562, kudo to @lukeramsden) -
The OpenTelemetry Interceptor now adds correlation metadata on emitted logs from Workflow and Activity context loggers. (#1565)
-
The OpenTelemetry Interceptor now passes the tracing metadata on signals. (#1449, kudo to @iravid)
-
[
client
] Add utility functionsisGrpcDeadlineError
andisGrpcCancelledError
. (#1548)
Bug Fixes
-
[
worker
] Fix memory leak on non-existant activity (#1563) -
[
activity
] Abort reason is now an instance ofCancellationFailure
(#1561, kudo to @ikonst) -
[
worker
] Ensure Resource Tuner always hand out a minimum of one slot for sticky and not sticky Workflow Task pollers (temporalio/sdk-core#835)
Docs
Miscellaneous Tasks
1.11.4
1.11.3
Bug Fixes
- [
worker
] Gracefully shut down Worker on unexpected errors (#1539) - [
worker
] Avoid a spurious error if Worker receives SIGINT while already shutting down (#1547)
Features
- [
Schedule
] Support query for listing schedules (#1535, Kudos to @nikhilbhatia08 π) - [
client
] :test: Add experimental support for Cloud Operations API (#1538)
1.11.2
Important β οΈ β οΈ β οΈ
- This release fixes a bug in 1.11.0 and 1.11.1 that may result in Workflows failing to replay with the very same code.
We urge users who are already using v1.11.0 or v1.11.1 to promptly upgrade to this release.
Bug Fixes
- [
workflow
] Workflow Activation Encoder was discarding SDK flags (#1530) - [
core
] Respect gRPC timeouts on get wf execution history (temporalio/sdk-core#812) - [
core
] Attempt to address unusal rpc cancellation error (temporalio/sdk-core#811) - [
core
] Fix legacy query failure replying (temporalio/sdk-core#809) - [
core
] Fix possible NDEs caused by LAs & immediate cancels resolving in different order upon replay (temporalio/sdk-core#808) - [
workflow
] Fix potential incoherencies in Workflow Activation Jobs ordering (#1513, temporalio/sdk-core#789) - [
core
] Include Search Attribute updates made in-workflow when continuing as new (temporalio/sdk-core#797) - [
core
] Add basic validation on Activity Tasks (temporalio/sdk-core#795) - [
core
] Do not send queries after we would fail WFT (temporalio/sdk-core#792)
Dependencies
Thanks
- Thanks to Ilya Priven for multiple docs improvements (#1507, #1525, #1527, #1524).
1.11.1
1.11.0
Bug Fixes
- Fix flakes in Worker Tuner and Workflow Update tests (#1463)
- [
workflow
] Don't propagate cancellation from non-cancellable scopes to children (#1429) - [
worker
] Don't fail Worker on Activity Task decode failures (port from #1473) (#1477) - [
ci
] Enable file-based persistence on dev server for stress tests (#1480) - [
workflow
] Fix cancel-before-started abandon activity (#1487) - [
doc
] Docs were no longer being built and deployed in CI (#1494) - [
workflow
] Process all activation jobs as a single batch (#1488)
Documentation
- Clarify some drawbacks of ephemeral servers, and other minor fixes (#1478)
Features
Resource-based Worker Auto-tuning (EXPERIMENTAL)
Experimental support for worker tuning has been added along with an implementation for auto-tuning based on available
resources. WorkerOptions
now has a tuner
field that can be set to a WorkerTuner
. This is composed of SlotSupplier
s, of which currently FixedSize
and ResourceBased
are available. ResourceBased
tuners change the number of available slots dynamically based on resource usage. For some examples of initializing the worker tuner, see here.
At some point the SlotSupplier
interface will be manually implementable, but only fixed-size and resource-based slot suppliers are currently supported. Custom slot suppliers will appear in the future.
This SDK API is experimental and may change in incompatible ways in the future.
- [
workflow
] Unify GRPC::CANCELED and DEADLINE_EXCEEDED in an SDK Timeout exception for Update (#1452) - [
workflow
] Expose updateId to update handlers (#1450) - [
workflow
] Add upsert memo command (#1321)
Miscellaneous Tasks
- Bump GHA runner for stress tests (#1492)
Client
- Make gRPC INTERNAL status retryable (#1455)
1.10.3
1.10.2
1.10.1
1.10.0
Important updates
-
π₯ Support for Node.js 14 and older GLIBC releases has been dropped. As announced previously, TS SDK v1.9 was the last minor release to support Node.js 14.
Going forward, the TypeScript SDK requires:
- Node.js 16.15 or more recent;
- GLIBC 2.35 or more recent (update: we restored compatibility with GLIBC 2.18 in v1.10.1)
-
π₯ Support for Node.js 16 will soon be dropped. TS SDK v1.10 will be the last minor release to support Node.js 16. TS SDK v1.11 will require Node 18 or higher.
Node.js 14 officially reached end-of-life on April 30th, 2023, and Node.js 16 reached end-of-life on September 11th, 2023 (see Node.js release schedule). We strongly encourage everyone to take immediate action in updating their deployments to supported versions of Node.js to ensure continued compatibility and receive the latest features and security updates.
Features
-
[
client
] BothConnection
andNativeConnection
now accept anapiKey
option, making it easier to connect to Temporal Cloud and other Temporal servers that use bearer token authentication (#1385), as well as HTTP CONNECT Proxy (#1411, thanks to @brendan-myers for his help on getting this started π). -
[
client
] Thestartdelay
Workflow option is no longer experimental (#1379). Thanks @tlafano π. -
[
core
] Core can now be configured to emit duration metrics as either seconds or milliseconds, as well as to include unit suffixes in metric names (#1383). -
[
worker
] AddtaskQueue
andlogSource
metadata attributes on all log messages emitted inside the context of a worker. These attributes are there make is easier to diagnose some low level issues, as well as allow implementing fine-grained filtering of messages (eg. show DEBUG level messages for user-code, but only WARN for messages from the worker) (#1391).
Bug Fixes
-
[
client
] Bring gRPC retry options in line with other SDKs (#1368). Thanks to @chronos-tachyon π. -
[
worker
] Unreference timer created inparseWorkflowCode
(#1370). Thanks @jhecking π. -
On POSIX systems,
stdout
andstderr
are now properly inherited by ephemeral servers (e.g.TestWorkflowEnvironment.createLocal()
andTestWorkflowEnvironment.createTimeSkipping()
), making it easier to diagnose issues while creating a test environment (#1394). -
@grpc/grpc-js
has been updated to 1.10.x (#1388). It had previously been pinned to 1.7.3 to avoid multiple bugs and incompatibilities introduced ingrpc-js
1.8.0. We have since reviewed these changes and confirmed that there is no longer any reason to refrain form updating that dependency. -
bundler
: Webpack output is now recorded as a single log entry, and color are disabled if output is not being sent to the console (#1414). Thanks @ikonst π. -
MockActivityEnvironment
no longer causes initialization of theRuntime
(#1401). -
[
common
] Improve error messages forfailureConverters
(#1373). -
[
doc
] Fix comment on defaultmaxConcurrentActivityTaskPolls
value (#1374) Thanks @taonic π.