Files
effect/packages/cluster/CHANGELOG.md
T
effect-botandgithub-actions[bot] 417e0faa80 Version Packages (v3) (#6466)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-30 16:17:27 +12:00

137 KiB

@effect/cluster

0.60.1

Patch Changes

0.60.0

Patch Changes

0.59.0

Minor Changes

  • #6255 26e1922 Thanks @tim-smart! - Backport cluster shard group fixes: use available shard groups for SQL advisory lock numbering and route workflow durable clock/deferred messages through the owning workflow shard group.

Patch Changes

0.58.3

Patch Changes

  • #6217 54e61b3 Thanks @tim-smart! - Allow Kubernetes pod condition lastTransitionTime values to be null.

0.58.2

Patch Changes

0.58.1

Patch Changes

0.58.0

Patch Changes

0.57.0

Patch Changes

0.56.4

Patch Changes

0.56.3

Patch Changes

0.56.2

Patch Changes

  • #6031 1781244 Thanks @tim-smart! - backport effect v4 MessageStorage improvements

0.56.1

Patch Changes

  • #5946 e88f289 Thanks @vic-mo! - Fix HttpRunner double-slash routing

0.56.0

Patch Changes

0.55.0

Patch Changes

0.54.0

Patch Changes

  • #5827 7bd4e82 Thanks @tim-smart! - add TestRunner & SingleRunner modules

    • TestRunner allows you to run a in-memory cluster for testing purposes.
    • SingleRunner allows you to run a single node cluster simple deployment scenarios.
      • Message storage is backed by a SQL database
      • Multiple nodes are not supported
  • Updated dependencies [7bd4e82]:

0.53.6

Patch Changes

0.53.5

Patch Changes

  • #5785 47bf3d2 Thanks @tim-smart! - immediately set entity keep alive in EntityResource

0.53.4

Patch Changes

  • #5783 8b879fb Thanks @tim-smart! - add EntityResource.makeK8sPod

0.53.3

Patch Changes

  • #5781 df69cb5 Thanks @tim-smart! - provide seperate close scope to EntityResource via context

0.53.2

Patch Changes

  • #5778 af7916a Thanks @tim-smart! - fix postgres unprocessed message ordering

  • #5778 af7916a Thanks @tim-smart! - add @effect/cluster EntityResource module

    A EntityResource is a resource that can be acquired inside a cluster entity, which will keep the entity alive even across restarts.

    The resource will only be fully released when the idle time to live is reached, or when the close effect is called.

    By default, the idleTimeToLive is infinite, meaning the resource will only be released when close is called.

    import { Entity, EntityResource } from "@effect/cluster"
    import { Rpc } from "@effect/rpc"
    import { Effect } from "effect"
    
    const EntityA = Entity.make("EntityA", [Rpc.make("method")])
    
    export const EntityALayer = EntityA.toLayer(
      Effect.gen(function* () {
        // When the entity receives a message, it will first acquire the resource
        //
        // If the entity restarts, the resource will be re-acquired in the new
        // instance.
        //
        // It will only be released when the idle TTL is reached, or when the
        // `close` effect is called.
        const resource = yield* EntityResource.make({
          acquire: Effect.acquireRelease(
            Effect.logInfo("Acquiring Entity resource"),
            () => Effect.logInfo("Releasing Entity resource")
          ),
          // If the resource is not used for 10 minutes, it will be released and the
          // entity will be allowed to shut down.
          idleTimeToLive: "10 minutes"
        })
    
        return EntityA.of({
          method: Effect.fnUntraced(function* () {
            yield* Effect.logInfo("EntityA.method called")
            // To access the resource, use `resource.get` inside an Effect.scoped
            yield* resource.get
          }, Effect.scoped)
        })
      }),
      {
        // After the resource is released, if the entity is not used for 1 minute,
        // the entity will be shut down.
        maxIdleTime: "1 minute"
      }
    )
    
  • Updated dependencies [af7916a]:

0.53.1

Patch Changes

  • #5775 b92632d Thanks @tim-smart! - ensure ClusterCron's can be resumed if re-added

0.53.0

Patch Changes

0.52.11

Patch Changes

  • #5765 f38c215 Thanks @tim-smart! - add entityRegistrationTimeout to ShardingConfig

0.52.10

Patch Changes

  • #5748 b93fc63 Thanks @tim-smart! - don't resume parent workflow when suspending on failure

0.52.9

Patch Changes

  • #5726 d34476e Thanks @tim-smart! - support and test against vitess for SqlRunnerStorage

0.52.8

Patch Changes

  • #5719 3689a18 Thanks @tim-smart! - re-use resume parent messages for child workflows

0.52.7

Patch Changes

0.52.6

Patch Changes

  • #5705 84d22eb Thanks @tim-smart! - use FiberMap to release shards concurrently

  • #5705 84d22eb Thanks @tim-smart! - if a shard lock fails to release, release all locks

0.52.5

Patch Changes

0.52.4

Patch Changes

  • #5701 c00268d Thanks @tim-smart! - add timeout to pg lock queries

0.52.3

Patch Changes

  • #5698 19e14ec Thanks @tim-smart! - add premptiveShutdown option to ShardingConfig

0.52.2

Patch Changes

0.52.1

Patch Changes

  • #5693 c7e572c Thanks @tim-smart! - change workflow re-registration defect to a warning

0.52.0

Patch Changes

0.51.0

Minor Changes

  • #5606 24a1685 Thanks @tim-smart! - backport @effect/cluster from effect v4

    @effect/cluster no longer requires a Shard Manager, and instead relies on the RunnerStorage service to track runner state.

    To migrate, remove any Shard Manager deployments and use the updated layers in @effect/platform-node or @effect/platform-bun.

    Breaking Changes

    • ShardManager module has been removed
    • EntityNotManagedByRunner error has been removed
    • Shard locks now use database advisory locks, which requires stable sessions for database connections. This means load balancers or proxies that rotate connections may cause issues.
    • @effect/platform-node/NodeClusterSocketRunner is now @effect/cluster/NodeClusterSocket
    • @effect/platform-node/NodeClusterHttpRunner is now @effect/cluster/NodeClusterHttp
    • @effect/platform-bun/BunClusterSocketRunner is now @effect/cluster/BunClusterSocket
    • @effect/platform-bun/BunClusterHttpRunner is now @effect/cluster/BunClusterHttp

    New Features

    • RunnerHealth.layerK8s has been added, which uses the Kubernetes API to track runner health and liveness. To use it, you will need a service account with permissions to read pod information.

Patch Changes

0.50.6

Patch Changes

0.50.5

Patch Changes

0.50.4

Patch Changes

  • #5618 d2140c1 Thanks @tim-smart! - don't restart an entity during shutdown

0.50.3

Patch Changes

0.50.2

Patch Changes

0.50.1

Patch Changes

0.50.0

Patch Changes

0.49.6

Patch Changes

0.49.5

Patch Changes

0.49.4

Patch Changes

0.49.3

Patch Changes

  • #5563 fc7e32a Thanks @tim-smart! - prevent EntityNotAssigned when sending to local runner

0.49.2

Patch Changes

  • #5561 1a9e601 Thanks @tim-smart! - optimize SqlShardStorage queries

0.49.1

Patch Changes

  • #5557 978b6ff Thanks @tim-smart! - allow NodeSocket.makeNet open to be interrupted

0.49.0

Patch Changes

0.48.16

Patch Changes

  • #5543 2b9db9e Thanks @tim-smart! - propagate workflow interruption to unfinished children

  • Updated dependencies [2b9db9e]:

    • @effect/workflow@0.9.6

0.48.15

Patch Changes

0.48.14

Patch Changes

  • #5529 d9c8bce Thanks @tim-smart! - catch interruptions in Sharding storage loop

0.48.13

Patch Changes

0.48.12

Patch Changes

  • #5525 7edc074 Thanks @tim-smart! - backport ClusterWorkflowEngine partial entity clients

0.48.11

Patch Changes

  • #5519 92c533f Thanks @tim-smart! - improve SqlMessageStorage insert queries

0.48.10

Patch Changes

0.48.9

Patch Changes

  • #5512 934c1d9 Thanks @tim-smart! - backport active shard latch changes from effect 4

0.48.8

Patch Changes

  • #5510 c2fed22 Thanks @tim-smart! - re-add two phase runner health check

0.48.7

Patch Changes

  • #5505 1c4b6ae Thanks @tim-smart! - ensure ShardManager and Runner get fresh versions of the rpc protocol

  • #5508 26d1267 Thanks @tim-smart! - ensure runner detects when it has been externally unregistered

0.48.6

Patch Changes

  • #5501 a874567 Thanks @tim-smart! - don't remove entities from map on shutdown

0.48.5

Patch Changes

  • #5486 85a60a0 Thanks @tim-smart! - add Workflow.poll api

  • Updated dependencies [85a60a0]:

    • @effect/workflow@0.9.4

0.48.4

Patch Changes

0.48.3

Patch Changes

  • #5472 fb00cd6 Thanks @tim-smart! - ensure defects don't cause loops in ClusterCron

0.48.2

Patch Changes

  • #5415 4cb3af5 Thanks @tim-smart! - fix rpc msgpack serialization when chunk contains partial frames

  • Updated dependencies [4cb3af5]:

0.48.1

Patch Changes

  • #5394 59547d9 Thanks @tim-smart! - add DurableDeferred.withActivityAttempt, for scoping it to the current activity run

  • Updated dependencies [59547d9]:

    • @effect/workflow@0.9.1

0.48.0

Patch Changes

0.47.0

Minor Changes

  • #5358 a949539 Thanks @tim-smart! - improve RunnerHealth by detecting if Runner is connected to the host

Patch Changes

0.46.4

Patch Changes

0.46.3

Patch Changes

  • #5345 58d56d5 Thanks @tim-smart! - increase size of entity_type on cluster_messages table

  • #5345 58d56d5 Thanks @tim-smart! - log defects in Entity & Workflow proxy for HttpApi endpoints

  • Updated dependencies [58d56d5]:

    • @effect/workflow@0.8.2

0.46.2

Patch Changes

  • #5297 eedbab5 Thanks @tim-smart! - Remove retry from ClusterCron in favour of user supplied retry

0.46.1

Patch Changes

  • #5283 de92b1c Thanks @tim-smart! - disable tracing for ClusterCron client to disconnect parent span

0.46.0

Patch Changes

0.45.0

Patch Changes

0.44.0

Patch Changes

0.43.1

Patch Changes

  • #5232 4ffbd67 Thanks @tim-smart! - retry RunnerHealth ping to relax down conditions

0.43.0

Patch Changes

0.42.0

Patch Changes

0.41.18

Patch Changes

0.41.17

Patch Changes

  • #5196 56b33c3 Thanks @tim-smart! - add discard methods to cluster EntityProxy's

0.41.16

Patch Changes

0.41.15

Patch Changes

0.41.14

Patch Changes

0.41.13

Patch Changes

0.41.12

Patch Changes

0.41.11

Patch Changes

0.41.10

Patch Changes

0.41.9

Patch Changes

0.41.8

Patch Changes

0.41.7

Patch Changes

  • #5140 b01d2e0 Thanks @tim-smart! - remove dynamic cluster metrics that could cause memory leaks

0.41.6

Patch Changes

0.41.5

Patch Changes

0.41.4

Patch Changes

0.41.3

Patch Changes

0.41.2

Patch Changes

0.41.1

Patch Changes

  • #5091 d5fd2c1 Thanks @tim-smart! - fix unwrapping of DurableDeferred results

  • #5089 9d189d7 Thanks @tim-smart! - propagate fiber refs to workflow activities

0.41.0

Minor Changes

  • #5086 867919c Thanks @tim-smart! - add Type generic to cluster entities

Patch Changes

0.40.0

Patch Changes

0.39.5

Patch Changes

  • #5070 ff90206 Thanks @tim-smart! - use FIFO queue for shard assignment, to reduce churn

0.39.4

Patch Changes

0.39.3

Patch Changes

0.39.2

Patch Changes

0.39.1

Patch Changes

0.39.0

Patch Changes

0.38.16

Patch Changes

0.38.15

Patch Changes

0.38.14

Patch Changes

0.38.13

Patch Changes

0.38.12

Patch Changes

0.38.11

Patch Changes

  • #5017 cc283b9 Thanks @tim-smart! - add more spans to ClusterWorkflowEngine

  • Updated dependencies [d350176]:

    • @effect/workflow@0.1.9

0.38.10

Patch Changes

0.38.9

Patch Changes

0.38.8

Patch Changes

  • Updated dependencies [2a9a0ef]:
    • @effect/workflow@0.1.6

0.38.7

Patch Changes

  • #4999 22166f8 Thanks @tim-smart! - make registerEntity a no-op on clientOnly cluster

0.38.6

Patch Changes

0.38.5

Patch Changes

0.38.4

Patch Changes

  • #4984 7e59d0e Thanks @tim-smart! - expose Sharding.pollStorage api

0.38.3

Patch Changes

0.38.2

Patch Changes

0.38.1

Patch Changes

  • #4973 612c739 Thanks @tim-smart! - ignore runners that cannot be parsed

0.38.0

Minor Changes

  • #4969 3086405 Thanks @tim-smart! - add shard groups, to allow entities to target specific runners

    If you need to migrate an existing cluster, you can run the following PostgreSQL queries:

    ALTER TABLE cluster_messages
      ALTER COLUMN shard_id TYPE VARCHAR(50) USING format('default:%s', shard_id);
    
    ALTER TABLE cluster_shards
      ALTER COLUMN shard_id TYPE VARCHAR(50) USING format('default:%s', shard_id);
    
    ALTER TABLE cluster_locks
      ALTER COLUMN shard_id TYPE VARCHAR(50) USING format('default:%s', shard_id);
    

    To use shard groups, you can add a ShardGroup annotation when creating an entity. You can then assign shard groups to specific runners in your layer setup:

    import { ClusterSchema, Entity } from "@effect/cluster"
    import {
      NodeClusterRunnerSocket,
      NodeClusterShardManagerSocket
    } from "@effect/platform-node"
    import { Rpc } from "@effect/rpc"
    import { Schema } from "effect"
    
    const Counter = Entity.make("Counter", [
      Rpc.make("Increment", {
        payload: { id: Schema.String, amount: Schema.Number },
        primaryKey: ({ id }) => id,
        success: Schema.Number
      })
    ])
      .annotate(ClusterSchema.ShardGroup, (_entityId) => "someGroupName")
      .annotateRpcs(ClusterSchema.Persisted, true)
    
    // Assign the shard group to a specific runner in your layer setup.
    //
    // Make sure to include the "default" shard group, if you want to run entities
    // without a specific group.
    //
    NodeClusterRunnerSocket.layer({
      shardingConfig: {
        shardGroups: ["default", "someGroupName"]
      }
    })
    

Patch Changes

0.37.2

Patch Changes

  • #4958 6dfbae9 Thanks @tim-smart! - ensure Workflow.interrupt triggers compensation

  • Updated dependencies [b8aec45, b8aec45]:

    • @effect/workflow@0.1.2

0.37.1

Patch Changes

  • Updated dependencies [fd60c73]:
    • @effect/workflow@0.1.1

0.37.0

Patch Changes

0.36.3

Patch Changes

0.36.2

Patch Changes

0.36.1

Patch Changes

0.36.0

Patch Changes

0.35.0

Patch Changes

0.34.5

Patch Changes

0.34.4

Patch Changes

0.34.3

Patch Changes

0.34.2

Patch Changes

0.34.1

Patch Changes

0.34.0

Minor Changes

  • #4883 eaf8405 Thanks @tim-smart! - add EntityNotAssignedToRunner error

Patch Changes

0.33.3

Patch Changes

0.33.2

Patch Changes

0.33.1

Patch Changes

0.33.0

Patch Changes

0.32.0

Patch Changes

0.31.1

Patch Changes

0.31.0

Patch Changes

0.30.11

Patch Changes

0.30.10

Patch Changes

0.30.9

Patch Changes

  • #4829 2d55bc5 Thanks @tim-smart! - sending persisted messages without MessageStorage is now a defect

0.30.8

Patch Changes

  • #4825 1b30f61 Thanks @tim-smart! - ensure clientOnly mode without storage falls back to network messaging

0.30.7

Patch Changes

0.30.6

Patch Changes

0.30.5

Patch Changes

0.30.4

Patch Changes

0.30.3

Patch Changes

0.30.2

Patch Changes

0.30.1

Patch Changes

0.30.0

Patch Changes

0.29.22

Patch Changes

0.29.21

Patch Changes

0.29.20

Patch Changes

0.29.19

Patch Changes

0.29.18

Patch Changes

0.29.17

Patch Changes

0.29.16

Patch Changes

  • #4719 a79b732 Thanks @tim-smart! - expire shard locks after 15 seconds

  • #4719 a79b732 Thanks @tim-smart! - ensure more persisted messages are eligible for the fast path

0.29.15

Patch Changes

  • #4714 6966708 Thanks @tim-smart! - reset shard last_read on acquistion

0.29.14

Patch Changes

  • #4712 da21953 Thanks @tim-smart! - attempt to use network for persisted messages where possible

0.29.13

Patch Changes

0.29.12

Patch Changes

0.29.11

Patch Changes

0.29.10

Patch Changes

0.29.9

Patch Changes

0.29.8

Patch Changes

0.29.7

Patch Changes

0.29.6

Patch Changes

0.29.5

Patch Changes

0.29.4

Patch Changes

0.29.3

Patch Changes

  • #4637 18a7936 Thanks @tim-smart! - fix clientOnly mode for SocketRunner

0.29.2

Patch Changes

  • #4626 3a99a2d Thanks @tim-smart! - add Sharding.activeEntityCount

0.29.1

Patch Changes

0.29.0

Minor Changes

  • #4469 3131f8f Thanks @tim-smart! - refactor of @effect/cluster packages

Patch Changes

0.28.4

Patch Changes

0.28.3

Patch Changes

0.28.2

Patch Changes

0.28.1

Patch Changes

0.28.0

Patch Changes

0.27.1

Patch Changes

0.27.0

Patch Changes

0.26.7

Patch Changes

0.26.6

Patch Changes

0.26.5

Patch Changes

0.26.4

Patch Changes

0.26.3

Patch Changes

0.26.2

Patch Changes

0.26.1

Patch Changes

0.26.0

Patch Changes

0.25.1

Patch Changes

0.25.0

Patch Changes

0.24.4

Patch Changes

0.24.3

Patch Changes

0.24.2

Patch Changes

0.24.1

Patch Changes

0.24.0

Patch Changes

0.23.0

Patch Changes

0.22.1

Patch Changes

0.22.0

Patch Changes

0.21.2

Patch Changes

0.21.1

Patch Changes

0.21.0

Patch Changes

0.20.3

Patch Changes

0.20.2

Patch Changes

0.20.1

Patch Changes

0.20.0

Patch Changes

0.19.3

Patch Changes

0.19.2

Patch Changes

0.19.1

Patch Changes

0.19.0

Patch Changes

0.18.7

Patch Changes

0.18.6

Patch Changes

0.18.5

Patch Changes

0.18.4

Patch Changes

0.18.3

Patch Changes

0.18.2

Patch Changes

0.18.1

Patch Changes

0.18.0

Patch Changes

0.17.4

Patch Changes

0.17.3

Patch Changes

0.17.2

Patch Changes

0.17.1

Patch Changes

0.17.0

Patch Changes

0.16.12

Patch Changes

0.16.11

Patch Changes

0.16.10

Patch Changes

0.16.9

Patch Changes

0.16.8

Patch Changes

0.16.7

Patch Changes

0.16.6

Patch Changes

0.16.5

Patch Changes

0.16.4

Patch Changes

0.16.3

Patch Changes

0.16.2

Patch Changes

0.16.1

Patch Changes

0.16.0

Patch Changes

0.15.0

Patch Changes

0.14.16

Patch Changes

0.14.15

Patch Changes

0.14.14

Patch Changes

0.14.13

Patch Changes

0.14.12

Patch Changes

0.14.11

Patch Changes

0.14.10

Patch Changes

0.14.9

Patch Changes

0.14.8

Patch Changes

0.14.7

Patch Changes

0.14.6

Patch Changes

0.14.5

Patch Changes

0.14.4

Patch Changes

0.14.3

Patch Changes

0.14.2

Patch Changes

0.14.1

Patch Changes

0.14.0

Patch Changes

0.13.0

Patch Changes

0.12.6

Patch Changes

0.12.5

Patch Changes

0.12.4

Patch Changes

0.12.3

Patch Changes

0.12.2

Patch Changes

0.12.1

Patch Changes

0.12.0

Patch Changes

0.11.1

Patch Changes

0.11.0

Patch Changes

0.10.1

Patch Changes

0.10.0

Patch Changes

0.9.4

Patch Changes

0.9.3

Patch Changes

0.9.2

Patch Changes

0.9.1

Patch Changes

0.9.0

Patch Changes

0.8.6

Patch Changes

0.8.5

Patch Changes

0.8.4

Patch Changes

0.8.3

Patch Changes

0.8.2

Patch Changes

0.8.1

Patch Changes

0.8.0

Patch Changes

0.7.3

Patch Changes

0.7.2

Patch Changes

0.7.1

Patch Changes

0.7.0

Patch Changes

0.6.4

Patch Changes

0.6.3

Patch Changes

0.6.2

Patch Changes

0.6.1

Patch Changes

0.6.0

Patch Changes

0.5.7

Patch Changes

0.5.6

Patch Changes

0.5.5

Patch Changes

0.5.4

Patch Changes

0.5.3

Patch Changes

  • Updated dependencies [c3446d3]:
    • @effect/sql@0.9.3

0.5.2

Patch Changes

  • Updated dependencies [cfcfbdf]:
    • @effect/sql@0.9.2

0.5.1

Patch Changes

0.5.0

Patch Changes

0.4.7

Patch Changes

0.4.6

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.8.6

0.4.5

Patch Changes

0.4.4

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.8.4

0.4.3

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.8.3

0.4.2

Patch Changes

0.4.1

Patch Changes

0.4.0

Patch Changes

  • Updated dependencies [42d0706]:
    • @effect/sql@0.8.0

0.3.0

Patch Changes

0.2.3

Patch Changes

0.2.2

Patch Changes

0.2.1

Patch Changes

0.2.0

Patch Changes

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Patch Changes

0.0.32

Patch Changes

0.0.31

Patch Changes

0.0.30

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.25

0.0.29

Patch Changes

0.0.28

Patch Changes

0.0.27

Patch Changes

0.0.26

Patch Changes

0.0.25

Patch Changes

0.0.24

Patch Changes

0.0.23

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.18

0.0.22

Patch Changes

0.0.21

Patch Changes

0.0.20

Patch Changes

0.0.19

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.14

0.0.18

Patch Changes

0.0.17

Patch Changes

0.0.16

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.11

0.0.15

Patch Changes

0.0.14

Patch Changes

0.0.13

Patch Changes

0.0.12

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.7

0.0.11

Patch Changes

0.0.10

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.5

0.0.9

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.4

0.0.8

Patch Changes

0.0.7

Patch Changes

0.0.6

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.4.1

0.0.5

Patch Changes

0.0.4

Patch Changes

  • Updated dependencies []:
    • @effect/sql@0.3.18

0.0.3

Patch Changes

0.0.2

Patch Changes