Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 08 Sep 02:59
b7303f6

v0.8.0: mutexes, operation records, one Failure, and the failure reducer

Eight changes since v0.7.0. Four reshape contracts and set this release's migration section; four are additive.

  • Mutexes replace exclusion groups (#67). A pipeline names any number of mutexes; a run holds each on its ResourceID from admission to terminality, and two pipelines exclude each other exactly when they share a name. Exclusion is pairwise, so a snapshot pipeline can exclude both a deploy and a backup while deploys and backups run together. Still an admission rule resolved at Start, never persisted, so changes converge on their own.

  • Operation records (#70). A step's forward execution and its unwind are two rows, each written once when it resolves, carrying status, attempts, the committed state (forward only), the permanent failure that resolved it, and its resolution order. An unwind never rewrites the forward row's state, and nothing in the bbolt driver is read back to be rewritten. Result.UnwindFailures is gone; the per-step facts live in the store.

  • One Failure type (#71). FailureRecord, RootFailure, and UnwindFailure collapse into Failure; the role is where the value sits. A run's failure is Result.Failure, Status.Failure (set from the moment the run starts unwinding), and Invocation.Failure(). The aggregate handler-side struct and the unwind-failure list are gone from the handler contract.

  • Failure reducer (#72). A pipeline may declare failure_output; a FailureReducer folds the input, the committed states, the run's Failure, and the per-step UnwindFailure(step) into it when the unwind completes, and the typed Result exposes it as FailureOutput(). The snapshots example reports the object a jammed storage backend left behind.

  • Additive: generated NewXxxInvocation(core) and XxxReducer.Reduce(view) so durabletest.NewInvocation drives generated handlers and reducers directly (#64); durableotel unwind spans carry durable.run_failure.step, .kind, and .reason (#65); WithTextLimit bounds every free text the engine records, default 4096 bytes (#68); option names follow what they configure (#66).

Breaking changes and migration

  • Protos: exclusion_group: "x" is mutexes: "x" (field 5 reserved). Hand-written configs: ExclusionGroup: "x" is Mutexes: []string{"x"}.
  • Options: engine.WithRetention is WithRetentionPolicy; durableotel.WithBaggage is WithBaggagePropagation. WithObserver and WithScheduleAnnotator are variadic; single-argument calls compile unchanged.
  • Failure types: durable.RootFailure, UnwindFailure, and FailureRecord are durable.Failure. res.RootFailure is res.Failure; inv.Failure().Root.X is inv.Failure().X; inv.Failure().UnwindFailures has no replacement on the invocation, and Result.UnwindFailures is gone. Read per-step unwind failures in a failure reducer through UnwindFailure(step).
  • Typed invocations gain Failure() and Logger(); third-party fakes of durable.Invocation must add Failure(), and fakes of durable.ReduceView must add Failure() and UnwindFailure(StepID).
  • Store SPI (store/driver): OperationRecord, StepRecord{Forward, Unwind}, OpWrite{StepID, Phase, Record}, Transition.Ops; Transition.UnwindFailure and RunRecord.UnwindFailures (the field) are gone, RunRecord.RootFailure is Failure, and RunRecord.UnwindFailures() is a derived view.
  • bbolt on-disk layout changed with no migration: a database written by v0.7.0 or earlier is not readable by this driver. Discard it.
  • Storage proto: the StepRecord and Failures messages are replaced by OperationRecord; buf's MESSAGE_NO_DELETE is excepted for the internal schema.

contrib/durableotel v0.8.0 is released in lockstep.

Modules

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

What's Changed

  • codegen: typed invocation constructors and Reducer.Reduce for engine-free tests by @dangra in #64
  • durableotel: unwind spans carry the failure being unwound by @dangra in #65
  • Option names follow what they configure by @dangra in #66
  • Exclusion groups become mutexes by @dangra in #67
  • Bound the free text the engine records on a run by @dangra in #68
  • Operation records: one row per step phase, carrying its own failure by @dangra in #70
  • One Failure type; Status carries the Run's failure from the start of unwind by @dangra in #71
  • Failure reducer: a typed account of a failed run by @dangra in #72
  • Release v0.8.0 by @dangra in #73

Full Changelog: v0.7.0...v0.8.0