Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 05 Sep 22:05
754b118

v0.5.0: the package layout release

The module is now split by audience, and every import arrow points from the more specific package to the more general one (#47):

  • durable is the handler contract and nothing else: Invocation, Failure, Fail, AwaitRun/AwaitAll/AwaitAny, Handler and Middleware with their result classifiers, the step references, the Schedule options a step uses to fan out children, and aliases of the shared vocabulary. Handler files import only this package.
  • engine is the wiring side: engine.New, the With* options, Start/Stop/Stats, Bind, Pipeline, Run, Result, Status.
  • pipelinedef is the type-erased definition generated code builds and Engine.Bind validates.
  • kernel is the shared leaf (identities, phases, outcomes, parks, failure records); storedriver and observe no longer depend on the root.
  • durabletest.NewInvocation is a fake Invocation for unit-testing handlers without an engine or a store.

Breaking changes and migration

  • durable.NewEngine is engine.New; Engine, the With* options, Pipeline, Run, Result, Status, RunState, Clock, RetryPolicy, RetentionPolicy, ScheduleAnnotator are in engine. ErrEngineNotStarted/ErrEngineStarted are engine.ErrNotStarted/engine.ErrStarted.
  • Invocation and ReduceView are interfaces. Handler and middleware signatures take durable.Invocation by value, not *durable.Invocation.
  • NewDefinition, DefinitionConfig, StepConfig are pipelinedef.New, pipelinedef.Config, pipelinedef.Step; def.Bind(engine) is engine.Bind(def), which now validates and returns an error instead of the constructor panicking.
  • StepRef and StateStepRef have exported fields (Step, New); NewStepRef/NewStateStepRef are pipelinedef.StepRef/pipelinedef.StateStepRef.
  • Generated code must be regenerated with this version's protoc-gen-durable (buf generate).
  • Middleware classifiers gained AwaitTimeout, FailureCause, and FailureReason beside AwaitRequest and FailureInfo.

contrib/durableotel v0.5.0 is released in lockstep. The specification is at Draft 1.3.

Modules

  • github.com/dangra/durable@v0.5.0
  • github.com/dangra/durable/contrib/durableotel@v0.5.0

What's Changed

  • Spec Draft 1.2: parks, cancellation, drain, observability, API surface by @dangra in #46
  • Extract the shared vocabulary: durable/kernel by @dangra in #48
  • Invocation and ReduceView become interfaces by @dangra in #49
  • Move the engine to its own package: durable/engine by @dangra in #50
  • Extract the codegen adapter surface: durable/pipelinedef by @dangra in #51
  • Docs: describe the v0.5 package layout (spec Draft 1.3) by @dangra in #52
  • Schedule options and child-run errors belong to the handler contract by @dangra in #53
  • Release v0.5.0 by @dangra in #54

Full Changelog: v0.4.0...v0.5.0