diff --git a/docs/src/content/docs/durable/overview.md b/docs/src/content/docs/durable/overview.md index e6069bfa..59c0c5dd 100644 --- a/docs/src/content/docs/durable/overview.md +++ b/docs/src/content/docs/durable/overview.md @@ -165,8 +165,12 @@ owner holds the instance, so stop. `Recover` retries an unapplied effect, and re ## A note on serialized payloads Events, service done-data, actor done-data, and actor messages are recorded as their -JSON form. A parent reducer that type-asserts a non-JSON Go type from `AssignCtx.Event` -observes the JSON-decoded shape of actor done-data on a replayed `onDone`. A service's +JSON form. An actor's done-data gets the same decode a service's result does, live +as on replay: when `WithEventDataDecoder` covers the parent's `onDone` event it +arrives as the decoder's type, and without one it arrives in JSON's generic form — +a struct as a map and an integer as a `float64`, which loses precision above 2^53 +— so a reducer that type-asserts a non-JSON Go type from `AssignCtx.Event` sees the +same generic form both ways. A service's result is decoded from its JSON form live as well as on replay, so a reducer gets the same value both ways. When `WithEventDataDecoder` covers the invocation's `onDone` event, the result arrives as the decoder's type, for example `durable.DecodeAs[User]`. Otherwise it diff --git a/durable/CHANGELOG.md b/durable/CHANGELOG.md index 298a7b45..5dfce2f0 100644 --- a/durable/CHANGELOG.md +++ b/durable/CHANGELOG.md @@ -9,12 +9,14 @@ and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0. ### Added -- **`WithResultTypeAlias`** tells the Runner that a service result type the journal - recorded under one full Go type name now goes by another, so a result settled or - parked under the old name still replays after a pure refactor moves or renames the - type: `Recover`, `StateAt` and a `RunService` that settles a recorded result accept - the decoded value when its type is the one the alias names, and every other recorded - name is held to strictly, exactly as before. A parked result the Handle itself holds +- **`WithResultTypeAlias`** tells the Runner that a service result type, or an actor + done-data type, the journal recorded under one full Go type name now goes by another, + so a result settled or parked under the old name, and an actor's done-data settled + under it, still replay after a pure refactor moves or renames the type: `Recover`, + `StateAt` and a `RunService` that settles a recorded result, and the replay of a + recorded actor's done-data — from the journal, a checkpoint's tail or `StateAt` — + accept the decoded value when its type is the one the alias names, and every other + recorded name is held to strictly, exactly as before. A parked result the Handle itself holds is still held to its own type, as live. The option takes the recorded name and a value of the type the name now means, can be repeated for several renames, and maps one hop, never chaining through another alias. One recorded name given for two @@ -208,6 +210,49 @@ and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0. settled, fails replay under one; a decoder that returns JSON's generic form for that event settles or replays it. A parked Record or checkpoint is new to this version: an older `durable` replays a parked Record as a settled result. +- **An actor's done-data and error reach `Assign` as the live run delivered them,** + through the same decode a service result and a `WithEventData` payload get, so a + retried effect can't differ from the first attempt. This is a behavior change for + callers that read the outcome from `AssignCtx.Event`: without a decoder, a live + onDone `Assign` now sees JSON's generic form — a struct becomes a map, an integer a + `float64` — where main handed it the actor's own Go value, and an error is + message-only, so `errors.Is` and `errors.As` in an onError `Assign` stop matching + what the actor returned. `WithEventDataDecoder` for the parent's onDone (and + onError) event is the opt-out: it hands `Assign` the decoded type, live as the + settle routes it and as replay re-fires it (#256). On main, `Assign` saw the actor's + own Go value live and JSON's generic form on replay. The journal records the JSON the live settle decoded + and the done-data's Go type, with its import path, and replay holds the decoder to the + type as the live settle did, failing `Recover` and `StateAt` with `ErrEventDataEncoding` + when the decoder returns another type; JSON's generic form, and nil, are always + accepted. An actor's error is message-only live and on replay: an error with the same + message, any invalid UTF-8 replaced, which `errors.Is` and `errors.As` no longer match. + An error whose `Error` method panics, such as a typed nil, settles with a message + saying the actor error panicked, its invalid UTF-8 replaced, rather than the panic + failing the Handle or crashing the host, live and on replay alike. +- **There is no parking for an actor outcome.** A done-data payload that won't decode, + or decodes as another type than the actor produced, aborts the settle through the new + `ActorSystem.WithSettleTransform` before it fires anything, so no `Assign` runs, and + `DeliverToActor` — and the `Fire` or `Tick` whose absorb drove the settle — fail the + Handle with `ErrHandleFailed` wrapping `ErrEventDataEncoding` and record nothing, so + a recovered Handle runs the actor from its initial state and the delivery again. A + `RunService` whose settle's absorb drove such a settle fails the Handle the same + way but records the service's own settle first — the ServiceFn ran and its result + decoded, so the journal holds it before the actor's settle is attempted — keeping + the parking design's "never runs again" promise: a recovered Handle re-settles the + service from the journal and never runs its ServiceFn again across any number of + Recover-and-retry rounds; only the actor re-runs. An actor outcome is never parked, + as a service result that won't decode is, because the service already ran but the + actor can run again. The + transform runs only when the settle routes a completion — the actor's spawn wired + the onDone an output settles through or the onError a failure does; a settle that + routes nothing consults no decoder, journals nothing, and can't fail the step. On + main such a settle fired the zero event its unset outcome leaves, which the parent + refused; an invoked actor that declared no onDone now routes nothing at all (see + `state`'s declared-outcome routing), so nothing is journaled for its settles where + main journaled a refused fire. `Start` and + `Recover` fail the same way when a settle their spawns drive aborts; no Handle + exists yet, so their error wraps `ErrEventDataEncoding` directly. A done-data + payload with no JSON form fails the Handle the same way, before any `Assign` runs. - **A step that may not have been recorded fails the Handle.** That call and every later one return `ErrHandleFailed`, wrapping the cause. A step that was recorded while another goroutine failed the Handle also returns `ErrHandleFailed`, saying the step was @@ -251,6 +296,22 @@ and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0. ### Fixed +- **A settle a respawn drops runs no transform.** The drop a host's respawn replay + makes (`AbsorbRespawn`) was decided after the settle transform ran, so a respawned + nested child whose output differed from its first spawn's — a time, a random id, + or any value with no JSON form — aborted the settle and failed `Recover` + (`Start`'s spawns the same way) for a settle that is thrown away whole: nothing + fires for it and nothing is journaled. The drop is now decided before the + transform, so a dropped settle consults no decoder and can abort nothing, and + `Recover` succeeds whatever the respawn's outcome encodes as. +- **The recorded data of an actor fire that was refused is never decoded.** A journal + an older version wrote can hold a settle whose parent Fire was refused — the + zero-event settle of an `InvokeActor` that declared no onDone — with its done-data + recorded and no recorded type. Replay sent that data through the event-data decoder + for the refused event before re-firing it, so a strict decoder failed `Recover` and + `StateAt` on histories that recovered fine on main. The data of a fire whose replay + will be refused is never read: replay now re-fires the recorded event plainly and + meets the same refusal. - **A timer transition starts and stops services and actors.** `Tick` handed a fired timer transition's effects only to the scheduler, so a timer that left a state left its service in flight and its actor running, and one that entered a state started no @@ -447,11 +508,13 @@ and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0. already records it, and replay meets it again — so the actor counts as ended and `Recover` leaves it alone. A spawn whose onError a context's ending refused still retries, since the step that drove it records nothing, as does one with no onError - declared, as before. An invoked actor with no onError fires the zero event, which the - parent refuses as having no transition, and `durable` reads that refusal - (`state.ErrNoTransition`) as "none declared". So a declared onError the parent has no - transition for retries too, and a wildcard or a transition that takes the zero event - counts as caught; #250 tracks a better way to tell them apart. A host refusal worded + declared, as before: an invoked actor with no onError escalates rather than firing + (see the Changed entry on declared-outcome routing), so it needs no refusal to tell + it apart. A declared onError the parent has no + transition for still fires and is refused with `state.ErrNoTransition`, which + `durable` reads as "nothing caught the failure"; a wildcard or a transition that + takes the declared event counts as caught; #250 tracks a better way to tell a + declared-but-unroutable onError from a handled one. A host refusal worded like the kernel's counts as handled. - **A message an actor sends its parent as it spawns applies once.** A `Fire`, `RunService`, `Start` or `Recover` didn't journal it, and `Recover` spawned the actor diff --git a/durable/README.md b/durable/README.md index 127f6862..ad321542 100644 --- a/durable/README.md +++ b/durable/README.md @@ -179,10 +179,9 @@ owner holds the instance, so stop. `Recover` retries an unapplied effect, and re ## Caveat: serialized payloads Events, service done-data, actor done-data, and actor messages are recorded as their -JSON form. A parent reducer that type-asserts a non-JSON Go type from `AssignCtx.Event` -observes the JSON-decoded shape of actor done-data on a replayed `onDone`. A service's -result is decoded from its JSON form live as well as on replay, so a reducer gets the same -value both ways. When `WithEventDataDecoder` covers the invocation's `onDone` event, the +JSON form. A service's result is decoded from its JSON form live as well as on replay, +so a reducer gets the same value both ways. When `WithEventDataDecoder` covers the +invocation's `onDone` event, the result arrives as the decoder's type, for example `durable.DecodeAs[User]`. Otherwise it arrives in JSON's generic form: a struct as a map and an integer as a `float64`, which loses precision above 2^53. A decoder that fails, or that returns a type other than the @@ -197,8 +196,17 @@ leaves the state that declares the service stops the service and discards it. A longer matches. Register the decoder before you record results: replay decodes the journal with the recovering Runner's decoder, so a decoder added or changed after results were recorded changes what replay hands the reducer, and one that can't decode a settled result -fails `Recover` and `StateAt` with `ErrEventDataEncoding`; a parked one doesn't fail them. A -type moved or renamed after its results were recorded replays under its new name once +fails `Recover` and `StateAt` with `ErrEventDataEncoding`; a parked one doesn't fail them. An +actor's done-data gets the same decode, live as on replay: when the decoder covers the +parent's `onDone` event it arrives as the decoder's type, and without one in JSON's +generic form, a struct as a map and an integer as a `float64`. An actor's error is +message-only too, any invalid UTF-8 replaced, and one whose `Error` method panics +settles with a message saying so. A done-data payload that won't decode, or that decodes +as a type other than the actor produced, is never parked: the settle fires nothing, +`DeliverToActor` fails the Handle with `ErrEventDataEncoding` wrapped in +`ErrHandleFailed`, nothing is recorded, and a `Recover` runs the actor again. A +type moved or renamed after its results — or an actor's done-data — were recorded +replays under its new name once told to the Runner with `WithResultTypeAlias`. A `WithEventData` payload is decoded from its JSON form live as well as on replay, so a reducer gets the same value both ways. `WithEventDataDecoder` decodes it as the type the caller passed, chosen per diff --git a/durable/actor.go b/durable/actor.go index b95cf43c..72ca4be1 100644 --- a/durable/actor.go +++ b/durable/actor.go @@ -56,13 +56,23 @@ import ( // consistent with the kernel's EventPayload contract and the polyglot serializable // boundary the durable runtime records every nondeterministic result across (the // clock and service seams record JSON too). The recorded value round-trips through -// encoding/json and is re-fired through the parent transition's Assign exactly as on -// the live run. The limitation this carries: a parent reducer that type-asserts a -// concrete, non-JSON Go type from AssignCtx.Event will observe the JSON-decoded -// shape (for example a map[string]any rather than a struct) on the replayed onDone, -// the same boundary the service seam documents. A typed-codec option to record and -// replay the concrete Go value is reserved for a later, additive change and is not -// built here. +// encoding/json. A done-data payload is decoded through the Runner's +// WithEventDataDecoder for the parent's onDone event before it reaches the parent, +// live as on replay, as a WithEventData payload is: a decoder for that event hands +// the parent's Assign the decoder's type, and without one the payload arrives in +// JSON's generic form (a struct as a map, an integer as a float64, which loses +// precision above 2^53) — the same boundary the service seam documents. The journal +// records the JSON the live settle decoded and the done-data's Go type, so replay +// decodes the same bytes and holds the decoder to the type the live settle did. An +// error is message-only: an error with the same message, any invalid UTF-8 replaced, +// live and on replay. A done-data payload that won't decode, or a decoder that +// returns another type than the actor produced, aborts the settle — nothing fires — +// and the step fails the Handle, so the actor runs again on Recover; there is no +// parking for actors, as a service result that won't decode has (see RunService). +// A settle that routes no completion — the actor was spawned with neither the onDone +// an output settles through nor the onError a failure does — runs no transform: it +// consults no decoder, so a done-data that won't encode can't fail the step, and it +// journals nothing for the settle. // actorMessagePayload is the wire form of one recorded parent transition the actor // system drove: the parent Event it fired, and — for the settling onDone / onError @@ -83,6 +93,11 @@ type actorMessagePayload struct { // reconstructed into an error and carried into the parent transition's Assign so // a reducer reading an error from AssignCtx.Event observes it as on the live run. Error *string `json:"error,omitempty"` + // Type is the done-data's Go type, with its import path (see typeName): the type + // the actor's completion produced. Every settling onDone fire records it, so replay + // holds the decoder to it, as the live settle did. It is empty for an error, and + // for a Record from before settles recorded the type, which accepts any type. + Type string `json:"type,omitempty"` // HasData reports whether the parent fire carried a separate actor outcome // payload (Data or Error) via WithEventData. A settling onDone / onError fire sets // it; a message-driven fire (SendParent) leaves it false so replay re-fires the @@ -107,9 +122,24 @@ type actorMessagePayload struct { // JournalActorMessage correlated by the actor id so recovery replays it without // re-instantiating the actor. // +// The done-data reaches the parent's onDone Assign decoded for that event, live as +// on replay: through the Runner's WithEventDataDecoder when one covers it, else in +// JSON's generic form. An error is message-only: an error with the same message, any +// invalid UTF-8 replaced, which errors.Is and errors.As no longer match, and an +// Error method that panics settles with a message saying so. A done-data payload +// that won't decode, or decodes as another type than the actor produced, aborts the +// settle before it fires anything: DeliverToActor returns ErrHandleFailed, wrapping +// ErrEventDataEncoding, no Assign ran, and nothing is recorded — an actor outcome is +// never parked, as a service result that won't decode is (see RunService), because +// the actor can run again. The Handle stays failed: Recover with a decoder that +// decodes the payload, then deliver the event again, and the actor re-runs. +// // It returns whether the actor was found running: false for a ref that names no live // actor (already settled, stopped, or never spawned), or false and an error when no -// palette is wired, the Handle has failed, or ctx ended before the delivery. Once the +// palette is wired, the Handle has failed, or ctx ended before the delivery. A +// completion that routes nothing — the actor was spawned with no onDone for its +// outcome — is a no-op: no decoder is consulted, nothing is recorded for the settle, +// and the Handle stays healthy, whatever the actor's output encodes as. Once the // actor ran it returns true with any error. A result that won't encode, a ctx that ended // by the end of the delivery, or a parent Fire refused because a context ended (ctx, or // one middleware derived from it) returns ErrHandleFailed and records nothing: a ctx @@ -152,6 +182,15 @@ func (h *Handle[S, E, C]) DeliverToActor(ctx context.Context, ref state.ActorRef if err := stepCanceled(ctx, parentFireErrs(fires)...); err != nil { return true, h.fail(fmt.Errorf("durable: delivering to actor %q for %q: %w", ref.ID, h.id, err)) } + // The actor's done-data wouldn't decode for its onDone event, or decodes as another + // type than the actor produced: the settle aborted, firing nothing, so no Assign ran + // and the instance saw nothing for it. There is no parking for an actor outcome, as + // a service result that won't decode has (see RunService): the service already ran, + // but the actor can run again. Fail the Handle and record nothing, so a recovered + // Handle runs the actor from its initial state and the delivery again. + if abort := h.actorFires.takeAborts(); abort != nil { + return true, h.fail(fmt.Errorf("durable: delivering to actor %q for %q: %w", ref.ID, h.id, abort)) + } entries, err := recordParentFires(fires, false) if err != nil { @@ -188,10 +227,10 @@ func (h *Handle[S, E, C]) ActorRef(id string) (state.ActorRef, bool) { // recordParentFires builds the JournalActorMessage entries for the parent Fires an // actor system drove, in fire order, each under the actor it came from. before marks // Fires that ran before the step's own work. -func recordParentFires[S comparable](fires []state.ParentFire[S], before bool) ([]state.JournalEntry, error) { +func recordParentFires[S comparable](fires []notedFire[S], before bool) ([]state.JournalEntry, error) { entries := make([]state.JournalEntry, 0, len(fires)) - for _, pf := range fires { - entry, err := actorEntry(pf, before) + for _, nf := range fires { + entry, err := actorEntry(nf, before) if err != nil { return nil, err } @@ -202,9 +241,11 @@ func recordParentFires[S comparable](fires []state.ParentFire[S], before bool) ( // actorEntry builds one JournalActorMessage entry: the parent Fire's event payload, // whether the live Fire was refused, and, for a Fire that settled an actor, the -// actor's outcome, which it passed as event data, so replay re-fires the same onDone -// or onError with it. -func actorEntry[S comparable](pf state.ParentFire[S], before bool) (state.JournalEntry, error) { +// actor's outcome as the settle decoded it — the JSON the transform decoded for the +// onDone event and its Go type (see replayableOutcome), which it passed as event +// data — so replay re-fires the same onDone or onError with it. +func actorEntry[S comparable](nf notedFire[S], before bool) (state.JournalEntry, error) { + pf := nf.pf var mp actorMessagePayload mp.Event = append(json.RawMessage(nil), pf.Result.Trace.EventPayload...) mp.Refused = pf.Result.Err != nil @@ -215,12 +256,11 @@ func actorEntry[S comparable](pf state.ParentFire[S], before bool) (state.Journa case pf.Err != nil: msg := pf.Err.Error() mp.Error = &msg - case pf.Output != nil: - raw, err := json.Marshal(pf.Output) - if err != nil { - return state.JournalEntry{}, fmt.Errorf("marshaling actor output: %w", err) - } - mp.Data = raw + case len(nf.settled.raw) > 0: + // The JSON the settle decoded, which the journal keeps as the bytes replay + // decodes, with the Go type it recorded, which replay holds the decoder to. + mp.Data = append(json.RawMessage(nil), nf.settled.raw...) + mp.Type = nf.settled.typ } } payload, err := json.Marshal(mp) @@ -258,11 +298,15 @@ func splitActorEntries(rec *Record) (before, rest []decodedActorEntry, err error // re-fires the parent's event — carrying the recorded done-data / error via // WithEventData for a settling fire, or plainly for a message-driven fire — so the // kernel re-derives the same parent transition with the same data, running no actor -// behavior. It returns the effects of a re-fired transition that applied, so the caller -// arms the timers and services it declares, as the live run did. It reports an error -// only when the recorded entry cannot be decoded or the re-fired transition fails (a -// corrupt or mis-ordered journal). -func replayActor[S comparable, E comparable, C any](ctx context.Context, inst *state.Instance[S, E, C], codec EventCodec[E], entry decodedActorEntry) ([]state.Effect, error) { +// behavior. A settling onDone fire carries its done-data decoded through decode for +// that event, held to the recorded type, as the live settle's transform did. It +// returns the effects of a re-fired transition that applied, so the caller arms the +// timers and services it declares, as the live run did. It reports an error only when +// the recorded entry cannot be decoded or the re-fired transition fails (a corrupt or +// mis-ordered journal), or the recorded done-data won't decode for its event, as the +// live settle refused it. aliases carries the Runner's WithResultTypeAlias renames, +// which the recorded check honors, as a recorded service result's replay does. +func replayActor[S comparable, E comparable, C any](ctx context.Context, inst *state.Instance[S, E, C], codec EventCodec[E], decode EventDataDecoder[E], aliases map[string]string, entry decodedActorEntry) ([]state.Effect, error) { mp := entry.mp // A Fire refused before the kernel saw it (middleware that denied it) has no event // to re-fire; replay is refused the same way. @@ -274,13 +318,19 @@ func replayActor[S comparable, E comparable, C any](ctx context.Context, inst *s return nil, fmt.Errorf("durable: decoding recorded actor %q event: %w", entry.actorID, err) } var res state.FireResult[S] - if mp.HasData { - data, derr := replayActorData(mp) + if mp.HasData && !mp.Refused { + data, derr := replayActorData(mp, event, decode, aliases) if derr != nil { return nil, fmt.Errorf("durable: decoding recorded actor %q done-data: %w", entry.actorID, derr) } res = inst.Fire(ctx, event, state.WithEventData(data)) } else { + // A Fire the live run refused never applied, so its recorded outcome never + // reached an Assign: replay re-fires the event plainly and meets the same + // refusal, never decoding data nothing read. A journal an older version wrote + // can hold a refused settle's done-data with no recorded Type — the zero-event + // settle of an onDone-less invoke — which a strict decoder would refuse + // though the live run recovered fine on it. res = inst.Fire(ctx, event) } // The kernel reports every refusal with an error, so the error alone says whether @@ -298,22 +348,28 @@ func replayActor[S comparable, E comparable, C any](ctx context.Context, inst *s // replayActorData reconstructs the actor outcome a settling fire carried into the // parent transition's Assign: the reconstructed error for an onError fire, the -// JSON-decoded done-data for an onDone fire, or nil when the actor completed with no -// output. A done-data payload that fails to decode is surfaced as an error rather -// than silently dropped, so a corrupt journal fails replay loudly instead of -// re-firing the parent with nil data it never saw on the live path. -func replayActorData(mp actorMessagePayload) (any, error) { +// done-data for an onDone fire, or nil when the actor completed with no output. The +// done-data goes through the transform the live settle used (see +// replayableOutcome), as the recorded JSON the live run decoded, held to the recorded +// type — through the aliases the Runner's WithResultTypeAlias maps, as a recorded +// service result is; one that won't decode fails the replay, as the live settle +// refused it. A payload that fails to decode is surfaced as an error rather than +// silently dropped, so a corrupt journal fails replay loudly instead of re-firing the +// parent with nil data it never saw on the live path. +func replayActorData[E comparable](mp actorMessagePayload, event E, decode EventDataDecoder[E], aliases map[string]string) (any, error) { if mp.Error != nil { return errors.New(*mp.Error), nil } - if len(mp.Data) > 0 { - var data any - if err := json.Unmarshal(mp.Data, &data); err != nil { - return nil, fmt.Errorf("unmarshaling actor done-data: %w", err) - } - return data, nil + if len(mp.Data) == 0 { + return nil, nil + } + // The transform decodes the recorded JSON for the onDone event, as it did live, + // and holds the decoder to the recorded type. An abort is the decode's refusal. + out, _, abort := replayableOutcome(decode, aliases, nil, "actor done-data", "actor error")(event, recordedResult{raw: mp.Data, typ: mp.Type}, nil) + if abort != nil { + return nil, abort } - return nil, nil + return out, nil } // actorEntries returns the recorded actor transitions carried by a single Record, diff --git a/durable/actor_internal_test.go b/durable/actor_internal_test.go index 6d81a005..710033c1 100644 --- a/durable/actor_internal_test.go +++ b/durable/actor_internal_test.go @@ -14,7 +14,7 @@ func TestReplayActorData(t *testing.T) { errMsg := "boom" t.Run("error", func(t *testing.T) { - got, err := replayActorData(actorMessagePayload{Error: &errMsg}) + got, err := replayActorData(actorMessagePayload{Error: &errMsg}, "childDone", decodeAny[string], nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -25,7 +25,7 @@ func TestReplayActorData(t *testing.T) { }) t.Run("valid data", func(t *testing.T) { - got, err := replayActorData(actorMessagePayload{Data: json.RawMessage(`{"k":1}`)}) + got, err := replayActorData(actorMessagePayload{Data: json.RawMessage(`{"k":1}`)}, "childDone", decodeAny[string], nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -36,7 +36,7 @@ func TestReplayActorData(t *testing.T) { }) t.Run("no data", func(t *testing.T) { - got, err := replayActorData(actorMessagePayload{}) + got, err := replayActorData(actorMessagePayload{}, "childDone", decodeAny[string], nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -46,7 +46,7 @@ func TestReplayActorData(t *testing.T) { }) t.Run("corrupt data surfaces error", func(t *testing.T) { - got, err := replayActorData(actorMessagePayload{Data: json.RawMessage(`{not json`)}) + got, err := replayActorData(actorMessagePayload{Data: json.RawMessage(`{not json`), Type: "int"}, "childDone", decodeAny[string], nil) if err == nil { t.Fatal("want an error for undecodable done-data, got nil") } diff --git a/durable/actor_outcome_ends_test.go b/durable/actor_outcome_ends_test.go new file mode 100644 index 00000000..9e739024 --- /dev/null +++ b/durable/actor_outcome_ends_test.go @@ -0,0 +1,427 @@ +package durable_test + +import ( + "context" + "errors" + "fmt" + "sync/atomic" + "testing" + "time" + + "github.com/stablekernel/crucible/durable" + "github.com/stablekernel/crucible/state" +) + +// These tests hold the symmetry table true across the ends that journal an actor's +// settle: whichever step drove it — a DeliverToActor delivery (covered by +// TestActor_DoneData_SameTypeLiveAndAfterRecover), a Fire, a Tick, or a RunService — +// the parent's Assign must see the same done-data live and after Recover, and a +// StateAt at the settle's step must show it. The Fire, Tick and RunService ends drive +// the settle from the step's own absorb: the step enters a state that spawns a "poker" +// actor, which sends the running "kid" actor its finishing event as it starts, so kid +// settles while the step records. Each row is a fresh instance driven by one step +// kind, all through one machine whose "work" region offers the three drivings. + +// endsMachine is one machine for the three settle ends. The keeper region holds kid +// from Start; the work region starts in W, which invokes fetch and arms an after +// timer, and each driving leaves W for X, whose entry spawns the poker that finishes +// kid: a Fire of "go", the timer's "elapsed", or fetch's "served" onDone. +func endsMachine(fn state.ServiceFn[outcomeCtx]) *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("ends"). + Service("fetch", fn). + Reducer("recordDone", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + c := in.Entity + c.Notes = append(c.Notes, fmt.Sprintf("%T:%v", in.Event, in.Event)) + return c + }). + Actor("kid").Actor("poker"). + SuperState("both"). + Region("keeper").Initial("K"). + SubState("K").InvokeActor("kid", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childFail")). + SubState("Kdone").Final(). + EndRegion(). + Region("work").Initial("W"). + SubState("W").Invoke("fetch", state.WithInvokeOnDone("served"), state.WithInvokeOnError("servfail")). + SubState("X").InvokeActor("poker"). + EndRegion(). + EndSuperState(). + Initial("both"). + Transition("W").On("go").GoTo("X"). + Transition("W").After(10 * time.Second).On("elapsed").GoTo("X"). + Transition("W").On("served").GoTo("X"). + Transition("K").On("childDone").GoTo("Kdone").Assign("recordDone"). + Quench() +} + +// endsIDs are the stable ids the ends machine's kid invocation and fetch invocation +// take, which the poker addresses kid by and RunService names fetch by. +var ( + endsKid = state.ActorID("ends", "K", 0) + endsEcho = state.InvokeID("ends", "W", 0) +) + +// poker is an actor that sends the running kid its finishing event as it starts, so +// kid settles inside the step whose entry spawned the poker. +type poker struct { + target string + sent bool +} + +func (*poker) DeliverFire(context.Context, any) (bool, any) { return false, nil } +func (p *poker) ChildEffects() []state.Effect { + if p.sent { + return nil + } + p.sent = true + return []state.Effect{state.SendTo{TargetID: p.target, Event: "finish"}} +} +func (*poker) Output() any { return nil } + +// endsOpts builds the options every ends run takes: the palette holding kid and the +// poker, the registry serving fetch, and the decoder that hands kid's childDone +// done-data back as the order the actor produced. +func endsOpts(runs *int64) []durable.Option[string, string, outcomeCtx] { + fn := func(context.Context, state.ServiceCtx[outcomeCtx]) (any, error) { return "ok", nil } + return []durable.Option[string, string, outcomeCtx]{ + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "kid": outputChild(runs, order{ID: 7}), + "poker": func(map[string]any) (state.ActorInstance, error) { return &poker{target: endsKid}, nil }, + }), + durable.WithServiceRegistry[string, string, outcomeCtx](state.NewRegistry[outcomeCtx]().Service("fetch", fn)), + endsDecoder(), + } +} + +// endsStart starts a fresh ends instance on its own history Store and returns the +// Handle, the store, the id and the count of kid's instantiations. extra opts come +// after the base ones, so one can override the decoder. +func endsStart(t *testing.T, name string, clock state.Clock, extra ...durable.Option[string, string, outcomeCtx]) (*durable.Handle[string, string, outcomeCtx], durable.Store, durable.InstanceID, *int64) { + t.Helper() + ctx := context.Background() + var runs int64 + opts := append(endsOpts(&runs), extra...) + if clock != nil { + opts = append(opts, durable.WithRunnerClock[string, string, outcomeCtx](clock)) + } + store := durable.NewMemStore(durable.WithHistory()) + id := durable.InstanceID(name) + fn := func(context.Context, state.ServiceCtx[outcomeCtx]) (any, error) { return "ok", nil } + h, err := durable.NewRunner(endsMachine(fn), store, opts...).Start(ctx, id, outcomeCtx{}, state.WithInitialState("both")) + if err != nil { + t.Fatalf("Start: %v", err) + } + return h, store, id, &runs +} + +// endsDecoder decodes kid's childDone done-data as the order the actor produced, and +// every other event's payload in JSON's generic form. +func endsDecoder() durable.Option[string, string, outcomeCtx] { + return durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + if e == "childDone" { + return durable.DecodeAs[order](data) + } + return durable.DecodeAs[any](data) + }) +} + +// wantEndsNote is what kid's onDone Assign records, live and on every replay. +const wantEndsNote = "durable_test.order:{7}" + +// checkEndsRecovered recovers the instance and asserts the replay delivered kid's +// done-data exactly as the live run did, without running the actor again, and that a +// StateAt at the settle's step shows the same. +func checkEndsRecovered(t *testing.T, h *durable.Handle[string, string, outcomeCtx], store durable.Store, id durable.InstanceID, runs *int64) { + t.Helper() + ctx := context.Background() + fn := func(context.Context, state.ServiceCtx[outcomeCtx]) (any, error) { return "ok", nil } + live := h.Instance().Entity().Notes + if len(live) != 1 || live[0] != wantEndsNote { + t.Fatalf("live notes = %q, want kid's %q", live, wantEndsNote) + } + rh, err := durable.Recover(ctx, endsMachine(fn), store, id, endsOpts(runs)...) + if err != nil { + t.Fatalf("Recover: %v", err) + } + rec := rh.Instance().Entity().Notes + if len(rec) != 1 || rec[0] != live[0] { + t.Fatalf("after Recover the notes = %q, want the live run's %q", rec, live) + } + if got := atomic.LoadInt64(runs); got != 1 { + t.Fatalf("kid instantiated %d times across the live run and Recover, want 1", got) + } + v, err := durable.StateAt(ctx, endsMachine(fn), store, id, 0, endsOpts(runs)...) + if err != nil { + t.Fatalf("StateAt: %v", err) + } + if got := v.Instance().Entity().Notes; len(got) != 1 || got[0] != live[0] { + t.Fatalf("StateAt(0) notes = %q, want the live run's %q", got, live) + } +} + +// TestActorOutcome_AFireSpawnedSettle_ReplaysAsItDelivered pins the Fire end: a Fire +// whose transition's entry spawns an actor that finishes a running one journals the +// settle with the step, and Recover and StateAt re-deliver its done-data decoded, as +// the live Fire's absorb delivered it. +func TestActorOutcome_AFireSpawnedSettle_ReplaysAsItDelivered(t *testing.T) { + ctx := context.Background() + h, store, id, runs := endsStart(t, "ends-fire", nil) + if _, err := h.Fire(ctx, "go"); err != nil { + t.Fatalf("Fire go: %v", err) + } + checkEndsRecovered(t, h, store, id, runs) +} + +// TestActorOutcome_ATickSpawnedSettle_ReplaysAsItDelivered pins the Tick end: a timer +// whose transition's entry spawns an actor that finishes a running one journals the +// settle with the tick's Record, and Recover and StateAt re-deliver its done-data +// decoded, as the live tick's absorb delivered it. +func TestActorOutcome_ATickSpawnedSettle_ReplaysAsItDelivered(t *testing.T) { + ctx := context.Background() + clock := state.NewFakeClock(time.Unix(0, 0).UTC()) + h, store, id, runs := endsStart(t, "ends-tick", clock) + clock.Advance(11 * time.Second) + if _, err := h.Tick(ctx); err != nil { + t.Fatalf("Tick: %v", err) + } + checkEndsRecovered(t, h, store, id, runs) +} + +// TestActorOutcome_ARunServiceSpawnedSettle_ReplaysAsItDelivered pins the RunService +// end: a service settle whose transition's entry spawns an actor that finishes a +// running one journals the settle with the service step, and Recover and StateAt +// re-deliver its done-data decoded, as the live settle's absorb delivered it. +func TestActorOutcome_ARunServiceSpawnedSettle_ReplaysAsItDelivered(t *testing.T) { + ctx := context.Background() + h, store, id, runs := endsStart(t, "ends-svc", nil) + if _, ran, err := h.RunService(ctx, endsEcho); err != nil || !ran { + t.Fatalf("RunService = %v, %v; want the settle ran", err, ran) + } + checkEndsRecovered(t, h, store, id, runs) +} + +// TestActorOutcome_AnUndecodableSettle_FailsEachDrivingStep pins the no-parking rule +// on the Fire, Tick and RunService ends: when the settle their absorb drives can't +// decode its done-data, the settle aborts, the driving step fails the Handle with +// ErrHandleFailed wrapping ErrEventDataEncoding, and the actor runs again on +// Recover. The Fire and Tick ends record nothing, so a Recover runs the actor from +// its initial state; the RunService end records the service's own settle — which ran +// and decoded — before it fails, so the ServiceFn never runs again either (see +// TestRunService_AnActorAbortInTheStep_StillRecordsTheServiceResult). The +// DeliverToActor end's is TestActor_DoneDataThatWontDecode_IsNeverParked. +func TestActorOutcome_AnUndecodableSettle_FailsEachDrivingStep(t *testing.T) { + drive := []struct { + name string + clock bool + step func(*testing.T, context.Context, *durable.Handle[string, string, outcomeCtx]) + }{ + {"Fire", false, func(t *testing.T, ctx context.Context, h *durable.Handle[string, string, outcomeCtx]) { + if _, err := h.Fire(ctx, "go"); !errors.Is(err, durable.ErrHandleFailed) || !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("Fire go = %v, want ErrHandleFailed wrapping ErrEventDataEncoding", err) + } + }}, + {"Tick", true, func(t *testing.T, ctx context.Context, h *durable.Handle[string, string, outcomeCtx]) { + if _, err := h.Tick(ctx); !errors.Is(err, durable.ErrHandleFailed) || !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("Tick = %v, want ErrHandleFailed wrapping ErrEventDataEncoding", err) + } + }}, + {"RunService", false, func(t *testing.T, ctx context.Context, h *durable.Handle[string, string, outcomeCtx]) { + _, ran, err := h.RunService(ctx, endsEcho) + if !errors.Is(err, durable.ErrHandleFailed) || !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("RunService = %v, %v; want ErrHandleFailed wrapping ErrEventDataEncoding", err, ran) + } + }}, + } + for _, d := range drive { + t.Run(d.name, func(t *testing.T) { + ctx := context.Background() + var fake *state.FakeClock + if d.clock { + fake = state.NewFakeClock(time.Unix(0, 0).UTC()) + } + clock := state.Clock(nil) + if fake != nil { + clock = fake + } + // A decoder that refuses kid's done-data, in place of the one endsOpts wires. + refusing := childDoneDecoder(func([]byte) (any, error) { return nil, errors.New("decoder refused") }) + h, store, id, runs := endsStart(t, "ends-abort-"+d.name, clock, refusing) + if fake != nil { + fake.Advance(11 * time.Second) + } + d.step(t, ctx, h) + if notes := h.Instance().Entity().Notes; len(notes) != 0 { + t.Fatalf("the aborted settle ran Assigns: %q", notes) + } + // The actor runs again on Recover, from its initial state. + fn := func(context.Context, state.ServiceCtx[outcomeCtx]) (any, error) { return "ok", nil } + if d.name == "RunService" { + // The service's own settle ran and decoded before the actor's settle + // aborted, so the failed step recorded it: the journal holds the fetch + // settle, a Recover never runs the ServiceFn again (see + // TestRunService_AnActorAbortInTheStep_StillRecordsTheServiceResult), and + // the parent reached the settle's state. + if _, recs, lerr := store.Load(ctx, id); lerr != nil { + t.Fatalf("Load: %v", lerr) + } else { + svc := 0 + for _, rec := range recs { + for _, e := range rec.Entries { + if e.Kind == state.JournalServiceResult { + svc++ + } + } + } + if svc != 1 { + t.Fatalf("the journal holds %d service entries, want the settle the failed step recorded", svc) + } + } + rh, rerr := durable.Recover(ctx, endsMachine(fn), store, id, endsOpts(runs)...) + if rerr != nil { + t.Fatalf("Recover: %v", rerr) + } + // The recovered Handle respawns the poker X declares, which finishes kid + // again; the recovered decoder is the good one, so that settle applies — + // the recorded run never settled kid — and the parent reaches Kdone. + if got := rh.Instance().Current(); got != "Kdone" { + t.Fatalf("after Recover the parent is in %q, want Kdone: the recorded settle replayed and the respawned poker settled kid under the good decoder", got) + } + if _, ran, serr := rh.RunService(ctx, endsEcho); ran || serr != nil { + t.Fatalf("RunService after Recover = %v, %v; want nothing in flight: the settle is journaled, so the ServiceFn never runs again", ran, serr) + } + if got := atomic.LoadInt64(runs); got != 2 { + t.Fatalf("kid instantiated %d times, want 2: the Recover respawn ran it again", got) + } + return + } + if _, recs, err := store.Load(ctx, id); err != nil || len(recs) != 0 { + t.Fatalf("the journal holds %d Records (err %v), want none: nothing was recorded", len(recs), err) + } + rh, err := durable.Recover(ctx, endsMachine(fn), store, id, endsOpts(runs)...) + if err != nil { + t.Fatalf("Recover: %v", err) + } + if got := atomic.LoadInt64(runs); got != 2 { + t.Fatalf("kid instantiated %d times, want 2: Recover ran it again", got) + } + if _, ok := rh.ActorRef(endsKid); !ok { + t.Fatal("the recovered Handle doesn't run kid, want it re-run") + } + }) + } +} + +// startSettleMachine is a machine whose Start settles an actor: the kid region's actor +// spawns first, then the finisher region's, whose start sends kid its finishing event, +// so kid settles while Start spawns. The settle's Fire runs before any step, so the +// first step journals it. +func startSettleMachine() *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("startsettle"). + Reducer("recordDone", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + c := in.Entity + c.Notes = append(c.Notes, fmt.Sprintf("%T:%v", in.Event, in.Event)) + return c + }). + Actor("kid").Actor("finisher"). + SuperState("both"). + Region("kidreg").Initial("K"). + SubState("K").InvokeActor("kid", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childFail")). + SubState("Kdone").Final(). + EndRegion(). + Region("finreg").Initial("F"). + SubState("F").InvokeActor("finisher"). + SubState("F2"). + EndRegion(). + EndSuperState(). + Initial("both"). + Transition("K").On("childDone").GoTo("Kdone").Assign("recordDone"). + Transition("F").On("settle").GoTo("F2"). + Quench() +} + +// TestActorOutcome_ASettleDrivenAtStart_ReplaysAsItDelivered pins the Start end: a +// settle an initial spawn drives runs before any step, the first step journals it +// ahead of its own work, and Recover and StateAt re-deliver its done-data decoded, as +// the live start delivered it. With a decoder that can't decode the done-data, Start +// fails with the abort, and so does a Recover from the baseline, whose respawns drive +// the same settle; neither records anything. +func TestActorOutcome_ASettleDrivenAtStart_ReplaysAsItDelivered(t *testing.T) { + ctx := context.Background() + kid := state.ActorID("startsettle", "K", 0) + palette := func(runs *int64) durable.Option[string, string, outcomeCtx] { + return durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "kid": outputChild(runs, order{ID: 7}), + "finisher": func(map[string]any) (state.ActorInstance, error) { + return &poker{target: kid}, nil + }, + }) + } + var runs int64 + store := durable.NewMemStore(durable.WithHistory()) + id := durable.InstanceID("startsettle-1") + h, err := durable.NewRunner(startSettleMachine(), store, palette(&runs), endsDecoder()). + Start(ctx, id, outcomeCtx{}, state.WithInitialState("both")) + if err != nil { + t.Fatalf("Start: %v", err) + } + live := h.Instance().Entity().Notes + if len(live) != 1 || live[0] != wantEndsNote { + t.Fatalf("live notes = %q, want kid's %q", live, wantEndsNote) + } + // A step journals the start's settle, ahead of its own work. + if _, err = h.Fire(ctx, "settle"); err != nil { + t.Fatalf("Fire settle: %v", err) + } + rh, err := durable.Recover(ctx, startSettleMachine(), store, id, palette(&runs), endsDecoder()) + if err != nil { + t.Fatalf("Recover: %v", err) + } + if rec := rh.Instance().Entity().Notes; len(rec) != 1 || rec[0] != live[0] { + t.Fatalf("after Recover the notes = %q, want the live run's %q", rec, live) + } + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("kid instantiated %d times, want 1", got) + } + // StateAt at the settle's step shows the same notes the live run recorded, as + // the Fire, Tick and RunService ends' do (checkEndsRecovered): the start's settle + // is journaled with the step after, so the view at step 0 holds it. + v, err := durable.StateAt(ctx, startSettleMachine(), store, id, 0, palette(&runs), endsDecoder()) + if err != nil { + t.Fatalf("StateAt: %v", err) + } + if got := v.Instance().Entity().Notes; len(got) != 1 || got[0] != live[0] { + t.Fatalf("StateAt(0) notes = %q, want the live run's %q", got, live) + } + + // A settle Start drove runs before any step, so a journal with no Record yet — + // the baseline — holds none of it: a Recover from there re-runs the spawns, whose + // settle a decoder that can't decode the done-data fails, before it returns a + // Handle. + base := durable.NewMemStore() + var baseRuns int64 + if _, err = durable.NewRunner(startSettleMachine(), base, palette(&baseRuns), endsDecoder()). + Start(ctx, "startsettle-3", outcomeCtx{}, state.WithInitialState("both")); err != nil { + t.Fatalf("Start: %v", err) + } + // A decoder that can't decode kid's done-data fails Start, whose spawns drive the + // settle, recording nothing. No Handle exists yet, so the error wraps + // ErrEventDataEncoding directly, as an undecodable WithEventData payload's does. + failing := childDoneDecoder(func([]byte) (any, error) { return nil, errors.New("decoder refused") }) + var fresh int64 + fstore := durable.NewMemStore() + if _, err = durable.NewRunner(startSettleMachine(), fstore, palette(&fresh), failing). + Start(ctx, "startsettle-2", outcomeCtx{}, state.WithInitialState("both")); !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("Start with a failing decoder = %v, want the undecodable done-data's error", err) + } + if _, recs, lerr := fstore.Load(ctx, "startsettle-2"); lerr != nil || len(recs) != 0 { + t.Fatalf("the journal holds %d Records (err %v), want none", len(recs), lerr) + } + // ... and a Recover from the baseline, whose respawns drive the same settle. + if _, err = durable.Recover(ctx, startSettleMachine(), base, "startsettle-3", palette(&baseRuns), failing); !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("Recover from the baseline with a failing decoder = %v, want the undecodable done-data's error", err) + } + // The journaled settle fails a replay whose decoder can't decode it, as the live + // settle refused it, before any Assign runs again. + if _, err = durable.Recover(ctx, startSettleMachine(), store, id, palette(&runs), failing); !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("Recover with a failing decoder = %v, want the undecodable done-data's error", err) + } +} diff --git a/durable/actor_outcome_replay_test.go b/durable/actor_outcome_replay_test.go new file mode 100644 index 00000000..77e6167d --- /dev/null +++ b/durable/actor_outcome_replay_test.go @@ -0,0 +1,409 @@ +package durable_test + +import ( + "context" + "errors" + "fmt" + "strings" + "sync/atomic" + "testing" + + "github.com/stablekernel/crucible/durable" + "github.com/stablekernel/crucible/state" +) + +// This file pins issue #256: an actor's done data and its error must replay +// exactly as the live run delivered them, the way service results do since #235 +// and #258. The parent's onDone / onError Assign folds what it saw — the payload's +// Go type and form — into the context, so a recovered instance's context can be +// compared against the live one: the same type live and after Recover, the same +// error message live and after Recover. + +// order is a done-data value with a concrete Go type, the shape whose live/replay +// asymmetry the issue reports: live the parent's Assign sees an order, after +// Recover a map. +type order struct{ ID int } + +// outcomeCtx folds each settled actor's routed outcome as the parent's Assign saw +// it: the payload's Go type and fmt form, an error's message quoted so a UTF-8 +// replacement shows as an escape, so live and recovered contexts compare exactly. +type outcomeCtx struct { + Notes []string `json:"notes"` +} + +// collectorMachine is a single-actor parent whose onDone / onError Assigns record +// what the actor's outcome looked like from AssignCtx.Event: its Go type and value, +// so the recorded notes say whether the live run and a replay delivered the same +// type. For an error the note quotes the message, so invalid UTF-8 and its U+FFFD +// replacement differ visibly. +func collectorMachine() *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("collector"). + Reducer("recordDone", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + c := in.Entity + c.Notes = append(c.Notes, fmt.Sprintf("%T:%v", in.Event, in.Event)) + return c + }). + Reducer("recordFail", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + c := in.Entity + if e, ok := in.Event.(error); ok { + c.Notes = append(c.Notes, fmt.Sprintf("%T:%q", e, e.Error())) + } else { + c.Notes = append(c.Notes, fmt.Sprintf("%T:%v", in.Event, in.Event)) + } + return c + }). + Actor("spawnChild"). + State("supervising").InvokeActor("spawnChild", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childFail")). + State("complete").Final(). + State("failed").Final(). + Initial("supervising"). + Transition("supervising").On("childDone").GoTo("complete").Assign("recordDone"). + Transition("supervising").On("childFail").GoTo("failed").Assign("recordFail"). + Quench() +} + +// outputChild builds an actor behavior whose completion output is output, a fixed +// Go value: the child is working -(finish)-> done(final), so the actor settles with +// output when delivered "finish". +func outputChild(runs *int64, output any) state.ActorBehavior { + return func(map[string]any) (state.ActorInstance, error) { + atomic.AddInt64(runs, 1) + child := state.ForgeFor[outcomeCtx]("child"). + State("working"). + State("done").Final(). + Initial("working"). + Transition("working").On("finish").GoTo("done"). + Quench() + inst := child.Cast(outcomeCtx{}, state.WithInitialState[string]("working")) + return state.NewActor(inst, func(*state.Instance[string, string, outcomeCtx]) any { + return output + }), nil + } +} + +// utf8FailChild builds an actor behavior that fails with an error whose message +// holds invalid UTF-8: the child's final state runs an action that returns such an +// error, so the child's Fire fails and the actor settles through onError carrying +// it. +func utf8FailChild(runs *int64) state.ActorBehavior { + return func(map[string]any) (state.ActorInstance, error) { + atomic.AddInt64(runs, 1) + child := state.ForgeFor[outcomeCtx]("child"). + Action("boom", func(state.ActionCtx[outcomeCtx]) (state.Effect, error) { + return nil, errors.New("boom-\xff") + }). + State("working"). + State("done").Final().OnEntry("boom"). + Initial("working"). + Transition("working").On("finish").GoTo("done"). + Quench() + inst := child.Cast(outcomeCtx{}, state.WithInitialState[string]("working")) + return state.NewActor(inst, nil), nil + } +} + +// panickingErr is an error whose Error method panics on a nil receiver: the shape +// a typed nil settles with. +type panickingErr struct{ msg string } + +func (e *panickingErr) Error() string { return e.msg } + +// panickingChild builds an actor behavior backed by a bespoke ActorInstance whose +// FireErr reports a typed nil (*panickingErr)(nil): the actor settles through +// onError carrying an error whose Error method panics, as a host's own +// ActorInstance can produce. +func panickingChild(runs *int64) state.ActorBehavior { + return func(map[string]any) (state.ActorInstance, error) { + atomic.AddInt64(runs, 1) + return &panickingInstance{}, nil + } +} + +// panickingInstance is a bespoke ActorInstance whose every Fire fails with a typed +// nil error, so the ActorSystem settles it as a failure carrying an error whose +// Error method panics. +type panickingInstance struct{} + +func (p *panickingInstance) DeliverFire(context.Context, any) (bool, any) { return true, nil } +func (p *panickingInstance) ChildEffects() []state.Effect { return nil } +func (p *panickingInstance) Output() any { return nil } +func (p *panickingInstance) FireErr() error { return (*panickingErr)(nil) } + +// liveOutcomeRun starts a collector instance, delivers "finish" to its spawned +// child (settling it through onDone or onError), and returns the notes the parent's +// Assigns recorded live and the store and id for recovery. A delivery that fails +// the Handle reports the error instead. +func liveOutcomeRun(t *testing.T, behavior state.ActorBehavior, opt durable.Option[string, string, outcomeCtx]) ([]string, durable.InstanceID, durable.Store, error) { + t.Helper() + ctx := context.Background() + m := collectorMachine() + store := durable.NewMemStore() + id := durable.InstanceID("collect-1") + + opts := []durable.Option[string, string, outcomeCtx]{ + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"spawnChild": behavior}), + } + if opt != nil { + opts = append(opts, opt) + } + h, err := durable.NewRunner(m, store, opts...).Start(ctx, id, outcomeCtx{}, state.WithInitialState("supervising")) + if err != nil { + t.Fatalf("Start: %v", err) + } + ref, ok := h.ActorRef(state.ActorID("collector", "supervising", 0)) + if !ok { + t.Fatalf("no actor ref for spawned child") + } + if _, derr := h.DeliverToActor(ctx, ref, "finish"); derr != nil { + return nil, id, store, derr + } + return h.Instance().Entity().Notes, id, store, nil +} + +// recoveredNotes recovers the instance and returns the notes its Assigns recorded +// on replay. +func recoveredNotes(t *testing.T, behavior state.ActorBehavior, opt durable.Option[string, string, outcomeCtx], store durable.Store, id durable.InstanceID) []string { + t.Helper() + ctx := context.Background() + opts := []durable.Option[string, string, outcomeCtx]{ + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"spawnChild": behavior}), + } + if opt != nil { + opts = append(opts, opt) + } + h, err := durable.Recover(ctx, collectorMachine(), store, id, opts...) + if err != nil { + t.Fatalf("Recover: %v", err) + } + return h.Instance().Entity().Notes +} + +// TestActor_DoneData_SameTypeLiveAndAfterRecover pins the issue's first effect: an +// actor that finishes with a concrete Go value — an order, an int64 — delivers it +// through the onDone event's WithEventDataDecoder, so the parent's Assign sees the +// same type live and after Recover. With a decoder both see the registered type; +// without one both see JSON's generic form, as a service result does. +func TestActor_DoneData_SameTypeLiveAndAfterRecover(t *testing.T) { + tests := []struct { + name string + output any + decode durable.EventDataDecoder[string] + want string + }{ + {"an order with a decoder", order{ID: 7}, decodeAll[order], "durable_test.order:{7}"}, + {"an int64 with a decoder", int64(5), decodeAll[int64], "int64:5"}, + {"no decoder", order{ID: 7}, nil, ""}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var runs int64 + behavior := outputChild(&runs, tt.output) + var opt durable.Option[string, string, outcomeCtx] + if tt.decode != nil { + opt = durable.WithEventDataDecoder[string, string, outcomeCtx](tt.decode) + } + live, id, store, err := liveOutcomeRun(t, behavior, opt) + if err != nil { + t.Fatalf("DeliverToActor: %v", err) + } + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("live run instantiated the actor %d times, want 1", got) + } + rec := recoveredNotes(t, behavior, opt, store, id) + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("recovery re-ran the actor: run count %d, want 1", got) + } + if len(live) != 1 || len(rec) != 1 { + t.Fatalf("live notes %q, recovered notes %q, want one each", live, rec) + } + if live[0] != rec[0] { + t.Fatalf("the parent's Assign saw different done data live and after Recover:\n live=%s\n rec=%s", live[0], rec[0]) + } + if tt.want != "" && rec[0] != tt.want { + t.Fatalf("after Recover the parent's Assign saw %s, want %s", rec[0], tt.want) + } + }) + } +} + +// TestActor_Error_InvalidUTF8_LiveEqualsRecover pins the issue's second effect: an +// actor error whose message holds invalid UTF-8 reaches the parent's onError Assign +// with the same message live and after Recover, normalized the way a Store keeps +// it, not U+FFFD-replaced on one path only. +func TestActor_Error_InvalidUTF8_LiveEqualsRecover(t *testing.T) { + var runs int64 + behavior := utf8FailChild(&runs) + live, id, store, err := liveOutcomeRun(t, behavior, nil) + if err != nil { + t.Fatalf("DeliverToActor: %v", err) + } + rec := recoveredNotes(t, behavior, nil, store, id) + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("recovery re-ran the failing actor: run count %d, want 1", got) + } + if len(live) != 1 || len(rec) != 1 { + t.Fatalf("live notes %q, recovered notes %q, want one each", live, rec) + } + if live[0] != rec[0] { + t.Fatalf("the parent's Assign saw different error messages live and after Recover:\n live=%s\n rec=%s", live[0], rec[0]) + } +} + +// TestActor_Error_APanickingErrorMethod_LiveEqualsRecover pins the issue's third +// effect: an actor error whose Error method panics — a typed nil — settles with a +// message saying so, normalized, and the parent's onError Assign sees the same +// message live and after Recover, rather than the panic failing the Handle. The +// message is pinned exactly, with the actor's own wording: "actor error panicked" +// names the actor seam, not the service one, live and on replay alike. +func TestActor_Error_APanickingErrorMethod_LiveEqualsRecover(t *testing.T) { + var runs int64 + behavior := panickingChild(&runs) + live, id, store, err := liveOutcomeRun(t, behavior, nil) + if err != nil { + t.Fatalf("DeliverToActor: %v", err) + } + rec := recoveredNotes(t, behavior, nil, store, id) + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("recovery re-ran the failing actor: run count %d, want 1", got) + } + if len(live) != 1 || len(rec) != 1 { + t.Fatalf("live notes %q, recovered notes %q, want one each", live, rec) + } + if live[0] != rec[0] { + t.Fatalf("the parent's Assign saw different error messages live and after Recover:\n live=%s\n rec=%s", live[0], rec[0]) + } + // The exact live message: the actor seam's own wording for an Error method that + // panics, with the recovered value, normalized the way a Store keeps it. + want := fmt.Sprintf("*errors.errorString:%q", "actor error panicked: runtime error: invalid memory address or nil pointer dereference") + if live[0] != want || rec[0] != want { + t.Fatalf("the panicking error's message:\n live=%s\n rec=%s\n want=%s", live[0], rec[0], want) + } +} + +// TestActor_DoneData_AWrongDecoderOnReplayNamesTheDoneData pins the wording of the +// error a Recover's decoder fails an actor's recorded done-data with, held to the +// recorded type: it names the done-data, as the live settle's errors do, not a +// "service result", so a host reading it knows which outcome wouldn't decode. +func TestActor_DoneData_AWrongDecoderOnReplayNamesTheDoneData(t *testing.T) { + ctx := context.Background() + var runs int64 + behavior := outputChild(&runs, order{ID: 7}) + _, id, store, err := liveOutcomeRun(t, behavior, childDoneDecoder(durable.DecodeAs[order])) + if err != nil { + t.Fatalf("DeliverToActor: %v", err) + } + palette := durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"spawnChild": behavior}) + _, rerr := durable.Recover(ctx, collectorMachine(), store, id, palette, childDoneDecoder(durable.DecodeAs[scnAdmin])) + if !errors.Is(rerr, durable.ErrEventDataEncoding) { + t.Fatalf("Recover with a decoder for another type = %v, want ErrEventDataEncoding", rerr) + } + if !strings.Contains(rerr.Error(), "actor done-data decodes as") { + t.Fatalf("the replay error %q doesn't name the actor's done-data as the outcome that wouldn't decode", rerr) + } +} + +// endsDecoderFor is endsDecoder for a chosen decoder of childDone's done-data, so a +// test can hand kid's onDone a decoder that fails or returns another type. +func childDoneDecoder(d func([]byte) (any, error)) durable.Option[string, string, outcomeCtx] { + return durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + if e == "childDone" { + return d(data) + } + return durable.DecodeAs[any](data) + }) +} + +// TestActor_DoneDataThatWontDecode_IsNeverParked pins that an actor outcome has no +// parked form, as a service result that won't decode does: the settle aborts before it +// fires anything, so no Assign ran and the parent stays where it was; DeliverToActor +// fails the Handle with ErrHandleFailed wrapping ErrEventDataEncoding (a done-data +// with no JSON form fails it without the encoding error) and records nothing, so a +// Recover runs the actor again and the delivery settles once a decoder decodes it. +func TestActor_DoneDataThatWontDecode_IsNeverParked(t *testing.T) { + cases := []struct { + name string + opt durable.Option[string, string, outcomeCtx] // the live run's decoder + fixed durable.Option[string, string, outcomeCtx] // the recovered run's + output any + encoding bool // ErrHandleFailed wraps ErrEventDataEncoding + }{ + {"the decoder fails", childDoneDecoder(func([]byte) (any, error) { return nil, errors.New("decoder refused") }), childDoneDecoder(durable.DecodeAs[order]), order{ID: 7}, true}, + {"the decoder returns another type", childDoneDecoder(durable.DecodeAs[scnAdmin]), childDoneDecoder(durable.DecodeAs[order]), order{ID: 7}, true}, + {"the output has no JSON form", nil, nil, make(chan int), false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + ctx := context.Background() + var runs int64 + behavior := outputChild(&runs, tc.output) + store := durable.NewMemStore() + id := durable.InstanceID("collect-1") + runOpts := func(o durable.Option[string, string, outcomeCtx]) []durable.Option[string, string, outcomeCtx] { + opts := []durable.Option[string, string, outcomeCtx]{ + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"spawnChild": behavior}), + } + if o != nil { + opts = append(opts, o) + } + return opts + } + h, err := durable.NewRunner(collectorMachine(), store, runOpts(tc.opt)...). + Start(ctx, id, outcomeCtx{}, state.WithInitialState("supervising")) + if err != nil { + t.Fatalf("Start: %v", err) + } + ref, ok := h.ActorRef(state.ActorID("collector", "supervising", 0)) + if !ok { + t.Fatal("no actor ref for the spawned child") + } + _, derr := h.DeliverToActor(ctx, ref, "finish") + if !errors.Is(derr, durable.ErrHandleFailed) { + t.Fatalf("DeliverToActor = %v, want ErrHandleFailed: the settle aborted and nothing was recorded", derr) + } + if got := errors.Is(derr, durable.ErrEventDataEncoding); got != tc.encoding { + t.Fatalf("errors.Is(%v, ErrEventDataEncoding) = %v, want %v", derr, got, tc.encoding) + } + if got := h.Instance().Current(); got != "supervising" { + t.Fatalf("the parent reached %q, want supervising: the aborted settle fired nothing", got) + } + if notes := h.Instance().Entity().Notes; len(notes) != 0 { + t.Fatalf("the aborted settle ran Assigns: %q", notes) + } + if _, recs, lerr := store.Load(ctx, id); lerr != nil || len(recs) != 0 { + t.Fatalf("the journal holds %d Records (err %v), want none: nothing was recorded", len(recs), lerr) + } + + // A recovered Handle runs the actor again, and the delivery settles once its + // done-data decodes. A done-data with no JSON form aborts again, as it must. + rh, err := durable.Recover(ctx, collectorMachine(), store, id, runOpts(tc.fixed)...) + if err != nil { + t.Fatalf("Recover: %v", err) + } + if got := atomic.LoadInt64(&runs); got != 2 { + t.Fatalf("kid instantiated %d times, want 2: Recover ran it again", got) + } + ref, ok = rh.ActorRef(state.ActorID("collector", "supervising", 0)) + if !ok { + t.Fatal("no actor ref on the recovered Handle") + } + _, derr = rh.DeliverToActor(ctx, ref, "finish") + if tc.fixed == nil { + if !errors.Is(derr, durable.ErrHandleFailed) { + t.Fatalf("the redelivered unencodable done-data = %v, want ErrHandleFailed again", derr) + } + if _, recs, err := store.Load(ctx, id); err != nil || len(recs) != 0 { + t.Fatalf("the journal holds %d Records (err %v), want still none", len(recs), err) + } + return + } + if derr != nil { + t.Fatalf("the redelivered done-data with a fixed decoder: %v", derr) + } + notes := rh.Instance().Entity().Notes + want := "durable_test.order:{7}" + if len(notes) != 1 || notes[0] != want { + t.Fatalf("the settled redelivery's notes = %q, want [%s]", notes, want) + } + }) + } +} diff --git a/durable/actor_result_alias_test.go b/durable/actor_result_alias_test.go new file mode 100644 index 00000000..e0b9661f --- /dev/null +++ b/durable/actor_result_alias_test.go @@ -0,0 +1,292 @@ +package durable_test + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "strings" + "sync/atomic" + "testing" + + "github.com/stablekernel/crucible/durable" + alpha "github.com/stablekernel/crucible/durable/internal/typefixture/alpha/model" + "github.com/stablekernel/crucible/state" +) + +// These tests answer the actor-side form of the rename concern WithResultTypeAlias +// answers for service results: an actor's done-data is held to the Go type the live +// settle recorded, so a pure refactor that moves or renames the type fails Recover +// and StateAt for every journal already settled under the old name — and the alias +// admits the new type on the actor paths too, with no new API. + +// actorAlias is the option mapping a done-data type recorded before a rename, as +// rewriteActorTypes stands in for one, to alpha.Result. +func actorAlias() durable.Option[string, string, outcomeCtx] { + return durable.WithResultTypeAlias[string, string, outcomeCtx](movedFromType, alpha.Result{}) +} + +// actorAssigns counts the parent's onDone Assigns and what each saw, so a test can +// tell whether a replay ran one and with which value. +type actorAssigns struct { + done int + seen []string +} + +// aliasCollectorMachine is collectorMachine whose Assigns report to a, so a test +// reads them even when Recover fails. +func aliasCollectorMachine(a *actorAssigns) *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("collector"). + Reducer("recordDone", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + a.done++ + a.seen = append(a.seen, fmt.Sprintf("%T:%v", in.Event, in.Event)) + return in.Entity + }). + Actor("kid"). + State("supervising").InvokeActor("kid", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childFail")). + State("complete").Final(). + State("failed").Final(). + Initial("supervising"). + Transition("supervising").On("childDone").GoTo("complete").Assign("recordDone"). + Transition("supervising").On("childFail").GoTo("failed"). + Quench() +} + +// aliasDecoder decodes the parent's childDone done-data as alpha.Result and every +// other event's payload as JSON's own form. +func aliasDecoder() durable.Option[string, string, outcomeCtx] { + return childDoneDecoder(durable.DecodeAs[alpha.Result]) +} + +// settledActorDone settles an alpha.Result done-data for alias-1 live, under a +// decoder for it, and returns what Recover and StateAt need. +func settledActorDone(t *testing.T, a *actorAssigns) (*state.Machine[string, string, outcomeCtx], *int64, *durable.MemStore, durable.InstanceID) { + t.Helper() + var runs int64 + behavior := outputChild(&runs, alpha.Result{ID: 7, Name: "ann"}) + m := aliasCollectorMachine(a) + store := durable.NewMemStore() + id := durable.InstanceID("alias-1") + h, err := durable.NewRunner(m, store, + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"kid": behavior}), + aliasDecoder()).Start(context.Background(), id, outcomeCtx{}, state.WithInitialState("supervising")) + if err != nil { + t.Fatalf("Start: %v", err) + } + ref, ok := h.ActorRef(state.ActorID("collector", "supervising", 0)) + if !ok { + t.Fatalf("no actor ref for the spawned child") + } + if _, derr := h.DeliverToActor(context.Background(), ref, "finish"); derr != nil { + t.Fatalf("DeliverToActor: %v", derr) + } + return m, &runs, store, id +} + +// rewriteActorTypes copies id's journal into a fresh MemStore with every recorded +// actor entry's done-data Type from replaced by to, as if the type had been moved +// after the settle that recorded it. +func rewriteActorTypes(t *testing.T, src *durable.MemStore, id durable.InstanceID, from, to string) *durable.MemStore { + t.Helper() + ctx := context.Background() + snap, recs, err := src.Load(ctx, id) + if err != nil { + t.Fatalf("Load: %v", err) + } + dst := durable.NewMemStore() + if err = dst.Checkpoint(ctx, id, snap, -1); err != nil { + t.Fatalf("Checkpoint: %v", err) + } + rewrote := 0 + for _, rec := range recs { + for i, e := range rec.Entries { + if e.Kind != state.JournalActorMessage { + continue + } + var p map[string]any + if err = json.Unmarshal(e.Payload, &p); err != nil { + t.Fatalf("decoding an actor entry: %v", err) + } + if p["type"] == from { + p["type"] = to + rewrote++ + } + if rec.Entries[i].Payload, err = json.Marshal(p); err != nil { + t.Fatalf("encoding an actor entry: %v", err) + } + } + if _, err = dst.Append(ctx, id, rec); err != nil { + t.Fatalf("Append: %v", err) + } + } + if rewrote == 0 { + t.Fatalf("no actor entry recorded the type %s", from) + } + return dst +} + +// TestActorResultTypeAlias_RenamedDoneData: an actor's done-data recorded under the +// type's old name fails Recover and StateAt with ErrEventDataEncoding under a decoder +// for the type's new name, naming the recorded type and the done-data; the +// WithResultTypeAlias that admits a renamed service result admits the new type on +// both paths, and the value onDone's Assign sees is the one the actor produced. +func TestActorResultTypeAlias_RenamedDoneData(t *testing.T) { + ctx := context.Background() + a := &actorAssigns{} + m, runs, store, id := settledActorDone(t, a) + renamed := rewriteActorTypes(t, store, id, alphaResultType, movedFromType) + steps, stepsErr := durable.Steps(ctx, renamed, id) + if stepsErr != nil || len(steps) != 1 { + t.Fatalf("Steps = %v, %v; want the settle", steps, stepsErr) + } + palette := func() durable.Option[string, string, outcomeCtx] { + var r int64 + return durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"kid": outputChild(&r, alpha.Result{ID: 7, Name: "ann"})}) + } + for _, what := range []struct { + name string + call func(opts ...durable.Option[string, string, outcomeCtx]) error + }{ + {"Recover", func(opts ...durable.Option[string, string, outcomeCtx]) error { + _, err := durable.Recover(ctx, aliasCollectorMachine(a), renamed, id, opts...) + return err + }}, + {"StateAt", func(opts ...durable.Option[string, string, outcomeCtx]) error { + _, err := durable.StateAt(ctx, aliasCollectorMachine(a), renamed, id, steps[0], opts...) + return err + }}, + } { + err := what.call(palette(), aliasDecoder()) + if !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("%s without the alias: %v, want ErrEventDataEncoding", what.name, err) + } + if !strings.Contains(err.Error(), movedFromType) { + t.Fatalf("%s without the alias: %v, want it to name the recorded type %s", what.name, err, movedFromType) + } + if !strings.Contains(err.Error(), "actor done-data") { + t.Fatalf("%s without the alias: %v, want it to name the actor's done-data", what.name, err) + } + } + if a.done != 1 { + t.Fatalf("a failed replay ran an Assign: onDone %d times", a.done) + } + + h, err := durable.Recover(ctx, m, renamed, id, palette(), aliasDecoder(), actorAlias()) + if err != nil { + t.Fatalf("Recover with the alias: %v", err) + } + if got := h.Instance().Current(); got != "complete" { + t.Fatalf("Recover with the alias: in %q, want complete", got) + } + if a.done != 2 || a.seen[1] != a.seen[0] { + t.Fatalf("replay with the alias ran onDone %d times and saw %v, want the live run's %v", a.done, a.seen, a.seen[:1]) + } + if got := atomic.LoadInt64(runs); got != 1 { + t.Fatalf("the actor's behavior ran %d times, want once", got) + } + if _, err := durable.StateAt(ctx, m, renamed, id, steps[0], palette(), aliasDecoder(), actorAlias()); err != nil { + t.Fatalf("StateAt with the alias: %v", err) + } +} + +// threeSettlesActorMachine settles its child three times: each state invokes the +// child, and each onDone enters the next state, which invokes it again, so a +// checkpoint after the second settle leaves the third one in the tail a Recover from +// that checkpoint replays. +func threeSettlesActorMachine(a *actorAssigns) *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("collector"). + Reducer("recordDone", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + a.done++ + a.seen = append(a.seen, fmt.Sprintf("%T:%v", in.Event, in.Event)) + return in.Entity + }). + Actor("kid"). + State("first").InvokeActor("kid", state.WithInvokeOnDone("childDone1"), state.WithInvokeOnError("childFail")). + State("second").InvokeActor("kid", state.WithInvokeOnDone("childDone2"), state.WithInvokeOnError("childFail")). + State("third").InvokeActor("kid", state.WithInvokeOnDone("childDone3"), state.WithInvokeOnError("childFail")). + State("ready").Final(). + State("failed").Final(). + Initial("first"). + Transition("first").On("childDone1").GoTo("second").Assign("recordDone"). + Transition("first").On("childFail").GoTo("failed"). + Transition("second").On("childDone2").GoTo("third").Assign("recordDone"). + Transition("second").On("childFail").GoTo("failed"). + Transition("third").On("childDone3").GoTo("ready").Assign("recordDone"). + Transition("third").On("childFail").GoTo("failed"). + Quench() +} + +// threeSettlesDecoder decodes each childDone done-data as alpha.Result and every +// other event's payload as JSON's own form. +func threeSettlesDecoder() durable.Option[string, string, outcomeCtx] { + return durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + switch e { + case "childDone1", "childDone2", "childDone3": + return durable.DecodeAs[alpha.Result](data) + } + return durable.DecodeAs[any](data) + }) +} + +// TestActorResultTypeAlias_RenamedDoneDataThroughCheckpoint: a checkpoint that +// compacts the earlier settles leaves the last one in the tail, and a Recover from it +// replays that settle's recorded done-data type: the old name fails it, and the +// WithResultTypeAlias settles it, with the value the actor produced. +func TestActorResultTypeAlias_RenamedDoneDataThroughCheckpoint(t *testing.T) { + ctx := context.Background() + var runs int64 + a := &actorAssigns{} + m := threeSettlesActorMachine(a) + behavior := outputChild(&runs, alpha.Result{ID: 7, Name: "ann"}) + store := durable.NewMemStore() + id := durable.InstanceID("alias-1") + // A checkpoint lands after the second settle (steps 0 and 2 of three cross no + // boundary; step 1 crosses 2), compacting the first two and leaving the third. + every := durable.WithCheckpointEvery[string, string, outcomeCtx](2) + h, err := durable.NewRunner(m, store, + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"kid": behavior}), + threeSettlesDecoder(), every).Start(ctx, id, outcomeCtx{}, state.WithInitialState("first")) + if err != nil { + t.Fatalf("Start: %v", err) + } + for _, st := range []string{"first", "second", "third"} { + ref, ok := h.ActorRef(state.ActorID("collector", st, 0)) + if !ok { + t.Fatalf("no actor ref for the child in %q", st) + } + if _, derr := h.DeliverToActor(ctx, ref, "finish"); derr != nil { + t.Fatalf("DeliverToActor in %q: %v", st, derr) + } + } + // The first two settles checkpointed; the tail holds the third one. + _, recs, lerr := store.Load(ctx, id) + if lerr != nil || len(recs) != 1 || recs[0].Step != 2 { + t.Fatalf("the journal holds %v (err %v), want only the third settle at step 2", recs, lerr) + } + if a.done != 3 { + t.Fatalf("the live run settled %d times, want 3", a.done) + } + renamed := rewriteActorTypes(t, store, id, alphaResultType, movedFromType) + palette := durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"kid": behavior}) + if _, rerr := durable.Recover(ctx, m, renamed, id, palette, threeSettlesDecoder(), every); !errors.Is(rerr, durable.ErrEventDataEncoding) { + t.Fatalf("Recover from the checkpoint without the alias: %v, want ErrEventDataEncoding", rerr) + } else if !strings.Contains(rerr.Error(), movedFromType) || !strings.Contains(rerr.Error(), "actor done-data") { + t.Fatalf("Recover from the checkpoint without the alias: %v, want it to name the recorded type %s and the actor's done-data", rerr, movedFromType) + } + if a.done != 3 { + t.Fatalf("a failed replay ran an Assign: onDone %d times", a.done) + } + if got := atomic.LoadInt64(&runs); got != 3 { + t.Fatalf("the actor's behavior ran %d times, want 3", got) + } + h, err = durable.Recover(ctx, m, renamed, id, palette, threeSettlesDecoder(), actorAlias(), every) + if err != nil { + t.Fatalf("Recover from the checkpoint with the alias: %v", err) + } + if got := h.Instance().Current(); got != "ready" { + t.Fatalf("in %q, want ready", got) + } + if a.done != 4 || a.seen[3] != a.seen[2] { + t.Fatalf("replay with the alias ran onDone %d times and saw %v, want the third settle's %v", a.done, a.seen, a.seen[2:3]) + } +} diff --git a/durable/actor_settle_routing_test.go b/durable/actor_settle_routing_test.go new file mode 100644 index 00000000..2f7e14e2 --- /dev/null +++ b/durable/actor_settle_routing_test.go @@ -0,0 +1,477 @@ +package durable_test + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "reflect" + "sync/atomic" + "testing" + + "github.com/stablekernel/crucible/durable" + "github.com/stablekernel/crucible/state" +) + +// These tests pin the routing half of the settle transform's contract, which the +// review of #268 surfaced: the transform runs only when the settle routes a +// completion, so an actor spawned with neither an onDone nor an onError — a dynamic +// spawn routes nothing, where an invoked actor always routes, firing the zero event +// its unset outcome leaves — settles as the no-op it was before the transform +// existed. No decoder is consulted, so an output that won't encode can't fail the +// step; nothing is recorded for the settle, so Recover and StateAt replay the run +// with no done-data to hold a decoder to. + +// quietMachine spawns its child through the spawn action with no onDone and no +// onError, so the child's settle routes nothing; "poke" stays in supervising, so a +// test can prove the Handle is healthy after the unrouted settle. +func quietMachine() *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("quiet"). + State("idle"). + State("supervising"). + Initial("idle"). + Transition("idle").On("start").GoTo("supervising").Spawn("kid", "quiet-kid"). + Transition("supervising").On("poke").GoTo("supervising"). + Quench() +} + +// quietStart starts a quietMachine with the given child behavior and extra options, +// fires "start" to spawn the routing-less child, and returns the Handle and its +// Store and instance id. +func quietStart(t *testing.T, behavior state.ActorBehavior, opts ...durable.Option[string, string, outcomeCtx]) ( + *durable.Handle[string, string, outcomeCtx], *durable.MemStore, durable.InstanceID, +) { + t.Helper() + ctx := context.Background() + m := quietMachine() + all := append([]durable.Option[string, string, outcomeCtx]{ + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"kid": behavior}), + }, opts...) + store, id := durable.NewMemStore(), durable.InstanceID("quiet-settle") + h, err := durable.NewRunner(m, store, all...).Start(ctx, id, outcomeCtx{}, state.WithInitialState("idle")) + if err != nil { + t.Fatalf("Start: %v", err) + } + if _, ferr := h.Fire(ctx, "start"); ferr != nil { + t.Fatalf("Fire(start): %v", ferr) + } + return h, store, id +} + +// quietDeliver delivers "finish" to the routing-less child and asserts the delivery +// drove an unrouted settle that neither failed the Handle nor recorded an actor +// entry, and that the Handle stays healthy, Recover works, and StateAt works. +func quietDeliver(t *testing.T, h *durable.Handle[string, string, outcomeCtx], store *durable.MemStore, id durable.InstanceID) { + t.Helper() + ctx := context.Background() + if delivered, derr := h.DeliverToActorByID(ctx, "quiet-kid", "finish"); derr != nil || !delivered { + t.Fatalf("DeliverToActorByID = %v, %v; want the unrouted settle to drive a healthy step", delivered, derr) + } + if _, ferr := h.Fire(ctx, "poke"); ferr != nil { + t.Fatalf("Fire after the unrouted settle: %v, want the Handle healthy", ferr) + } + // Nothing was recorded for the settle: no actor entry anywhere in the journal. + _, recs, lerr := store.Load(ctx, id) + if lerr != nil { + t.Fatalf("Load: %v", lerr) + } + entries := 0 + for _, rec := range recs { + for _, e := range rec.Entries { + if e.Kind == state.JournalActorMessage { + entries++ + } + } + } + if entries != 0 { + t.Fatalf("the journal holds %d actor entries, want none: the unrouted settle recorded nothing", entries) + } + // Recover and StateAt replay the run without the done-data. + if _, rerr := durable.Recover(ctx, quietMachine(), store, id, + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"kid": outputChild(new(int64), nil)})); rerr != nil { + t.Fatalf("Recover: %v", rerr) + } + steps, serr := durable.Steps(ctx, store, id) + if serr != nil || len(steps) == 0 { + t.Fatalf("Steps = %v, %v; want the recorded steps", steps, serr) + } + if _, aerr := durable.StateAt(ctx, quietMachine(), store, id, steps[len(steps)-1], + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{"kid": outputChild(new(int64), nil)})); aerr != nil { + t.Fatalf("StateAt: %v", aerr) + } +} + +// TestDeliverToActor_AnUnroutedSettleWithUnencodableOutputIsANoOp proves an actor +// whose completion routes nothing settles as a no-op even when its Output() won't +// encode — a channel — where the same output routed to an onDone would abort the +// settle and fail the Handle: the unrouted settle consults no transform, the +// delivery records nothing for it, the Handle stays healthy, and Recover and StateAt +// replay the run. +func TestDeliverToActor_AnUnroutedSettleWithUnencodableOutputIsANoOp(t *testing.T) { + var runs int64 + h, store, id := quietStart(t, outputChild(&runs, make(chan int))) + quietDeliver(t, h, store, id) + // The child's behavior ran once, live; neither replay re-runs it, and a spawn + // doesn't return on Recover. + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("the child's behavior ran %d times, want the live run's once", got) + } +} + +// TestDeliverToActor_AnUnroutedSettleConsultsNoDecoder proves the unrouted settle +// never reaches the decoder: an actor whose completion routes nothing, with an output +// that encodes cleanly, settles as a no-op under a decoder that refuses the zero +// event the settle would have handed it — the event an onDone-less spawn leaves. +func TestDeliverToActor_AnUnroutedSettleConsultsNoDecoder(t *testing.T) { + refuses := errors.New("refuses the zero event") + decoder := durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + if e == "" { + return nil, refuses + } + return durable.DecodeAs[any](data) + }) + var runs int64 + h, store, id := quietStart(t, outputChild(&runs, "payload"), decoder) + quietDeliver(t, h, store, id) + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("the child's behavior ran %d times, want the live run's once", got) + } +} + +// twinMachine's "waiting" state invokes two children, left and right, each routing +// its own onDone, and "kick" stays in waiting (an internal self-transition, so +// neither child is stopped or respawned) while sending each child "finish": one +// Fire's absorb finishes both, each settling with its own done-data. +func twinMachine(a *actorAssigns) *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("twins"). + Reducer("recordDone", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + a.done++ + a.seen = append(a.seen, fmt.Sprintf("%T:%v", in.Event, in.Event)) + return in.Entity + }). + Actor("leftKid"). + Actor("rightKid"). + State("waiting"). + InvokeActor("leftKid", state.WithInvokeOnDone("leftDone")). + InvokeActor("rightKid", state.WithInvokeOnDone("rightDone")). + Initial("waiting"). + Transition("waiting").On("kick").GoTo("waiting"). + SendTo(state.ActorID("twins", "waiting", 0), "finish"). + SendTo(state.ActorID("twins", "waiting", 1), "finish"). + Transition("waiting").On("leftDone").GoTo("waiting").Assign("recordDone"). + Transition("waiting").On("rightDone").GoTo("waiting").Assign("recordDone"). + Quench() +} + +// twinDecoder decodes the left child's done-data as an order and the right child's +// as a string, so each onDone's Assign sees the type its actor produced. +func twinDecoder() durable.Option[string, string, outcomeCtx] { + return durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + switch e { + case "leftDone": + return durable.DecodeAs[order](data) + case "rightDone": + return durable.DecodeAs[string](data) + } + return durable.DecodeAs[any](data) + }) +} + +// twinSettles is one journal entry a settle drove, as the test reads it: the actor +// it settled, and the done-data and Go type it recorded. +type twinSettles struct { + actor string + data string + typ string +} + +// TestFire_TwoSettlesInOneStepEachDoneDataItsOwn proves one driving step that +// finishes two actors journals each settle's own done-data under its own actor, and +// delivers each onDone's Assign its own value — live, after Recover, and through +// StateAt — so a relay that swapped one settle's JSON into the other's slot, or +// dropped it, fails: each entry's Data and Type are asserted per actor, as each +// Assign's value is per event. +func TestFire_TwoSettlesInOneStepEachDoneDataItsOwn(t *testing.T) { + ctx := context.Background() + a := &actorAssigns{} + var runs int64 + m := twinMachine(a) + palette := durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "leftKid": outputChild(&runs, order{ID: 41}), + "rightKid": outputChild(&runs, "right is done"), + }) + store, id := durable.NewMemStore(), durable.InstanceID("twins-one-step") + h, err := durable.NewRunner(m, store, palette, twinDecoder()).Start(ctx, id, outcomeCtx{}, state.WithInitialState("waiting")) + if err != nil { + t.Fatalf("Start: %v", err) + } + if _, ferr := h.Fire(ctx, "kick"); ferr != nil { + t.Fatalf("Fire(kick): %v", ferr) + } + + // The live run: both settles ran in the one driving step, each Assign seeing its + // own actor's done-data, in send order. + wantLeft, wantRight := a.seen[0], a.seen[1] + if a.done != 2 { + t.Fatalf("the Fire settled %d actors, want 2", a.done) + } + if wantLeft != fmt.Sprintf("%T:%v", order{ID: 41}, order{ID: 41}) { + t.Fatalf("the left Assign saw %q, want the left child's order", wantLeft) + } + if wantRight != "string:right is done" { + t.Fatalf("the right Assign saw %q, want the right child's string", wantRight) + } + + // The journal: one actor entry per settle, each under its own actor, carrying + // that actor's done-data and its Go type. + left, right := state.ActorID("twins", "waiting", 0), state.ActorID("twins", "waiting", 1) + ord := reflect.TypeOf(order{}) + wantLeftType, wantRightType := ord.PkgPath()+"."+ord.Name(), "string" + _, recs, lerr := store.Load(ctx, id) + if lerr != nil { + t.Fatalf("Load: %v", lerr) + } + var settles []twinSettles + for _, rec := range recs { + for _, e := range rec.Entries { + if e.Kind != state.JournalActorMessage { + continue + } + var mp struct { + Data json.RawMessage `json:"data"` + Type string `json:"type"` + HasData bool `json:"hasData"` + } + if uerr := json.Unmarshal(e.Payload, &mp); uerr != nil { + t.Fatalf("decoding the actor entry for %q: %v", e.CorrelationID, uerr) + } + if !mp.HasData { + t.Fatalf("the settle entry for %q carries no done-data", e.CorrelationID) + } + settles = append(settles, twinSettles{actor: e.CorrelationID, data: string(mp.Data), typ: mp.Type}) + } + } + if len(settles) != 2 { + t.Fatalf("the journal holds %d settle entries, want the two settles of the one step", len(settles)) + } + for i, want := range []twinSettles{ + {left, `{"ID":41}`, wantLeftType}, + {right, `"right is done"`, wantRightType}, + } { + if settles[i] != want { + t.Fatalf("settle entry %d = %+v, want %+v: each settle journals its own done-data and type under its own actor", i, settles[i], want) + } + } + + // Recover: the replay re-fires each settle's onDone with the recorded done-data, + // so each Assign sees the value the live run's did. + h2, rerr := durable.Recover(ctx, m, store, id, palette, twinDecoder()) + if rerr != nil { + t.Fatalf("Recover: %v", rerr) + } + if got := h2.Instance().Current(); got != "waiting" { + t.Fatalf("after Recover in %q, want waiting", got) + } + if a.done != 4 || a.seen[2] != wantLeft || a.seen[3] != wantRight { + t.Fatalf("replay settled %d times seeing %v, want each Assign its own live value [%q %q]", a.done, a.seen, wantLeft, wantRight) + } + + // StateAt, at the step that settled them, replays the same values. + steps, serr := durable.Steps(ctx, store, id) + if serr != nil || len(steps) == 0 { + t.Fatalf("Steps = %v, %v; want the recorded steps", steps, serr) + } + view, aerr := durable.StateAt(ctx, m, store, id, steps[len(steps)-1], palette, twinDecoder()) + if aerr != nil { + t.Fatalf("StateAt: %v", aerr) + } + if got := view.Instance().Current(); got != "waiting" { + t.Fatalf("StateAt in %q, want waiting", got) + } + if a.done != 6 || a.seen[4] != wantLeft || a.seen[5] != wantRight { + t.Fatalf("StateAt settled %d times seeing %v, want each Assign its own live value [%q %q]", a.done, a.seen, wantLeft, wantRight) + } + + // No replay re-ran the children: only the live run's behaviors ran. + if got := atomic.LoadInt64(&runs); got != 2 { + t.Fatalf("the children's behaviors ran %d times, want the live run's 2", got) + } +} + +// onDonelessMachine invokes kid with only an onError, so a success routes nothing: +// the invocation declared no onDone to carry the output. "poke" stays in supervising, +// so a test can prove the Handle is healthy after the unrouted settle. +func onDonelessMachine() *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("nodone"). + State("idle"). + State("supervising").InvokeActor("kid", state.WithInvokeOnError("childFail")). + State("failed"). + Initial("idle"). + Transition("idle").On("start").GoTo("supervising"). + Transition("supervising").On("childFail").GoTo("failed"). + Transition("supervising").On("poke").GoTo("supervising"). + Quench() +} + +// onDonelessKid is the stable id of onDonelessMachine's kid invocation. +var onDonelessKid = state.ActorID("nodone", "supervising", 0) + +// TestDeliverToActor_AnInvokedActorWithoutOnDoneIsUnrouted pins the invoked half of +// the unrouted-settle contract: an InvokeActor that declared no onDone settles its +// child's success as the no-op a dynamic spawn's always was — no decoder is consulted +// for the zero event an unset outcome used to leave, so a strict one can't fail the +// Handle — the delivery and every step after it succeed, and Recover and the +// redelivery do too. On the branch before the invocation's own flags decided routing, +// the delivery failed the Handle with ErrHandleFailed wrapping ErrEventDataEncoding, +// live and again after every Recover. +func TestDeliverToActor_AnInvokedActorWithoutOnDoneIsUnrouted(t *testing.T) { + ctx := context.Background() + var runs int64 + m := onDonelessMachine() + opts := []durable.Option[string, string, outcomeCtx]{ + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "kid": outputChild(&runs, order{ID: 7}), + }), + // A decoder that knows only childFail's payload, refusing every other event's, + // as a strict per-event decoder does. + durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + if e == "childFail" { + return durable.DecodeAs[any](data) + } + return nil, fmt.Errorf("no payload expected for event %q", e) + }), + } + store, id := durable.NewMemStore(), durable.InstanceID("nodone-1") + h, err := durable.NewRunner(m, store, opts...).Start(ctx, id, outcomeCtx{}, state.WithInitialState("idle")) + if err != nil { + t.Fatalf("Start: %v", err) + } + if _, ferr := h.Fire(ctx, "start"); ferr != nil { + t.Fatalf("Fire(start): %v", ferr) + } + if delivered, derr := h.DeliverToActorByID(ctx, onDonelessKid, "finish"); derr != nil || !delivered { + t.Fatalf("DeliverToActorByID = %v, %v; want the unrouted settle to drive a healthy step, as on main", delivered, derr) + } + if _, ferr := h.Fire(ctx, "poke"); ferr != nil { + t.Fatalf("Fire after the unrouted settle: %v, want the Handle healthy", ferr) + } + if notes := h.Instance().Entity().Notes; len(notes) != 0 { + t.Fatalf("the unrouted settle ran Assigns: %q", notes) + } + + // Recover succeeds, and a redelivery on the recovered Handle is the no-op it is + // on main — the actor settled, so none is in flight — not an error: the Handle is + // healthy, whatever the strict decoder would say for the zero event an unset + // outcome used to leave. + rh, rerr := durable.Recover(ctx, m, store, id, opts...) + if rerr != nil { + t.Fatalf("Recover: %v", rerr) + } + if _, derr := rh.DeliverToActorByID(ctx, onDonelessKid, "finish"); derr != nil { + t.Fatalf("the redelivered unrouted settle = %v; want no error, as on main: the actor settled, so the delivery is a no-op", derr) + } + if _, ferr := rh.Fire(ctx, "poke"); ferr != nil { + t.Fatalf("Fire after the redelivered unrouted settle: %v", ferr) + } + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("kid instantiated %d times, want the live run's once: no replay re-runs it", got) + } +} + +// refusedSettleMachine invokes kid with an onDone the parent declares no transition +// for, so the settle's onDone Fire is refused live and journaled as refused, carrying +// the kid's done-data. +func refusedSettleMachine() *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("refused"). + State("supervising").InvokeActor("kid", state.WithInvokeOnDone("childDone")). + Initial("supervising"). + Transition("supervising").On("poke").GoTo("supervising"). + Quench() +} + +// refusedKid is the stable id of refusedSettleMachine's kid invocation. +var refusedKid = state.ActorID("refused", "supervising", 0) + +// stripActorTypes copies id's journal into a fresh MemStore with the recorded Type +// dropped from every actor entry, as a Record from before settles recorded the type +// looks: a main-era journal holds the done-data with no type. +func stripActorTypes(t *testing.T, src *durable.MemStore, id durable.InstanceID) *durable.MemStore { + t.Helper() + ctx := context.Background() + snap, recs, err := src.Load(ctx, id) + if err != nil { + t.Fatalf("Load: %v", err) + } + dst := durable.NewMemStore() + if err = dst.Checkpoint(ctx, id, snap, -1); err != nil { + t.Fatalf("Checkpoint: %v", err) + } + stripped := 0 + for _, rec := range recs { + for i, e := range rec.Entries { + if e.Kind != state.JournalActorMessage { + continue + } + var p map[string]any + if err = json.Unmarshal(e.Payload, &p); err != nil { + t.Fatalf("decoding an actor entry: %v", err) + } + if _, had := p["type"]; had { + delete(p, "type") + stripped++ + } + if rec.Entries[i].Payload, err = json.Marshal(p); err != nil { + t.Fatalf("encoding an actor entry: %v", err) + } + } + if _, err = dst.Append(ctx, id, rec); err != nil { + t.Fatalf("Append: %v", err) + } + } + if stripped == 0 { + t.Fatalf("no actor entry recorded a type to strip") + } + return dst +} + +// TestRecover_ARefusedSettlesRecordedDataIsNeverDecoded pins the replay half of the +// routing fix: a journal a version before this one wrote can hold a settle whose +// parent Fire was refused — the zero-event settle of an onDone-less InvokeActor, on +// main — with its done-data recorded and no type, and Recover and StateAt must +// succeed on it under a strict decoder that refuses that event's payloads. The data +// of a fire whose replay will be refused is never read: replay re-fires the event +// plainly and meets the same refusal. Decoding the data, as the branch before the +// fix did, failed Recover and StateAt on histories that recovered fine on main. +func TestRecover_ARefusedSettlesRecordedDataIsNeverDecoded(t *testing.T) { + ctx := context.Background() + var runs int64 + m := refusedSettleMachine() + palette := durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "kid": outputChild(&runs, order{ID: 7}), + }) + live := durable.NewMemStore() + id := durable.InstanceID("refused-1") + h, err := durable.NewRunner(m, live, palette).Start(ctx, id, outcomeCtx{}, state.WithInitialState("supervising")) + if err != nil { + t.Fatalf("Start: %v", err) + } + if _, derr := h.DeliverToActorByID(ctx, refusedKid, "finish"); derr != nil { + t.Fatalf("DeliverToActorByID: %v; the refused settle records, it doesn't fail the step", derr) + } + // The journal holds the refused settle with its data and type; strip the type, as + // a main-era Record looks. + strict := durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + return nil, fmt.Errorf("no payload expected for event %q", e) + }) + aged := stripActorTypes(t, live, id) + if _, rerr := durable.Recover(ctx, m, aged, id, palette, strict); rerr != nil { + t.Fatalf("Recover of the refused settle's data = %v; want nil: a fire replay refuses is never decoded, as on main", rerr) + } + steps, serr := durable.Steps(ctx, aged, id) + if serr != nil || len(steps) == 0 { + t.Fatalf("Steps = %v, %v, want the recorded steps", steps, serr) + } + if _, aerr := durable.StateAt(ctx, m, aged, id, steps[len(steps)-1], palette, strict); aerr != nil { + t.Fatalf("StateAt of the refused settle's data = %v; want nil, as on main", aerr) + } +} diff --git a/durable/actor_start_abort_test.go b/durable/actor_start_abort_test.go new file mode 100644 index 00000000..65cd4b48 --- /dev/null +++ b/durable/actor_start_abort_test.go @@ -0,0 +1,164 @@ +package durable_test + +import ( + "context" + "errors" + "strings" + "sync/atomic" + "testing" + + "github.com/stablekernel/crucible/durable" + "github.com/stablekernel/crucible/state" +) + +// These tests pin what an aborted settle does to the ends that drive it, as the +// review's runner findings asked: Start's baseline is already written when its +// spawns' settle aborts, so a retry Start can't be a clean start; and a Fire +// whose own transition spawned the aborted actor records nothing, so a Recover +// restores the pre-event state and never respawns that actor. + +// TestStart_AnAbortedSettleLeavesTheBaselineForRecover pins Start's real +// behavior: when a settle Start's spawns drive aborts, the baseline checkpoint is +// already written, so a retry Start on the id returns ErrInstanceExists — the +// retry is a Recover from the baseline, which re-runs the spawns and aborts the +// same way, until the decoder is fixed. +func TestStart_AnAbortedSettleLeavesTheBaselineForRecover(t *testing.T) { + ctx := context.Background() + kid := state.ActorID("startsettle", "K", 0) + palette := func(runs *int64) durable.Option[string, string, outcomeCtx] { + return durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "kid": outputChild(runs, order{ID: 7}), + "finisher": func(map[string]any) (state.ActorInstance, error) { + return &poker{target: kid}, nil + }, + }) + } + failing := childDoneDecoder(func([]byte) (any, error) { return nil, errors.New("decoder refused") }) + var runs int64 + store := durable.NewMemStore() + id := durable.InstanceID("start-abort-retry") + if _, err := durable.NewRunner(startSettleMachine(), store, palette(&runs), failing). + Start(ctx, id, outcomeCtx{}, state.WithInitialState("both")); !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("Start with a failing decoder = %v, want the undecodable done-data's error", err) + } + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("kid instantiated %d times, want the live start's once", got) + } + // The baseline checkpoint is written, so a retry Start is refused: the retry is + // a Recover. + if _, err := durable.NewRunner(startSettleMachine(), store, palette(&runs), failing). + Start(ctx, id, outcomeCtx{}, state.WithInitialState("both")); !errors.Is(err, durable.ErrInstanceExists) { + t.Fatalf("the retry Start = %v, want ErrInstanceExists: the baseline is already written", err) + } + // A Recover from the baseline re-runs the spawns, whose settle aborts the same + // way: the actors ran again, and no Handle comes back until the decoder decodes. + if _, err := durable.Recover(ctx, startSettleMachine(), store, id, palette(&runs), failing); !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("Recover from the baseline with a failing decoder = %v, want the same abort, from the re-run spawns", err) + } + if got := atomic.LoadInt64(&runs); got != 2 { + t.Fatalf("kid instantiated %d times, want 2: the Recover re-ran the spawns", got) + } + // With the decoder fixed, that same Recover returns a Handle and settles kid. + h, err := durable.Recover(ctx, startSettleMachine(), store, id, palette(&runs), endsDecoder()) + if err != nil { + t.Fatalf("Recover with the fixed decoder: %v", err) + } + if notes := h.Instance().Entity().Notes; len(notes) != 1 || notes[0] != wantEndsNote { + t.Fatalf("the recovered notes = %q, want the settled kid's [%s]", notes, wantEndsNote) + } +} + +// selfFinisher is an actor that finishes itself as it spawns — the SendTo its +// initial entry emits targets the actor's own id, which the spawn passed as its +// input — and completes with a fixed output. +type selfFinisher struct { + self string + output any + sent bool +} + +func (s *selfFinisher) DeliverFire(_ context.Context, ev any) (bool, any) { + if ev == "finish" { + return true, s.output + } + return false, nil +} + +func (s *selfFinisher) ChildEffects() []state.Effect { + if s.sent { + return nil + } + s.sent = true + return []state.Effect{state.SendTo{TargetID: s.self, Event: "finish"}} +} +func (s *selfFinisher) Output() any { return s.output } + +// TestFire_AnAbortedSettleOfTheFiresOwnSpawnIsNotRespawned pins the Fire end of +// the abort rule: a Fire whose transition dynamically spawned an actor that +// settles at once with an outcome that won't record fails the Handle and records +// nothing, so a Recover restores the state before the event — which doesn't +// declare the spawn — and the actor isn't respawned: the host re-fires the event, +// and only then does the actor run again. The error carries the actor's own +// wording: its done-data won't encode. +func TestFire_AnAbortedSettleOfTheFiresOwnSpawnIsNotRespawned(t *testing.T) { + ctx := context.Background() + const kidID = "firespawn-kid" + m := state.ForgeFor[outcomeCtx]("firespawn"). + Reducer("recordDone", func(in state.AssignCtx[outcomeCtx]) outcomeCtx { + c := in.Entity + c.Notes = append(c.Notes, strings.TrimSpace(in.Event.(string)+" done")) + return c + }). + State("idle"). + State("spawning"). + Initial("idle"). + Transition("idle").On("go").GoTo("spawning"). + Spawn("selfish", kidID, + state.WithSpawnInput(map[string]any{"self": kidID}), + state.WithSpawnOnDone("childDone")). + Transition("spawning").On("childDone").GoTo("spawning").Assign("recordDone"). + Quench() + var runs int64 + palette := durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "selfish": func(input map[string]any) (state.ActorInstance, error) { + runs++ + self, _ := input["self"].(string) + return &selfFinisher{self: self, output: make(chan int)}, nil + }, + }) + store, id := durable.NewMemStore(), durable.InstanceID("firespawn-1") + h, err := durable.NewRunner(m, store, palette).Start(ctx, id, outcomeCtx{}, state.WithInitialState("idle")) + if err != nil { + t.Fatalf("Start: %v", err) + } + + // The Fire spawns the self-finishing actor, whose chan output can't record: the + // settle aborts, the Handle fails, and nothing is journaled for the step. + _, ferr := h.Fire(ctx, "go") + if !errors.Is(ferr, durable.ErrHandleFailed) { + t.Fatalf("Fire go = %v, want ErrHandleFailed: the settle aborted", ferr) + } + if !strings.Contains(ferr.Error(), "actor done-data won't encode") { + t.Fatalf("Fire go = %v, want the actor's own wording: the actor done-data won't encode", ferr) + } + if _, recs, lerr := store.Load(ctx, id); lerr != nil || len(recs) != 0 { + t.Fatalf("the journal holds %d Records (err %v), want none: the aborted step recorded nothing", len(recs), lerr) + } + + // A Recover restores the pre-event state, which declares no spawn: the actor + // isn't respawned, the Handle doesn't run it, and re-firing the event is what + // runs it again. + rh, rerr := durable.Recover(ctx, m, store, id, palette) + if rerr != nil { + t.Fatalf("Recover: %v", rerr) + } + if got := rh.Instance().Current(); got != "idle" { + t.Fatalf("after Recover the parent is in %q, want idle: the Fire recorded nothing", got) + } + if _, ok := rh.ActorRef(kidID); ok { + t.Fatal("the recovered Handle runs the Fire's own spawn, want it not respawned: the pre-event state declares it") + } + if got := atomic.LoadInt64(&runs); got != 1 { + t.Fatalf("the actor ran %d times, want the live Fire's once: no replay re-ran it", got) + } +} diff --git a/durable/doc.go b/durable/doc.go index ee87dfa5..f8f1ef08 100644 --- a/durable/doc.go +++ b/durable/doc.go @@ -35,11 +35,10 @@ // # Caveats // // Payloads are serialized at the journal boundary. Event, service done-data, actor -// done-data, and actor messages are recorded as their JSON form; a parent reducer that -// type-asserts a non-JSON Go type from AssignCtx.Event observes the JSON-decoded shape -// on a replayed onDone. A WithEventData payload is decoded from its JSON form live as -// well as on replay, so a reducer gets the same value both ways; WithEventDataDecoder -// decodes it as the type the caller passed. +// done-data, and actor messages are recorded as their JSON form. A WithEventData +// payload is decoded from its JSON form live as well as on replay, so a reducer gets +// the same value both ways; WithEventDataDecoder decodes it as the type the caller +// passed. // // A service result is decoded the same way, live and on replay. When // WithEventDataDecoder covers the invocation's onDone event, the result arrives as the @@ -63,6 +62,24 @@ // or the recorded type's new name is aliased (WithResultTypeAlias), and one added later // for the service's type changes what replay produces. // +// An actor's done-data gets the same decode, live as on replay: when the decoder covers +// the parent's onDone event it arrives as the decoder's type, and without one in JSON's +// generic form, held to the recorded Go type, which an alias from WithResultTypeAlias +// can rename as a service result's. An actor's error is message-only too, and one whose +// Error method panics settles with a message saying so. An actor outcome is never +// parked: done-data that won't decode, or decodes as a type other than the actor +// produced, fails the Handle — the delivery, or the Fire, Tick or RunService whose +// absorb drove the settle. The Fire, Tick and +// delivery ends record nothing, so the host re-drives the step on a recovered +// Handle: for a Fire, re-firing the event restores the state before it, so an +// actor the event's own transition spawned isn't respawned, while one that was +// already running is, and runs again. The RunService end records the service's own +// settle, which ran and decoded before the actor's aborted, so the ServiceFn never +// runs again either. A settle Start's spawns drive fails Start the same way, after +// the baseline checkpoint is written: a retry Start on the id returns +// ErrInstanceExists, and the retry is a Recover from the baseline, which re-runs +// the spawns. +// // The kernel stays pure and dependency-free. The durable module is host-side: // database drivers, cloud SDKs, and I/O libraries live in the caller or in out- // of-tree Store backends, never in this module. The in-tree MemStore and @@ -133,10 +150,11 @@ // Child-machine actors (WithActorPalette): an actor's behavior runs on the live path; // each parent transition the delivery drives is journaled as a JournalActorMessage. On // recovery the recorded transition is re-fired directly through the parent with the -// recorded done-data, so a settled actor never re-runs. Each step records the declared -// actors that ran and ended, settled or stopped, and Recover doesn't spawn those. An -// InvokeActor actor still running at recovery restarts from its initial state, because -// its own state isn't journaled, and a Spawn actor doesn't return. +// recorded done-data, decoded for its onDone event as the live settle decoded it, so a +// settled actor never re-runs and its Assign sees the same value. Each step records the +// declared actors that ran and ended, settled or stopped, and Recover doesn't spawn +// those. An InvokeActor actor still running at recovery restarts from its initial +// state, because its own state isn't journaled, and a Spawn actor doesn't return. // // # Idempotent effect dispatch // diff --git a/durable/respawn_nested_test.go b/durable/respawn_nested_test.go index 9f9ab866..c1370926 100644 --- a/durable/respawn_nested_test.go +++ b/durable/respawn_nested_test.go @@ -46,9 +46,9 @@ func TestRecover_ANestedChildsStartFireAppliesOnce(t *testing.T) { Transition("hosting").On("poke").GoTo("hosting").Assign("notePoke"). Quench() starts := map[string][]state.Effect{ - "fails": {state.SpawnActor{ID: "child", Src: state.Ref{Name: "broken"}, OnError: "nestedFailed"}}, + "fails": {state.SpawnActor{ID: "child", Src: state.Ref{Name: "broken"}, OnError: "nestedFailed", HasError: true}}, "settles": { - state.SpawnActor{ID: "child", Src: state.Ref{Name: "finisher"}, OnDone: "nestedDone"}, + state.SpawnActor{ID: "child", Src: state.Ref{Name: "finisher"}, OnDone: "nestedDone", HasDone: true}, state.SendTo{TargetID: "child", Event: "finish"}, }, } @@ -164,3 +164,87 @@ func TestRecover_DropsAPongLiveNeverSent(t *testing.T) { t.Fatalf("recovered notes = %v, want none: live never heard a pong", notes) } } + +// varyingChild builds an actor behavior whose completion output differs between +// its first instantiation and every later one: first the encodable output, then +// one with no JSON form. A respawn of it under the same quiet start its first +// spawn rode must not fail Recover when the later output can't record: the +// settle a host's respawn drops runs no transform, so the output is never +// encoded. +func varyingChild(first, later any) state.ActorBehavior { + runs := 0 + return func(map[string]any) (state.ActorInstance, error) { + runs++ + output := first + if runs > 1 { + output = later + } + child := state.ForgeFor[actorCtx]("varying"). + State("working"). + State("done").Final(). + Initial("working"). + Transition("working").On("finish").GoTo("done"). + Quench() + inst := child.Cast(actorCtx{}, state.WithInitialState[string]("working")) + return state.NewActor(inst, func(*state.Instance[string, string, actorCtx]) any { return output }), nil + } +} + +// TestRecover_ASettleTheRespawnDropsRunsNoTransform pins the drop check's place: +// the settle a host's respawn replay drops is decided before the transform runs, +// so an outcome that differs on the respawn — here one with no JSON form, which +// the transform would refuse to record — can't abort a settle that is thrown +// away. Before the fix the transform ran first and its abort failed Recover, for +// a settle that never fired and never journaled anything. +func TestRecover_ASettleTheRespawnDropsRunsNoTransform(t *testing.T) { + ctx := context.Background() + note := func(s string) func(state.AssignCtx[actorCtx]) actorCtx { + return func(in state.AssignCtx[actorCtx]) actorCtx { + c := in.Entity + c.Notes = append(c.Notes, s) + return c + } + } + m := state.ForgeFor[actorCtx]("dropped"). + Reducer("noteNested", note("nested")). + Reducer("notePoke", note("poke")). + Actor("host"). + State("hosting").InvokeActor("host"). + Initial("hosting"). + Transition("hosting").On("nestedDone").GoTo("hosting").Assign("noteNested"). + Transition("hosting").On("poke").GoTo("hosting").Assign("notePoke"). + Quench() + opts := []greetOption{durable.WithActorPalette[string, string, actorCtx](map[string]state.ActorBehavior{ + "host": func(map[string]any) (state.ActorInstance, error) { + return &starting{start: []state.Effect{ + state.SpawnActor{ID: "child", Src: state.Ref{Name: "varying"}, OnDone: "nestedDone", HasDone: true}, + state.SendTo{TargetID: "child", Event: "finish"}, + }}, nil + }, + "varying": varyingChild(1, make(chan int)), + })} + store, id := durable.NewMemStore(), durable.InstanceID("dropped") + h, err := durable.NewRunner(m, store, opts...).Start(ctx, id, actorCtx{}, state.WithInitialState("hosting")) + if err != nil { + t.Fatalf("Start: %v", err) + } + if _, err = h.Fire(ctx, "poke"); err != nil { + t.Fatalf("Fire(poke): %v", err) + } + want := fmt.Sprint([]string{"nested", "poke"}) + if got := fmt.Sprint(h.Instance().Entity().Notes); got != want { + t.Fatalf("live notes = %s, want %s", got, want) + } + // The host respawns on Recover, and its nested child settles again with an + // output that won't encode — but that settle is part of the start the journal + // already holds, so it is dropped whole: no transform, no abort, no failure. + for round := 1; round <= 2; round++ { + recovered, err := durable.Recover(ctx, m, store, id, opts...) + if err != nil { + t.Fatalf("Recover %d: %v", round, err) + } + if got := fmt.Sprint(recovered.Instance().Entity().Notes); got != want { + t.Fatalf("Recover %d notes = %s, want %s", round, got, want) + } + } +} diff --git a/durable/runner.go b/durable/runner.go index 0f8bb6c1..e5a084dc 100644 --- a/durable/runner.go +++ b/durable/runner.go @@ -54,11 +54,12 @@ import ( // supplied with WithActorPalette) and each parent transition the delivery drives — // the actor's onDone / onError, or a message it sends — is journaled as a // JournalActorMessage; on recovery the recorded transition is replayed by re-firing -// the parent directly with the recorded done-data, so the actor behavior is never -// re-instantiated. A Fire's or RunService's Record also journals the settles and -// failed spawns' onErrors its absorb drove, replayed after its own work, and the step -// after Start or Recover journals the ones their spawns drove, replayed first. A -// purely event-driven machine records no Entries. +// the parent directly with the recorded done-data, decoded for its onDone event as +// the live settle decoded it, so the actor behavior is never re-instantiated and the +// parent's Assign sees the same value. A Fire's or RunService's Record also journals +// the settles and failed spawns' onErrors its absorb drove, replayed after its own +// work, and the step after Start or Recover journals the ones their spawns drove, +// replayed first. A purely event-driven machine records no Entries. type Runner[S comparable, E comparable, C any] struct { machine *state.Machine[S, E, C] store Store @@ -158,9 +159,9 @@ type Handle[S comparable, E comparable, C any] struct { // respawnFailed holds the declared actors that aren't running because a respawn of // them failed: the journal holds their start, so they stay out of the unstarted set. respawnFailed map[string]bool - sets actorSetsCache[S] // the last actorSets result, reused while nothing it reads changed - pending []state.ParentFire[S] // parent Fires Start's or Recover's spawns drove, journaled with the next step - actorFires *parentFires[S] // the parent Fires the actor system drove, taken per step + sets actorSetsCache[S] // the last actorSets result, reused while nothing it reads changed + pending []notedFire[S] // parent Fires Start's or Recover's spawns drove, journaled with the next step + actorFires *parentFires[S] // the parent Fires the actor system drove, taken per step out outbox // what a step leaves behind once it releases the step lock } @@ -714,6 +715,15 @@ func (r *Runner[S, E, C]) Start(ctx context.Context, id InstanceID, input C, opt if refused := refusedByContext(parentFireErrs(startFires)...); refused != nil { return nil, fmt.Errorf("durable: starting %q: %w", id, refused) } + // An actor a starting actor drove settled with an outcome that won't record: its + // settle aborted, firing nothing, so the instance saw nothing for it. Start fails, + // as for a refused Fire — but the baseline checkpoint is already written, so a + // retry Start on the id returns ErrInstanceExists: the retry is a Recover from + // the baseline, which re-runs the spawns and aborts the same way, until the + // decoder is fixed. + if abort := actorFires.takeAborts(); abort != nil { + return nil, fmt.Errorf("durable: starting %q: %w", id, abort) + } // The actors that started are seen running, so one later stopped counts as ended. h.seen = map[string]bool{} if actors != nil { @@ -733,29 +743,75 @@ func (r *Runner[S, E, C]) newServiceRunner(inst *state.Instance[S, E, C]) (*stat return nil, nil } settled := &settledJSON{} - return state.NewServiceRunner(inst, r.cfg.serviceReg).WithResultTransform(replayableOutcome(r.cfg.eventDataDecoder, r.cfg.resultAliases, settled)), settled + return state.NewServiceRunner(inst, r.cfg.serviceReg).WithResultTransform(replayableOutcome(r.cfg.eventDataDecoder, r.cfg.resultAliases, settled, "service result", "service error")), settled } // newActorSystem builds the kernel host driver for child-machine actors bound to // inst, registering each behavior in the configured palette, and the collector of the // parent Fires it drives. Both are nil when no actor palette was wired (a machine // that spawns no actor needs none). +// +// The system settles through the same transform the ServiceRunner does (see +// replayableOutcome), so an actor's output reaches the parent decoded for its onDone +// event, live as a replay of the recorded JSON does, and an error arrives as an error +// with the message a Store keeps. The transform runs only when the settle routes a +// completion (see WithSettleTransform), so one that routes nothing — a spawn with no +// onDone for its outcome — consults no decoder, aborts nothing and journals nothing. +// The wrapper hands the JSON the transform decoded to +// the collector — the Fire it is about to drive journals it — and the system's +// WithSettleAbortObserver notes every abort a settle reports, after the system's +// own staleness recheck, so the step driving the system fails the Handle and the +// actor runs again on Recover: an actor outcome is never parked, as a service +// result can be. A settle the system suppresses — one whose actor was stopped, +// settled or respawned under it while its transform ran — reports no abort, so it +// fails no Handle. func (r *Runner[S, E, C]) newActorSystem(inst *state.Instance[S, E, C]) (*state.ActorSystem[S, E, C], *parentFires[S]) { if len(r.cfg.actorPalette) == 0 { return nil, nil } fires := &parentFires[S]{} sys := state.NewActorSystem(inst).WithParentFireObserver(fires.note). - WithActorInspector(state.InspectorFunc(fires.inspect)) + WithActorInspector(state.InspectorFunc(fires.inspect)). + // The observer reports an abort only once the system has rechecked the actor + // under its lock, so a settle the system suppressed — a stale one, or a loser + // to the settle still in flight — notes no abort and fails no Handle. + WithSettleAbortObserver(func(sa state.SettleAbort[E]) { fires.aborted(sa.Abort) }) + settleJSON := &settledJSON{} + outcome := replayableOutcome(r.cfg.eventDataDecoder, r.cfg.resultAliases, settleJSON, "actor done-data", "actor error") + sys.WithSettleTransform(func(event E, output any, err error) (any, error, error) { + out, outErr, abort := outcome(event, output, err) + if abort == nil { + // An error outcome leaves nothing here, which clears whatever a settle that + // fired nothing — one whose actor was respawned under it while its transform + // ran — left. A settle that routes nothing runs no transform at all, so it + // leaves nothing to clear. + fires.settling(settleJSON.take()) + } + return out, outErr, abort + }) for src, behavior := range r.cfg.actorPalette { sys.Register(src, behavior) } return sys, fires } +// notedFire is one parent Fire the actor system drove, with the JSON and Go type the +// settle that drove it decoded (see replayableOutcome): set when the Fire settled its +// actor, so the journal records the bytes the live settle decoded. A Fire that carried +// no settle — a message an actor sent, a failed spawn's onError — holds none. +type notedFire[S comparable] struct { + pf state.ParentFire[S] + // settled is the outcome the settle decoded, its JSON and Go type, which the + // journal records for the settle's onDone fire; empty for every other Fire. + settled recordedResult +} + // parentFires collects the parent Fires an actor system drives, so the step that drove // them can check and record them, and the actors it spawned, so an actor spawned and -// stopped inside one step still counts as having run. +// stopped inside one step still counts as having run. It also holds, per settle, the +// JSON the settle's transform decoded — the transform sets it (see newActorSystem) +// and note takes it, so each settled Fire journals the bytes its own settle decoded — +// and the aborts the transforms returned, which the driving step fails the Handle on. type parentFires[S comparable] struct { // arm, when set, arms the timers and services a parent Fire's effects declare, as a // host Fire's absorb does: the actor system handles only their actors. It's set @@ -765,7 +821,9 @@ type parentFires[S comparable] struct { mu sync.Mutex ctx context.Context // the context of the step driving the system, for arm - fires []state.ParentFire[S] + fires []notedFire[S] + settled recordedResult // the JSON and Go type the settle routing the next Fire decoded + aborts []error // the aborts the settles since the last takeAborts returned spawned map[string]bool // actors whose latest spawn this step started attempted map[string]bool // actors the system was asked to spawn this step failed map[string]bool // actors whose latest spawn failed and whose declared onError applied, or was refused for a reason other than a context ending @@ -854,14 +912,23 @@ func (p *parentFires[S]) inspect(ev state.InspectionEvent) { func (p *parentFires[S]) note(pf state.ParentFire[S]) { p.mu.Lock() - p.fires = append(p.fires, pf) + // The transform of the settle routing this Fire left the JSON it decoded (see + // newActorSystem); take it, so the Fire journals the bytes its own settle decoded. + // A Fire no settle drove leaves whatever a settle that fired nothing left — one + // whose actor was respawned under it while its transform ran, since a settle that + // routes nothing runs no transform — which the next settle's transform overwrites. + nf := notedFire[S]{pf: pf, settled: p.settled} + p.settled = recordedResult{} + p.fires = append(p.fires, nf) // A spawn whose onError applied, or was refused for a reason other than a context // ending, such as a failing guard, is handled: the journal holds the onError or its // refusal, and a retry would run the behavior again. One a context's ending refused - // isn't: the step that drove it recorded nothing. Nor is one the parent had no - // transition for: an invoked actor with no onError declared routes the zero event, - // which the parent refuses that way, and nothing caught the failure. Telling the two - // apart by a no-transition refusal is a stopgap; see #250. + // isn't: the step that drove it recorded nothing. Nor is one whose declared onError + // the parent has no transition for: the parent refuses the event that way, and + // nothing caught the failure. A spawn that declared no onError at all escalates + // rather than firing, so it needs no refusal to tell it apart; telling a declared + // onError the parent can't route from a handled one by the refusal alone is a + // stopgap; see #250. if pf.SpawnFailed && !isContextErr(pf.Result.Err) && !errors.Is(pf.Result.Err, state.ErrNoTransition) { if p.failed == nil { p.failed = map[string]bool{} @@ -869,7 +936,7 @@ func (p *parentFires[S]) note(pf state.ParentFire[S]) { p.failed[pf.ActorID] = true } // A parent Fire that leaves a state stops its actors (see left). - for _, eff := range pf.Result.Effects { + for _, eff := range nf.pf.Result.Effects { if e, ok := eff.(state.StopActor); ok { if p.exited == nil { p.exited = map[string]bool{} @@ -883,10 +950,51 @@ func (p *parentFires[S]) note(pf state.ParentFire[S]) { if ctx == nil { ctx = context.Background() } - p.arm(ctx, pf.Result.Effects) + p.arm(ctx, nf.pf.Result.Effects) } // The system absorbs a parent Fire's effects next, which spawns what they declare. - p.attempt(pf.Result.Effects) + p.attempt(nf.pf.Result.Effects) +} + +// settling records the JSON and Go type a settle decoded, which the Fire it is about +// to drive notes with itself. It's safe on a nil collector. +func (p *parentFires[S]) settling(r recordedResult) { + if p == nil { + return + } + p.mu.Lock() + p.settled = r + p.mu.Unlock() +} + +// aborted notes an abort the system's WithSettleAbortObserver reported: the settle +// that returned it fired nothing and left its actor running, and the system has +// already rechecked the actor under its lock, so the step driving the system fails +// the Handle and records nothing, and a +// recovered Handle runs the actor again. It's safe on a nil collector. +func (p *parentFires[S]) aborted(err error) { + if p == nil || err == nil { + return + } + p.mu.Lock() + p.aborts = append(p.aborts, err) + p.mu.Unlock() +} + +// takeAborts returns the aborts the settles since the last call returned, joined, and +// forgets them; nil when none aborted. It's safe on a nil collector, which holds none. +func (p *parentFires[S]) takeAborts() error { + if p == nil { + return nil + } + p.mu.Lock() + defer p.mu.Unlock() + var err error + if len(p.aborts) > 0 { + err = errors.Join(p.aborts...) + p.aborts = nil + } + return err } // driving notes ctx as the context of the step about to drive the system, so arm gets @@ -908,7 +1016,7 @@ func (p *parentFires[S]) driving(ctx context.Context) (restore func()) { // take returns the Fires noted since the last take, in fire order, and forgets them. // It's safe on a nil collector, which has none. -func (p *parentFires[S]) take() []state.ParentFire[S] { +func (p *parentFires[S]) take() []notedFire[S] { if p == nil { return nil } @@ -954,10 +1062,10 @@ func stoppedLater(sp state.SpawnActor, rest, later []state.Effect) bool { } // parentFireErrs returns each parent Fire's error, nil ones included. -func parentFireErrs[S comparable](fires []state.ParentFire[S]) []error { +func parentFireErrs[S comparable](fires []notedFire[S]) []error { errs := make([]error, len(fires)) for i := range fires { - errs[i] = fires[i].Result.Err + errs[i] = fires[i].pf.Result.Err } return errs } @@ -1078,6 +1186,15 @@ func (h *Handle[S, E, C]) fireStep(ctx context.Context, event E, opts []state.Fi if refused := refusedByContext(parentFireErrs(fires)...); refused != nil { return res, nil, nil, h.fail(fmt.Errorf("durable: firing %q: %w", h.id, refused)) } + // An actor the absorb drove settled with an outcome that won't record: the settle + // aborted, firing nothing, and nothing was applied for it. Fail the Handle and + // record nothing, so the host re-fires the event on a recovered Handle, which + // restores the state before it: an actor the event's own transition spawned isn't + // declared there, so it isn't respawned, while one that was already running is, + // and runs again. + if abort := h.actorFires.takeAborts(); abort != nil { + return res, nil, nil, h.fail(fmt.Errorf("durable: firing %q: %w", h.id, abort)) + } // Every parent Fire the absorb drove (a message an actor sent as it spawned, a // settle, a failed spawn's onError) applied after the event, so the step journals // them, and replay re-fires them after it. @@ -1291,6 +1408,13 @@ func (h *Handle[S, E, C]) tickStep(ctx context.Context) ([]state.FireResult[S], if refused := refusedByContext(parentFireErrs(fires)...); refused != nil { return results, nil, nil, h.fail(fmt.Errorf("durable: ticking %q: %w", h.id, refused)) } + // An actor the tick's absorb drove settled with an outcome that won't record: the + // settle aborted, firing nothing, so nothing was applied for it. Fail the Handle and + // record nothing, as for a refused parent Fire, so a recovered Handle runs the actor + // again. + if abort := h.actorFires.takeAborts(); abort != nil { + return results, nil, nil, h.fail(fmt.Errorf("durable: ticking %q: %w", h.id, abort)) + } driven, err := recordParentFires(fires, false) if err != nil { return results, nil, nil, h.fail(fmt.Errorf("durable: recording %q's parent Fires: %w", h.id, err)) @@ -1915,6 +2039,13 @@ func (r *Runner[S, E, C]) recover(ctx context.Context, id InstanceID) (*Handle[S if refused := refusedByContext(parentFireErrs(recoverFires)...); refused != nil { return nil, fmt.Errorf("durable: recovering %q: %w", id, refused) } + // An actor the respawns drove settled with an outcome that won't record: its settle + // aborted, firing nothing, so the restored instance saw nothing for it. Recover + // fails, as for a refused Fire: the journal is intact, and a retry runs the actor + // again. + if abort := actorFires.takeAborts(); abort != nil { + return nil, fmt.Errorf("durable: recovering %q: %w", id, abort) + } // The journal's ended actors stay ended, and seen, so the next step records a set // only when it changes them. h.seen = map[string]bool{} @@ -2363,7 +2494,7 @@ func replayActors[S comparable, E comparable, C any]( actorArms bool, ) error { for _, entry := range entries { - effects, err := replayActor(ctx, inst, cfg.eventCodec, entry) + effects, err := replayActor(ctx, inst, cfg.eventCodec, cfg.eventDataDecoder, cfg.resultAliases, entry) if err != nil { return fmt.Errorf("at step %d: %w", rec.Step, err) } diff --git a/durable/runner_options.go b/durable/runner_options.go index fa8abed2..655c73dc 100644 --- a/durable/runner_options.go +++ b/durable/runner_options.go @@ -216,6 +216,16 @@ func WithMaxEventDataBytes[S comparable, E comparable, C any](n int) Option[S, E // decodes the journal with the recovering Runner's decoder, so one added or changed // after results were recorded changes what replay produces, and one that can't decode // a settled result fails Recover and StateAt with ErrEventDataEncoding. +// +// The decoder also decodes an actor's done-data, for the parent's onDone event, live +// as the settle decodes it and on every replay, held to the Go type the live settle +// recorded, which WithResultTypeAlias renames as a service result's. A done-data +// payload that won't decode, or that decodes as another type than the actor produced, +// aborts the settle — nothing fires — and the step driving it fails the Handle, +// ErrHandleFailed wrapping ErrEventDataEncoding, recording nothing, so the actor runs +// again on Recover: an actor outcome is never parked, unlike a service result (see +// RunService). An actor's error stays message-only too and doesn't reach the decoder, +// and a settle that routes no completion consults no decoder at all. func WithEventDataDecoder[S comparable, E comparable, C any](d EventDataDecoder[E]) Option[S, E, C] { return func(c *runnerConfig[S, E, C]) { if d != nil { @@ -224,10 +234,12 @@ func WithEventDataDecoder[S comparable, E comparable, C any](d EventDataDecoder[ } } -// WithResultTypeAlias tells the Runner that a service result type the journal recorded -// under the full Go type name recorded now goes by current's type, so a result settled -// or parked under the old name still replays after the rename: Recover, StateAt and a -// RunService that settles a recorded result accept the decoded value when its type is +// WithResultTypeAlias tells the Runner that a service result type, or an actor +// done-data type, the journal recorded under the full Go type name recorded now goes +// by current's type, so a result settled or parked under the old name, and an actor's +// done-data settled under it, still replay after the rename: Recover, StateAt and a +// RunService that settles a recorded result, and the replay of a recorded actor's +// done-data, accept the decoded value when its type is // the one current is a value of, and every other recorded name is held to strictly, // exactly as without the alias. recorded is the name as the journal records it, spelled // exactly as the result's Go type does: an import path and name, as @@ -243,7 +255,8 @@ func WithEventDataDecoder[S comparable, E comparable, C any](d EventDataDecoder[ // type, can't bring it back. An empty recorded, a nil current and a name aliased to // the type's own current name are ignored too — as the other options, bad input // changes nothing, and the strict check stands, so a result recorded under a name no -// alias covers still fails Recover and StateAt with ErrEventDataEncoding. The alias +// alias covers still fails Recover and StateAt with ErrEventDataEncoding, naming the +// outcome — a service result or an actor's done-data — that wouldn't decode. The alias // applies to a recorded result's name only: a result parked by this Handle stays held // to its own type, exactly as live (see WithEventDataDecoder). func WithResultTypeAlias[S comparable, E comparable, C any](recorded string, current any) Option[S, E, C] { diff --git a/durable/service.go b/durable/service.go index ca48f8a3..014039c5 100644 --- a/durable/service.go +++ b/durable/service.go @@ -166,7 +166,14 @@ func (h *Handle[S, E, C]) drainServices() []state.JournalEntry { // result decodes) or while its settle's effects were absorbed (even after a clean // settle), or a Fire the settle drove refused because a context ended (ctx, or one // middleware derived from it) returns ErrHandleFailed and records nothing: a recovered -// Handle has the service in flight again, and RunService runs it a second time. A +// Handle has the service in flight again, and RunService runs it a second time. An +// actor the settle's absorb drove settling with an outcome that won't record fails the +// Handle the same way, but the service's own settle is recorded first: the ServiceFn +// ran and its result decoded, so the journal holds it before the actor's settle is +// attempted, and the parking design's "never runs again" promise holds — a recovered +// Handle re-settles the service from the journal and never runs its ServiceFn again, +// however many Recover-and-retry rounds follow; only the actor re-runs, from its +// initial state, on each Recover's respawn and each redelivery. A // result that won't encode runs no Assign, as one that won't decode doesn't. A KindedEffect the settle emits // whose payload won't marshal doesn't fail it: it is recorded by id and kind, as // recordEffects says, and dispatches as any effect does. @@ -282,6 +289,19 @@ func (h *Handle[S, E, C]) serviceStep(ctx context.Context, id string) (state.Fir if err := stepCanceled(ctx, append([]error{res.Err}, parentFireErrs(fires)...)...); err != nil { return res, true, nil, nil, h.fail(fmt.Errorf("durable: settling service %q for %q: %w", id, h.id, err)) } + // An actor the settle's absorb drove settled with an outcome that won't record: its + // settle aborted, firing nothing, so nothing was applied for it. The service's own + // settle — which ran, and whose result decoded — is journaled first, so the parking + // design's "never runs again" promise holds for it: the ServiceFn ran once and its + // result is in the journal before the actor's settle is attempted. The Handle then + // fails on the actor's abort, and a recovered Handle never runs the service again — + // replay re-settles it from the journal — so only the actor re-runs, from its + // initial state. The parent Fires the settle's absorb drove before the abort + // (the poke that finished the actor) applied live, so the same Record journals + // them too, and replay re-fires them after the settle, where they ran. An actor + // outcome is never parked, as a service result that won't decode is: the actor can + // run again. + abort := h.actorFires.takeAborts() entry, err := recordServiceOutcome(id, settled, h.svc.LastError()) if err != nil { @@ -304,8 +324,18 @@ func (h *Handle[S, E, C]) serviceStep(ctx context.Context, id string) (state.Fir rec := &Record{Step: h.nextStep, Entries: append(append(h.drainClock(), h.drainServices()...), driven...)} des, err := h.recordStep(ctx, rec, res.Effects) if err != nil { + if abort != nil { + // The Handle already failed on the append; join the actor's abort so the + // caller sees both. + err = errors.Join(err, fmt.Errorf("durable: settling service %q for %q: %w", id, h.id, abort)) + } return res, true, nil, nil, err } + if abort != nil { + // The Record is durable, so finishStep dispatches its effects and offers its + // checkpoint before the caller sees the failure, as any recorded step does. + return res, true, rec, des, h.fail(fmt.Errorf("durable: settling service %q for %q: the settle is recorded; an actor it drove aborted, so the Handle failed and only that actor runs again on Recover: %w", id, h.id, abort)) + } return res, true, rec, des, nil } @@ -356,39 +386,43 @@ func (h *Handle[S, E, C]) markSettled(id string) { delete(h.parked, id) } -// replayableOutcome returns the transform a ServiceRunner applies to every outcome as -// it settles, so the live settle and a replay can't differ. A result is encoded to -// JSON and decoded through decode for the invocation's onDone event, as a -// WithEventData payload is: the live run passes the ServiceFn's value, a replay the -// recorded JSON as a recordedResult, and both get decode's value. With the default -// decoder that is JSON's generic form. Live, a decoder that returns a concrete type -// other than the result's is refused, though JSON's generic form, including a -// json.Number, is always accepted, so the default keeps working. A settle that -// succeeds leaves in settled the JSON it decoded and the result's Go type, which -// serviceStep journals, so replay decodes the bytes live decoded and holds the decoder -// to the type live did; an error outcome leaves nothing there. +// replayableOutcome returns the transform a ServiceRunner or an ActorSystem applies +// to every outcome as it settles, so the live settle and a replay can't differ. A +// result is encoded to JSON and decoded through decode for the invocation's onDone +// event, as a WithEventData payload is: the live run passes the ServiceFn's or the +// behavior's value, a replay the recorded JSON as a recordedResult, and both get +// decode's value. With the default decoder that is JSON's generic form. Live, a +// decoder that returns a concrete type other than the result's is refused, though +// JSON's generic form, including a json.Number, is always accepted, so the default +// keeps working. A settle that succeeds leaves in settled the JSON it decoded and +// the result's Go type, which the driving step journals, so replay decodes the bytes +// live decoded and holds the decoder to the type live did; an error outcome leaves +// nothing there. what names the outcome in the errors an abort carries ("service +// result", "actor done-data"), and errWhat an error outcome in the message a +// panicking Error method settles with ("service error", "actor error"). // // A result that won't decode, or is refused, aborts the settle with an // *undecodableResult before it fires anything, so no onDone or onError Assign runs; -// serviceStep sees it in the settle's FireResult.Err and parks the result, and -// replayService fails the replay. A parked result settles as a recordedResult that -// carries its Go type, and the decoder must return that type, or JSON's generic form, -// as live. A result with no JSON form aborts the settle too, with no JSON to park, and -// serviceStep fails the Handle. +// serviceStep sees it in the settle's FireResult.Err and parks the result, an actor +// step sees it in the settle it aborted (WithSettleTransform) and fails the Handle, +// and a replay fails on it. A parked result settles as a recordedResult that +// carries its Go type, and the decoder must return that type, or JSON's generic +// form, as live. A result with no JSON form aborts the settle too, with no JSON to +// park, and serviceStep fails the Handle. // // An error becomes an error with its message as a Store keeps it (see // normalizedErrorMessage), live and on replay. An Error method that panics settles // with a message saying so, normalized the same way. // // aliases carries the Runner's WithResultTypeAlias renames, which the recorded check -// honors: a result recorded under a name an alias maps to the type the decoded value +// honors: an outcome recorded under a name an alias maps to the type the decoded value // has settles through the alias. Every other name is checked strictly, as without any // alias. -func replayableOutcome[E comparable](decode EventDataDecoder[E], aliases map[string]string, settled *settledJSON) func(E, any, error) (any, error, error) { +func replayableOutcome[E comparable](decode EventDataDecoder[E], aliases map[string]string, settled *settledJSON, what, errWhat string) func(E, any, error) (any, error, error) { return func(event E, result any, err error) (any, error, error) { settled.set(recordedResult{}) if err != nil { - msg, perr := normalizedErrorMessage(err, "service error") + msg, perr := normalizedErrorMessage(err, errWhat) if perr != nil { msg = validUTF8(perr.Error()) } @@ -399,7 +433,7 @@ func replayableOutcome[E comparable](decode EventDataDecoder[E], aliases map[str if !replay { var jerr error if b, jerr = marshalPayload(result); jerr != nil { - return nil, nil, &undecodableResult{err: fmt.Errorf("service result won't encode: %w", jerr)} + return nil, nil, &undecodableResult{err: fmt.Errorf("%s won't encode: %w", what, jerr)} } } var value any @@ -411,11 +445,11 @@ func replayableOutcome[E comparable](decode EventDataDecoder[E], aliases map[str value, derr = decodePayload(eventPayload{data: b}, event, decode) } if derr != nil { - derr = fmt.Errorf("%w: service result won't decode for event %v: %w", ErrEventDataEncoding, event, derr) + derr = fmt.Errorf("%w: %s won't decode for event %v: %w", ErrEventDataEncoding, what, event, derr) } else if !replay { - derr = decodedAsPassed(value, result, "service result", true) + derr = decodedAsPassed(value, result, what, true) } else { - derr = decodedAsRecorded(value, recorded, aliases) + derr = decodedAsRecorded(value, recorded, aliases, what) } if derr != nil { rtype := recorded.rtype @@ -640,7 +674,8 @@ func qualifiedName(pkg, name string) string { // decodedAsRecorded is decodedAsPassed for a recorded result, which records its type's // name rather than a value: it reports, as an ErrEventDataEncoding error, a value the -// decoder returned as another type than the recorded one. As live, nil and JSON's +// decoder returned as another type than the recorded one; what names the outcome, a +// service's result or an actor's done-data. As live, nil and JSON's // generic form are always accepted. A name aliases maps, from WithResultTypeAlias, to // the type the decoded value has is accepted too: the type was renamed or moved after // the result was recorded, and the alias says what the recorded name now means; every @@ -650,8 +685,10 @@ func qualifiedName(pkg, name string) string { // alias too, which a parked result ignores — or as one read from the journal or a // checkpoint is held to its name, which a type of the same name and package, such as // another function-local type, also has. An empty name, a result recorded with no -// type, accepts anything. -func decodedAsRecorded(value any, recorded recordedResult, aliases map[string]string) error { +// type, accepts anything. Only a parked service result carries its own type, so the +// parked check below names a service result whatever what is; an actor outcome is +// never parked. +func decodedAsRecorded(value any, recorded recordedResult, aliases map[string]string, what string) error { typ := recorded.typ if typ == "" || value == nil || genericJSON(value) { return nil @@ -662,11 +699,11 @@ func decodedAsRecorded(value any, recorded recordedResult, aliases map[string]st if aliased { // The name is covered by an alias, so name the type it now means, which is // the one to decode as, not the recorded name the type no longer has. - return fmt.Errorf("%w: a %s service result, aliased to %s by WithResultTypeAlias, decodes as %s; decode it as %s with WithEventDataDecoder", - ErrEventDataEncoding, typ, alias, got, alias) + return fmt.Errorf("%w: a %s %s, aliased to %s by WithResultTypeAlias, decodes as %s; decode it as %s with WithEventDataDecoder", + ErrEventDataEncoding, typ, what, alias, got, alias) } - return fmt.Errorf("%w: a %s service result decodes as %s; decode it as %s with WithEventDataDecoder", - ErrEventDataEncoding, typ, got, typ) + return fmt.Errorf("%w: a %s %s decodes as %s; decode it as %s with WithEventDataDecoder", + ErrEventDataEncoding, typ, what, got, typ) } // The name agrees — the recorded one or the alias's — so only a result this Handle // parked, which carries its type itself, can be another type: through the alias, diff --git a/durable/service_actor_abort_test.go b/durable/service_actor_abort_test.go new file mode 100644 index 00000000..090078f2 --- /dev/null +++ b/durable/service_actor_abort_test.go @@ -0,0 +1,172 @@ +package durable_test + +import ( + "context" + "errors" + "sync/atomic" + "testing" + + "github.com/stablekernel/crucible/durable" + "github.com/stablekernel/crucible/state" +) + +// These tests pin the review's High on serviceStep: when a service's settle +// drives an actor whose own settle aborts in the same step, the service's settle +// is journaled before the Handle fails, so the ServiceFn never runs again — only +// the actor re-runs. The parking design's "never runs again" promise holds for a +// result that decoded, not just for one that didn't. + +// serviceAbortMachine invokes fetch in first; its onDone enters second, which +// invokes kid (routing childDone) and poker. The poker sends the parent "poke" as +// it starts, and the poke transition finishes kid, so kid settles — and its +// done-data hits the decoder — inside the RunService step that settled fetch. +func serviceAbortMachine(fn state.ServiceFn[outcomeCtx]) *state.Machine[string, string, outcomeCtx] { + return state.ForgeFor[outcomeCtx]("svcabort"). + Service("fetch", fn). + State("first").Invoke("fetch", state.WithInvokeOnDone("served")). + State("second"). + InvokeActor("kid", state.WithInvokeOnDone("childDone")). + InvokeActor("poker"). + Initial("first"). + Transition("first").On("served").GoTo("second"). + Transition("second").On("poke").GoTo("second").SendTo(serviceAbortKid, "finish"). + Quench() +} + +// serviceAbortIDs are the stable ids of serviceAbortMachine's fetch invocation +// and kid invocation. +var ( + serviceAbortFetch = state.InvokeID("svcabort", "first", 0) + serviceAbortKid = state.ActorID("svcabort", "second", 0) +) + +// poking is an actor that sends its parent "poke" from its initial entry, then +// keeps running. The parent's poke transition finishes kid, so kid settles inside +// the step whose entry spawned the poker. The message it sends the parent is what +// AbsorbRespawn drops on Recover, so the respawned poker doesn't finish kid again: +// only the host's redelivery re-runs kid's settle. +type poking struct{ sent bool } + +func (*poking) DeliverFire(context.Context, any) (bool, any) { return false, nil } +func (p *poking) ChildEffects() []state.Effect { + if p.sent { + return nil + } + p.sent = true + return []state.Effect{state.SendParent{Event: "poke"}} +} +func (*poking) Output() any { return nil } + +// serviceAbortOpts wires the machine's palette and registry, counting fetch's +// ServiceFn runs, with a decoder that refuses kid's childDone done-data. +func serviceAbortOpts(fetchCalls, kidRuns *int64) (state.ServiceFn[outcomeCtx], []durable.Option[string, string, outcomeCtx]) { + fn := state.ServiceFn[outcomeCtx](func(context.Context, state.ServiceCtx[outcomeCtx]) (any, error) { + atomic.AddInt64(fetchCalls, 1) + return "ok", nil + }) + return fn, []durable.Option[string, string, outcomeCtx]{ + durable.WithActorPalette[string, string, outcomeCtx](map[string]state.ActorBehavior{ + "kid": outputChild(kidRuns, order{ID: 7}), + "poker": func(map[string]any) (state.ActorInstance, error) { return &poking{}, nil }, + }), + durable.WithServiceRegistry[string, string, outcomeCtx](state.NewRegistry[outcomeCtx]().Service("fetch", fn)), + durable.WithEventDataDecoder[string, string, outcomeCtx](func(e string, data []byte) (any, error) { + if e == "childDone" { + return nil, errors.New("decoder refused") + } + return durable.DecodeAs[any](data) + }), + } +} + +// TestRunService_AnActorAbortInTheStep_StillRecordsTheServiceResult proves the +// service's settle is journaled before the Handle fails on an actor settle the +// same step drove: across three Recover-and-retry rounds the ServiceFn runs +// exactly once — the first RunService settles fetch and fails on kid's aborted +// settle, and every later RunService finds fetch settled in the journal, so only +// kid re-runs, on each Recover's respawn and each redelivery. On the commit +// before the fix, nothing was recorded for the aborted step, so each Recover left +// fetch in flight and each retry ran the ServiceFn again: three runs for three +// attempts, non-idempotent work repeating. +func TestRunService_AnActorAbortInTheStep_StillRecordsTheServiceResult(t *testing.T) { + ctx := context.Background() + var fetchCalls, kidRuns int64 + fn, opts := serviceAbortOpts(&fetchCalls, &kidRuns) + m := serviceAbortMachine(fn) + store, id := durable.NewMemStore(), durable.InstanceID("svcabort-1") + h, err := durable.NewRunner(m, store, opts...).Start(ctx, id, outcomeCtx{}, state.WithInitialState("first")) + if err != nil { + t.Fatalf("Start: %v", err) + } + + // Round 1: the settle drives fetch's onDone into second, whose poker finishes + // kid, whose done-data the decoder refuses. The step fails the Handle with the + // actor's abort, but the service's own settle — which ran and decoded — is + // recorded first. + _, ran, err := h.RunService(ctx, serviceAbortFetch) + if !ran { + t.Fatal("RunService reported the service not in flight; want it ran and settled") + } + if !errors.Is(err, durable.ErrHandleFailed) || !errors.Is(err, durable.ErrEventDataEncoding) { + t.Fatalf("RunService = %v; want ErrHandleFailed wrapping the actor settle's ErrEventDataEncoding", err) + } + if got := atomic.LoadInt64(&fetchCalls); got != 1 { + t.Fatalf("the ServiceFn ran %d times, want the one live run", got) + } + // The journal holds the service's settle (and the poke fire the settle's absorb + // drove, which applied), even though the Handle failed. + svcEntries, actorEntries := 0, 0 + _, recs, lerr := store.Load(ctx, id) + if lerr != nil { + t.Fatalf("Load: %v", lerr) + } + for _, rec := range recs { + for _, e := range rec.Entries { + switch e.Kind { + case state.JournalServiceResult: + if e.CorrelationID != serviceAbortFetch { + t.Fatalf("a service entry for %q, want fetch's", e.CorrelationID) + } + svcEntries++ + case state.JournalActorMessage: + actorEntries++ + } + } + } + if svcEntries != 1 { + t.Fatalf("the journal holds %d service entries, want the one settle the failed step recorded", svcEntries) + } + if actorEntries != 1 { + t.Fatalf("the journal holds %d actor entries, want the poke fire the settle's absorb drove", actorEntries) + } + + // Rounds 2 and 3: Recover replays the recorded settle — the parent reaches + // second and fetch stays settled — so RunService finds nothing in flight and + // runs no ServiceFn again. Only kid re-runs: the recovered Handle respawns it + // (the poker's start message is quiet), and a redelivery re-drives the aborted + // settle. + for round := 2; round <= 3; round++ { + h, err = durable.Recover(ctx, m, store, id, opts...) + if err != nil { + t.Fatalf("Recover round %d: %v", round, err) + } + if got := h.Instance().Current(); got != "second" { + t.Fatalf("after Recover %d the parent is in %q, want second: the recorded settle replayed", round, got) + } + if _, ran, err = h.RunService(ctx, serviceAbortFetch); ran || err != nil { + t.Fatalf("RunService round %d ran=%v err=%v; want nothing in flight: the journal holds the settle, so the ServiceFn never runs again", round, ran, err) + } + if _, derr := h.DeliverToActorByID(ctx, serviceAbortKid, "finish"); !errors.Is(derr, durable.ErrHandleFailed) || !errors.Is(derr, durable.ErrEventDataEncoding) { + t.Fatalf("the redelivery round %d = %v; want ErrHandleFailed wrapping ErrEventDataEncoding: only the actor re-runs", round, derr) + } + } + + // Across the three attempts: one ServiceFn run, and only kid re-ran — once at + // Start, once per Recover's respawn of the still-running kid. + if got := atomic.LoadInt64(&fetchCalls); got != 1 { + t.Fatalf("the ServiceFn ran %d times across three attempts, want 1", got) + } + if got := atomic.LoadInt64(&kidRuns); got != 3 { + t.Fatalf("kid instantiated %d times, want 3: the live spawn and each Recover's respawn of the still-running kid", got) + } +} diff --git a/durable/service_encode_internal_test.go b/durable/service_encode_internal_test.go index 95116723..eec3249f 100644 --- a/durable/service_encode_internal_test.go +++ b/durable/service_encode_internal_test.go @@ -43,7 +43,7 @@ func TestServiceResult_JournalBytesAreWhatLiveDecoded(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { settled := &settledJSON{} - value, outErr, abort := replayableOutcome(tc.decode, nil, settled)("done", tc.result, nil) + value, outErr, abort := replayableOutcome(tc.decode, nil, settled, "service result", "service error")("done", tc.result, nil) if outErr != nil || abort != nil { t.Fatalf("the transform returned %v, %v", outErr, abort) } @@ -66,7 +66,7 @@ func TestServiceResult_JournalBytesAreWhatLiveDecoded(t *testing.T) { t.Fatalf("decoded value's encoding %s, journal %s: same = %v, want %v", reencoded, sp.Result, same, tc.reencode) } // Replay decodes the journal to the value live saw. - replayed, _, rabort := replayableOutcome(tc.decode, nil, nil)("done", recordedResult{raw: sp.Result}, nil) + replayed, _, rabort := replayableOutcome(tc.decode, nil, nil, "service result", "service error")("done", recordedResult{raw: sp.Result}, nil) if rabort != nil { t.Fatalf("replaying %s: %v", sp.Result, rabort) } diff --git a/durable/settle_absorb_internal_test.go b/durable/settle_absorb_internal_test.go index e1c9e528..b16e3c9d 100644 --- a/durable/settle_absorb_internal_test.go +++ b/durable/settle_absorb_internal_test.go @@ -170,7 +170,7 @@ func TestUndecodableResult_WrapsErrEventDataEncodingOnlyForADecodeFailure(t *tes {"won't encode", make(chan int), false, false}, } { t.Run(tc.name, func(t *testing.T) { - _, _, abort := replayableOutcome[string](refuse, nil, &settledJSON{})("done", tc.result, nil) + _, _, abort := replayableOutcome[string](refuse, nil, &settledJSON{}, "service result", "service error")("done", tc.result, nil) var derr *undecodableResult if !errors.As(abort, &derr) { t.Fatalf("abort = %v, want an *undecodableResult", abort) diff --git a/durable/spawn_onerror_rule_test.go b/durable/spawn_onerror_rule_test.go index 8e73d765..cebfb93d 100644 --- a/durable/spawn_onerror_rule_test.go +++ b/durable/spawn_onerror_rule_test.go @@ -102,7 +102,12 @@ func TestSpawnRule_GuardRefusedOnErrorIsDone(t *testing.T) { } func TestSpawnRule_DeclaredOnErrorWithNoTransitionIsDone(t *testing.T) { - t.Skip("an InvokeActor with no onError fires the zero event, so durable tells none declared from refused by a no-transition refusal; #250") + // A declared onError the parent has no transition for fires and is refused + // with ErrNoTransition, which the unstarted/ended rule deliberately reads as + // "nothing caught the failure" and retries: telling it from a handled refusal + // by the refusal alone is the #250 stopgap. The invocation now carries its own + // has-onError flag, so #250 can drop the stopgap and make this test pass. + t.Skip("a declared onError the parent has no transition for is still retried by the ErrNoTransition stopgap; #250") if got := spawnRuleCalls(t, spawnRuleMachine(false, nil, state.WithInvokeOnError("spawnFailed"))); got != 1 { t.Fatalf("behavior ran %d times, want Recover to leave it alone", got) } diff --git a/durable/spawn_zero_event_test.go b/durable/spawn_zero_event_test.go index 1bb89513..05469a31 100644 --- a/durable/spawn_zero_event_test.go +++ b/durable/spawn_zero_event_test.go @@ -14,7 +14,6 @@ import ( // a transition the parent declares on that event never runs, live or after Recover, // and Recover retries the spawn: nothing declared for the failure caught it. func TestRecover_RetriesANoOnErrorSpawnEvenWhenTheZeroEventHasATransition(t *testing.T) { - t.Skip("an InvokeActor with no onError fires the zero event, so durable tells none declared from refused by a no-transition refusal; #250") ctx := context.Background() m := state.ForgeFor[stepCtx]("zeroOnError"). Reducer("note", func(in state.AssignCtx[stepCtx]) stepCtx { @@ -24,15 +23,12 @@ func TestRecover_RetriesANoOnErrorSpawnEvenWhenTheZeroEventHasATransition(t *tes }). Actor("child"). State("idle"). - SuperState("spawning").InvokeActor("child"). - SubState("waiting"). - SubState("caught"). - Initial("waiting"). - EndSuperState(). + State("spawning").InvokeActor("child"). + State("caught"). Initial("idle"). - Transition("idle").On("start").GoTo("waiting"). - // The zero event moves between children, so spawning, and its actor, stay. - Transition("waiting").On("").GoTo("caught").Assign("note"). + Transition("idle").On("start").GoTo("spawning"). + // The zero event would leave spawning, ending the actor's activation. + Transition("spawning").On("").GoTo("caught").Assign("note"). Transition("caught").On("poke").GoTo("caught"). Quench() store, id := durable.NewMemStore(), durable.InstanceID("zero-onerror") @@ -64,7 +60,6 @@ func TestRecover_RetriesANoOnErrorSpawnEvenWhenTheZeroEventHasATransition(t *tes // declared is retried at Recover when the parent's state swallows its zero event with a // catch-all or a forbid: nothing declared for the failure caught it. func TestRecover_RetriesANoOnErrorSpawnAWildcardSwallowed(t *testing.T) { - t.Skip("an InvokeActor with no onError fires the zero event, so durable tells none declared from refused by a no-transition refusal; #250") for _, how := range []string{"forbid any", "on any"} { t.Run(how, func(t *testing.T) { b := state.ForgeFor[stepCtx]("wildcard"). diff --git a/durable/timetravel.go b/durable/timetravel.go index 6c6b9e67..3327f44d 100644 --- a/durable/timetravel.go +++ b/durable/timetravel.go @@ -305,5 +305,5 @@ func newReplayServiceRunner[S comparable, E comparable, C any]( if cfg.serviceReg == nil { return nil } - return state.NewServiceRunner(inst, cfg.serviceReg).WithResultTransform(replayableOutcome(cfg.eventDataDecoder, cfg.resultAliases, nil)) + return state.NewServiceRunner(inst, cfg.serviceReg).WithResultTransform(replayableOutcome(cfg.eventDataDecoder, cfg.resultAliases, nil, "service result", "service error")) } diff --git a/examples/sourcedrive/go.mod b/examples/sourcedrive/go.mod index 49dd4f2c..b35b30b7 100644 --- a/examples/sourcedrive/go.mod +++ b/examples/sourcedrive/go.mod @@ -24,13 +24,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -49,25 +48,25 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pierrec/lz4/v4 v4.1.26 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/twmb/franz-go/pkg/kmsg v1.13.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.51.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.44.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/source => ../../source diff --git a/examples/sourcedrive/go.sum b/examples/sourcedrive/go.sum index d534d1a1..6fb218df 100644 --- a/examples/sourcedrive/go.sum +++ b/examples/sourcedrive/go.sum @@ -22,8 +22,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -35,8 +33,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -48,10 +46,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -82,20 +76,16 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY= github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/redpanda v0.42.0 h1:mcPLvf3rzvvwG46i4jcyOk7/KcapE/IKnBgwo27k68M= @@ -116,16 +106,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI= golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -138,11 +132,6 @@ golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/cloudwatch/go.mod b/sink/cloudwatch/go.mod index 5b8680a6..dd65b7aa 100644 --- a/sink/cloudwatch/go.mod +++ b/sink/cloudwatch/go.mod @@ -39,13 +39,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -63,22 +62,22 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/sink/cloudwatch/go.sum b/sink/cloudwatch/go.sum index 90abc604..85a7e9f1 100644 --- a/sink/cloudwatch/go.sum +++ b/sink/cloudwatch/go.sum @@ -54,8 +54,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -67,8 +65,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -81,10 +79,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -111,20 +105,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -139,16 +129,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -161,11 +155,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/dynamo/go.mod b/sink/dynamo/go.mod index 4f8e8f1f..71bb3f96 100644 --- a/sink/dynamo/go.mod +++ b/sink/dynamo/go.mod @@ -35,13 +35,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -59,24 +58,24 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/dynamo/go.sum b/sink/dynamo/go.sum index bc24a751..ed372464 100644 --- a/sink/dynamo/go.sum +++ b/sink/dynamo/go.sum @@ -54,8 +54,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -67,8 +65,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -81,10 +79,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -111,20 +105,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -139,16 +129,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -161,11 +155,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/eventbridge/go.mod b/sink/eventbridge/go.mod index c2849578..47bbd7b6 100644 --- a/sink/eventbridge/go.mod +++ b/sink/eventbridge/go.mod @@ -39,13 +39,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -63,22 +62,22 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/sink/eventbridge/go.sum b/sink/eventbridge/go.sum index e6c5c58a..55e5a0bd 100644 --- a/sink/eventbridge/go.sum +++ b/sink/eventbridge/go.sum @@ -54,8 +54,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -67,8 +65,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -81,10 +79,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -111,20 +105,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -139,16 +129,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -161,11 +155,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/firehose/go.mod b/sink/firehose/go.mod index 80752dd0..1d8bb186 100644 --- a/sink/firehose/go.mod +++ b/sink/firehose/go.mod @@ -38,13 +38,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -62,24 +61,24 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/firehose/go.sum b/sink/firehose/go.sum index 8c3bb4d3..703c8650 100644 --- a/sink/firehose/go.sum +++ b/sink/firehose/go.sum @@ -60,8 +60,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -73,8 +71,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -87,10 +85,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -117,20 +111,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -145,16 +135,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -167,11 +161,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/gcppubsub/go.mod b/sink/gcppubsub/go.mod index 0bdd21a2..4be4e98d 100644 --- a/sink/gcppubsub/go.mod +++ b/sink/gcppubsub/go.mod @@ -25,13 +25,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/s2a-go v0.1.9 // indirect @@ -52,12 +51,11 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect @@ -65,9 +63,11 @@ require ( go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.44.0 // indirect - go.opentelemetry.io/otel/metric v1.44.0 // indirect - go.opentelemetry.io/otel/trace v1.44.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.58.0 // indirect golang.org/x/net v0.62.0 // indirect golang.org/x/oauth2 v0.36.0 // indirect @@ -81,7 +81,6 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect google.golang.org/grpc v1.83.2 // indirect google.golang.org/protobuf v1.36.11 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/gcppubsub/go.sum b/sink/gcppubsub/go.sum index 8f58be6d..3fc48bf7 100644 --- a/sink/gcppubsub/go.sum +++ b/sink/gcppubsub/go.sum @@ -44,7 +44,6 @@ github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHf github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= @@ -66,8 +65,8 @@ github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDD github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -108,10 +107,6 @@ github.com/googleapis/gax-go/v2 v2.21.0 h1:h45NjjzEO3faG9Lg/cFrBh2PgegVVgzqKzuZl github.com/googleapis/gax-go/v2 v2.21.0/go.mod h1:But/NJU6TnZsrLai/xBAQLLz+Hc7fHZJt/hsCz3Fih4= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -140,13 +135,10 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= @@ -159,8 +151,8 @@ github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+Q github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/gcloud v0.42.0 h1:EdLf2NCpo43CxTfC0x2R0sW3+HqzevC78pgnH9niyYc= @@ -181,16 +173,20 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= @@ -272,10 +268,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/sink/kafka/go.mod b/sink/kafka/go.mod index 17aee146..bee289f3 100644 --- a/sink/kafka/go.mod +++ b/sink/kafka/go.mod @@ -20,13 +20,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -45,25 +44,25 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pierrec/lz4/v4 v4.1.26 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/twmb/franz-go/pkg/kmsg v1.13.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.51.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.44.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/kafka/go.sum b/sink/kafka/go.sum index fe699692..d7ed27b6 100644 --- a/sink/kafka/go.sum +++ b/sink/kafka/go.sum @@ -43,8 +43,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -74,10 +74,6 @@ github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZ github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -106,22 +102,18 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY= github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/kafka v0.42.0 h1:b3plW+MUoF6ZaVOAlLjNQMJsigPLsJFIOqHdzMFv/w4= @@ -140,16 +132,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI= golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -164,11 +160,6 @@ golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/kinesis/go.mod b/sink/kinesis/go.mod index 7d27215e..f1cf93f2 100644 --- a/sink/kinesis/go.mod +++ b/sink/kinesis/go.mod @@ -35,13 +35,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -59,24 +58,24 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/kinesis/go.sum b/sink/kinesis/go.sum index 38b710d9..7df4539b 100644 --- a/sink/kinesis/go.sum +++ b/sink/kinesis/go.sum @@ -54,8 +54,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -67,8 +65,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -81,10 +79,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -111,20 +105,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -139,16 +129,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -161,11 +155,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/nats/go.mod b/sink/nats/go.mod index 834b60c7..3392874f 100644 --- a/sink/nats/go.mod +++ b/sink/nats/go.mod @@ -24,13 +24,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -50,21 +49,21 @@ require ( github.com/nats-io/nuid v1.0.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.49.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/sink/nats/go.sum b/sink/nats/go.sum index bead3f2d..aa119a2b 100644 --- a/sink/nats/go.sum +++ b/sink/nats/go.sum @@ -22,8 +22,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -35,8 +33,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -48,10 +46,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -84,20 +78,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/nats v0.42.0 h1:WQR0+1r4GkM5QgOBoLxlP41empovt5PxtaiDpC0G7ow= @@ -112,16 +102,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -132,11 +126,6 @@ golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/otel/go.mod b/sink/otel/go.mod index 64188215..9f8af755 100644 --- a/sink/otel/go.mod +++ b/sink/otel/go.mod @@ -4,21 +4,22 @@ go 1.27.4 require ( github.com/stablekernel/crucible/sink v0.0.0 - go.opentelemetry.io/otel v1.44.0 - go.opentelemetry.io/otel/metric v1.44.0 - go.opentelemetry.io/otel/sdk v1.44.0 - go.opentelemetry.io/otel/sdk/metric v1.44.0 - go.opentelemetry.io/otel/trace v1.44.0 + go.opentelemetry.io/otel v1.47.0 + go.opentelemetry.io/otel/metric v1.47.0 + go.opentelemetry.io/otel/sdk v1.47.0 + go.opentelemetry.io/otel/sdk/metric v1.47.0 + go.opentelemetry.io/otel/trace v1.47.0 ) require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - golang.org/x/sys v0.45.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + golang.org/x/sys v0.48.0 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/otel/go.sum b/sink/otel/go.sum index b949bc7b..b50fd657 100644 --- a/sink/otel/go.sum +++ b/sink/otel/go.sum @@ -1,37 +1,35 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= -go.opentelemetry.io/otel/metric/x v0.66.0 h1:YkCrx1zLOChi9ZcZ6euupOcsgzbVlec7D/xoEU1+cTA= -go.opentelemetry.io/otel/metric/x v0.66.0/go.mod h1:d1+BDj9t96do0/1LoU1ayfCv79ZgNE41qbhBvnMOBZk= -go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= -go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= +go.opentelemetry.io/otel/metric/x v0.69.0 h1:DjRLr15H83v+hCW7JA9NoJvOkYTtmq5YoDRbe9deYpM= +go.opentelemetry.io/otel/metric/x v0.69.0/go.mod h1:uVvsMPMFFyj/HUQfrUnH3JjnOQ1dwFDorgFLRBasM0k= +go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I= +go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0= +go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw= +go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= diff --git a/sink/redis/go.mod b/sink/redis/go.mod index d6c00b83..26bbed91 100644 --- a/sink/redis/go.mod +++ b/sink/redis/go.mod @@ -20,13 +20,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -45,24 +44,24 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect go.uber.org/atomic v1.11.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/redis/go.sum b/sink/redis/go.sum index 68e9e767..c204263f 100644 --- a/sink/redis/go.sum +++ b/sink/redis/go.sum @@ -26,8 +26,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -39,8 +37,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -54,10 +52,6 @@ github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia// github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -86,22 +80,18 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/redis/go-redis/v9 v9.20.0 h1:WnQYxLkgO2xiXTCJY0ldIiI8dNqCDlQAG+AtaH7a2a0= github.com/redis/go-redis/v9 v9.20.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/redis v0.42.0 h1:id/6LH8ZeDrtAUVSuNvZUAJ1kVpb82y1pr9yweAWsRg= @@ -118,18 +108,22 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -140,11 +134,6 @@ golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/s3/go.mod b/sink/s3/go.mod index 6d65b914..a7fb4129 100644 --- a/sink/s3/go.mod +++ b/sink/s3/go.mod @@ -37,13 +37,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -61,24 +60,24 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/s3/go.sum b/sink/s3/go.sum index 3e14a396..0529e061 100644 --- a/sink/s3/go.sum +++ b/sink/s3/go.sum @@ -58,8 +58,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -71,8 +69,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -85,10 +83,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -115,20 +109,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -143,16 +133,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -165,11 +159,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/sns/go.mod b/sink/sns/go.mod index f83373ce..a94dd43d 100644 --- a/sink/sns/go.mod +++ b/sink/sns/go.mod @@ -39,13 +39,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -63,22 +62,22 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/sink/sns/go.sum b/sink/sns/go.sum index b0f50e59..a3ab4bf9 100644 --- a/sink/sns/go.sum +++ b/sink/sns/go.sum @@ -54,8 +54,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -67,8 +65,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -81,10 +79,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -111,20 +105,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -139,16 +129,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -161,11 +155,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/sqs/go.mod b/sink/sqs/go.mod index b01004c8..e6feea48 100644 --- a/sink/sqs/go.mod +++ b/sink/sqs/go.mod @@ -34,13 +34,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -58,24 +57,24 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/sqs/go.sum b/sink/sqs/go.sum index 4f5c3f23..23133c93 100644 --- a/sink/sqs/go.sum +++ b/sink/sqs/go.sum @@ -52,8 +52,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -65,8 +63,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -79,10 +77,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -109,20 +103,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -137,16 +127,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -159,11 +153,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/sink/timestream/go.mod b/sink/timestream/go.mod index ac404f4e..f9bd5095 100644 --- a/sink/timestream/go.mod +++ b/sink/timestream/go.mod @@ -35,13 +35,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -59,24 +58,24 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/stablekernel/crucible/sink => ../ diff --git a/sink/timestream/go.sum b/sink/timestream/go.sum index cca7b1bb..24e67b76 100644 --- a/sink/timestream/go.sum +++ b/sink/timestream/go.sum @@ -54,8 +54,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -67,8 +65,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -81,10 +79,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -111,20 +105,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/localstack v0.42.0 h1:UDpC8q/+b99GNPBOK5xFEZxvbNTzW4lPyuk9951e8nE= @@ -139,16 +129,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -161,11 +155,6 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/source/jetstream/go.mod b/source/jetstream/go.mod index a0eed408..d3b2fbcf 100644 --- a/source/jetstream/go.mod +++ b/source/jetstream/go.mod @@ -24,13 +24,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -50,21 +49,21 @@ require ( github.com/nats-io/nuid v1.0.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.49.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/source/jetstream/go.sum b/source/jetstream/go.sum index bead3f2d..aa119a2b 100644 --- a/source/jetstream/go.sum +++ b/source/jetstream/go.sum @@ -22,8 +22,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -35,8 +33,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -48,10 +46,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -84,20 +78,16 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/nats v0.42.0 h1:WQR0+1r4GkM5QgOBoLxlP41empovt5PxtaiDpC0G7ow= @@ -112,16 +102,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -132,11 +126,6 @@ golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/source/kafka/integration/go.mod b/source/kafka/integration/go.mod index 14674222..9335ae1a 100644 --- a/source/kafka/integration/go.mod +++ b/source/kafka/integration/go.mod @@ -29,13 +29,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -54,25 +53,25 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pierrec/lz4/v4 v4.1.26 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/twmb/franz-go/pkg/kmsg v1.13.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.51.0 // indirect golang.org/x/mod v0.33.0 // indirect golang.org/x/sys v0.44.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) // Both imported packages are local modules: the stdlib-only core (two levels diff --git a/source/kafka/integration/go.sum b/source/kafka/integration/go.sum index d534d1a1..6fb218df 100644 --- a/source/kafka/integration/go.sum +++ b/source/kafka/integration/go.sum @@ -22,8 +22,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -35,8 +33,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -48,10 +46,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -82,20 +76,16 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY= github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/redpanda v0.42.0 h1:mcPLvf3rzvvwG46i4jcyOk7/KcapE/IKnBgwo27k68M= @@ -116,16 +106,20 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI= golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= @@ -138,11 +132,6 @@ golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/source/redis/go.mod b/source/redis/go.mod index 520006ea..8bef8fa4 100644 --- a/source/redis/go.mod +++ b/source/redis/go.mod @@ -24,13 +24,12 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -49,22 +48,22 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect github.com/stablekernel/crucible/telemetry v0.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect go.uber.org/atomic v1.11.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/sys v0.42.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/source/redis/go.sum b/source/redis/go.sum index 68e9e767..c204263f 100644 --- a/source/redis/go.sum +++ b/source/redis/go.sum @@ -26,8 +26,6 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= @@ -39,8 +37,8 @@ github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLA github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -54,10 +52,6 @@ github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia// github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= @@ -86,22 +80,18 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/redis/go-redis/v9 v9.20.0 h1:WnQYxLkgO2xiXTCJY0ldIiI8dNqCDlQAG+AtaH7a2a0= github.com/redis/go-redis/v9 v9.20.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/testcontainers/testcontainers-go/modules/redis v0.42.0 h1:id/6LH8ZeDrtAUVSuNvZUAJ1kVpb82y1pr9yweAWsRg= @@ -118,18 +108,22 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -140,11 +134,6 @@ golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= diff --git a/state/CHANGELOG.md b/state/CHANGELOG.md index 31ba6866..f80975f9 100644 --- a/state/CHANGELOG.md +++ b/state/CHANGELOG.md @@ -13,6 +13,14 @@ counts as an additive (minor) versus breaking (major) change. Use the ### Added +- **`SpawnActor.HasDone` / `HasError`, and `Invocation.HasOnDone` / `HasOnError`,** + say whether a spawn's outcome events were declared (`WithInvokeOnDone` / + `WithInvokeOnError`, `WithSpawnOnDone` / `WithSpawnOnError`), so a host routes an + invoked actor's completion only through outcomes its invoke declared, rather than + reading the zero event an unset outcome leaves as a routed one (see the Changed + entry on declared-outcome routing). The invocation fields are additive `omitempty` + wire fields, appended to the frozen shape; a serialized machine from before them + decodes them as unset. It's additive, within v1.1.0. - **`ErrNoTransition`** matches, with `errors.Is`, the `*InvalidTransitionError` a `Fire` returns when the active configuration declares no transition for the event, and no host-built error with the same `Reason`. It's additive, within v1.1.0. @@ -46,6 +54,41 @@ counts as an additive (minor) versus breaking (major) change. Use the `SettleError` return false with `abort` in `FireResult.Err`, and `Tick` returns that `FireResult` as its one element. An unbound service still settles through onError: a transform that returns no error for its `UnboundRefError` doesn't make it succeed. +- **`ActorSystem.WithSettleTransform`** is the actor seam's new counterpart: it rewrites + every routed actor outcome before it settles, whether a delivery, a panic the actor raised + while stepping, or `SettleError` settles it, so a host that records outcomes can give + the live run and a replay the same value. The transform takes the event that will + carry the outcome, the invocation's onDone for an output and its onError for an + error: `func(event E, output any, err error) (out any, outErr error, abort error)`. + It runs before any event fires and before the actor is marked done, and only when + the settle routes a completion — the actor succeeded and its invocation wired an + `onDone`, or failed and wired an `onError`. A settle that routes nothing runs no + transform and can abort nothing, firing nothing: a host + journaling outcomes records no entry for it, and `LastOutput` and `LastError` + report the raw outcome. A non-nil `abort` + stops the settle: no event fires, the actor stays running, the settle reports the + abort as `ServiceRunner.WithResultTransform`'s does, and the system's `Tick` returns + that `FireResult` as one element of its slice. An actor stopped or settled while the + transform ran reports no abort, as a stale settle does. This is new API, additive + within v1.1.0. + An abort from a settle that a delivery drives isn't reported to + `Deliver`'s caller: the actor stays running, and the abort reaches no return + value. It's reported to the new `WithSettleAbortObserver` on every path that + drives the settle; the durable Runner's `Handle` wires one. The actor a delivery + or `Tick` later finds still running with its machine already final — the settle + the transform aborted was its completion — isn't stepped: the delivery retries + the settle (see the Fixed entry on the settle retry). +- **`ActorSystem.WithSettleAbortObserver`** calls a function once for every settle + that aborts — every path that drives one: a delivery, `Deliver` and the + `sendTo` / `sendParent` / `respond` / `forwardTo` sugar through it, a `Tick` the + host drives, and `SettleError` — with a `SettleAbort`: the actor's id, the event + the settle would have carried the outcome through (the invocation's `onDone` for + an output, its `onError` for an error), and the abort itself, as given. It's the + one channel an abort a delivery drives reaches: `Deliver` returns only whether it + found the actor running, and the mailbox it drained is left empty, so the abort is + in no return value a later call can recover. A settle whose actor was stopped, + settled, or respawned under the same id while its transform ran reports no abort, + as a stale settle does. It's additive, within v1.1.0. - **`FireEventData`** reports the payload a `WithEventData` option carries, so a host that records a Fire can persist it. It's additive, so the next release is v1.1.0. - **Callbacks get the step's context.** `GuardCtx`, `ActionCtx` and `AssignCtx` have a new @@ -66,6 +109,47 @@ counts as an additive (minor) versus breaking (major) change. Use the ### Changed - Requires Go 1.27.4. +- **One settle owns an actor at a time.** Two concurrent settles on one actor — + through the exported API, since a host driving the system and the parent from one + goroutine can't produce them — both ran their `WithSettleTransform` functions + against the same outcome, and the loser could report an abort for an actor the + winner went on to settle, or clear the winner's recorded outcome between its + transform and its journaling. A settle that finds the actor already settled, or + owned by a settle still in flight — another goroutine's, or the transform's own + reentrant call — now returns the zero result and false, firing nothing and running + no transform; a `Tick` whose step produced the actor's completion waits the owner + out, since the completion is the actor's own and must settle, and a delivery whose + actor is owned leaves its envelope queued for a later `Tick`. `SettleError` on an + already-settled, not-stopped actor is refused the same way — where it re-settled + the actor through onError on main, moving the parent again — whether or not a + transform is set, and a failure whose settle the transform rewrote into a success + nothing routes (an invocation with an `onError` but no `onDone`) escalates the + ORIGINAL error, as the failure does with no transform: a transform may rewrite the + outcome, not erase the failure. A settle a host's respawn replay drops + (`AbsorbRespawn`) now decides the drop before the transform runs, so an outcome + that differs on the respawn — one that won't encode, say — can't abort a settle + that is thrown away whole. +- **An invoked actor routes only the outcomes its invocation declared.** An + `InvokeActor` with no `WithInvokeOnDone` fired the zero event on the child's + success — which the parent refused as having no transition, but not before a host's + settle transform and event-data decoder were consulted for the zero event — and one + with no `WithInvokeOnError` fired it on failure the same way. A completion whose + outcome event wasn't declared now routes nothing: a success settles as the + fire-and-forget no-op a dynamic spawn's always was, and a failure escalates to the + parent as a dynamic spawn's does, so a parent that declares a transition on the zero + event never sees one from an unset outcome. `SpawnActor` carries `HasDone` / + `HasError`, set from the invoke or spawn options, and the invocation IR records + `HasOnDone` / `HasOnError` (additive, `omitempty` wire fields), so a host routes on + what was declared rather than on the zero event an unset outcome leaves — which a + spawn that declared the zero event itself still routes, as it always did. A + serialized machine from before the flags exists decodes them as unset, but a + load back-fills each flag for an outcome event that is present and non-zero — an + older producer set the event only when it declared it — so a reloaded definition + keeps the outcomes it declared (an unset outcome still decodes as unset: the zero + event back-fills nothing), and a `SpawnActor` effect payload from an older + producer back-fills its `HasDone` / `HasError` the same way. `Spawn`-action + effects always carried the distinction, since an omitted option leaves the param + absent. - **A guard registered with `BindGuard` gets the Fire's context** in `EvalGuard`, where it used to get a background one. An error it returns after that context ended no longer counts as a false verdict: the Fire fails with the context's error at once. Before, @@ -82,6 +166,20 @@ counts as an additive (minor) versus breaking (major) change. Use the whole system, so a message another goroutine's delivery sent the parent while it ran was dropped. The quiet now rides the call chain that spawns each actor, and ends when `AbsorbRespawn` returns. +- **A delivery to an actor whose machine is already final retries the settle.** A + delivery or `Tick` to a running actor whose machine had already reached its final + state — an actor a settle's transform aborted left it that way — stepped the machine + anyway, firing the delivered event into the final state, which failed as "state is + final" and settled the actor as a FAILURE through onError (or escalated it): the + actor's completed outcome was misrouted as a crash. It now retries settling the + final outcome instead, through the same ownership path as any settle: the transform + runs again, an abort is reported again to the `WithSettleAbortObserver`, and once + the transform stops aborting a later delivery or `Tick` lands the good output + through onDone. Nothing is misrouted through onError. The retry runs with an empty + mailbox too, so a bare `Tick` of the actor settles an outcome a delivery's abort + left unsettled. The durable runner is unaffected: the retry drives the same settle + a delivery always did, so its journal records the same entries, and its replay + never delivers to an actor. - **A `ServiceRunner` settle can't settle a later activation of its service.** A `SettleDone` or `SettleError` whose result transform was running, or a `Tick` whose `ServiceFn` was running, while the service was stopped and armed again under the same diff --git a/state/actor.go b/state/actor.go index b7b4b6ee..cb6b7827 100644 --- a/state/actor.go +++ b/state/actor.go @@ -1,6 +1,9 @@ package state -import "context" +import ( + "context" + "encoding/json" +) // This file defines the actor-model contract: the declarative shape an actor // invocation takes on a state, the effects the kernel emits so a host runtime @@ -76,10 +79,25 @@ type SpawnActor struct { // child's output) when the child actor reaches its final state, type-erased for // the abstract effect surface; an ActorSystem keeps it typed. OnDone any `json:"onDone,omitempty"` + // HasDone reports whether this spawn declared an onDone — the invocation's + // WithInvokeOnDone, or the dynamic spawn's WithSpawnOnDone — so the host routes + // the child's success only when one was declared. An unset outcome leaves OnDone + // at the zero event, which must not route: the flag, not the event's value, says + // whether an outcome was declared, so a success with no onDone settles as the + // fire-and-forget no-op a spawn that declared neither is. A payload from before + // the flag back-fills it on decode for an OnDone that is present and non-zero, + // as Invocation.UnmarshalJSON does for the IR. + HasDone bool `json:"hasDone,omitempty"` // OnError is the event the host re-fires through the PARENT's Fire (carrying the // error) when the child actor fails, type-erased for the abstract effect // surface. OnError any `json:"onError,omitempty"` + // HasError is the failure-side twin of HasDone: it reports whether this spawn + // declared an onError, so the host routes the child's failure only when one was, + // and escalates it to the parent otherwise, rather than firing the zero event an + // unset outcome leaves. A payload from before the flag back-fills it on decode + // for an OnError that is present and non-zero. + HasError bool `json:"hasError,omitempty"` // State names the owning state whose entry spawned this actor, for diagnostics // and host bookkeeping. Empty for a dynamic spawn emitted from a transition. State string `json:"state,omitempty"` @@ -89,6 +107,58 @@ type SpawnActor struct { SystemID string `json:"systemId,omitempty"` } +// UnmarshalJSON decodes a SpawnActor, back-filling HasDone / HasError for a +// payload an older producer wrote — one from before the flags existed, which +// carried the declared outcome events but no flags — when the flag's key is +// absent and the event is present and non-zero: an older producer set the event +// only when it declared it, so a decoded envelope keeps the outcomes its spawn +// declared. An unset outcome stays unset — a static invoke's unset outcome boxes +// the parent's zero event and a dynamic spawn's omitted option leaves no key, +// and neither back-fills — so a new producer's payload round-trips unchanged. +// The zero-event test is on the decoded value's own type, which is exact for the +// scalar event types (string, number, bool) a wire form distinguishes; a +// composite event's zero form is not recognizable after the type-erased +// round-trip, so a host on such events reloads declared outcomes from the typed +// IR (Invocation.UnmarshalJSON) rather than an aged effect payload. +func (e *SpawnActor) UnmarshalJSON(data []byte) error { + type alias SpawnActor + var a alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + if !hasJSONKey(data, "hasDone") && !decodedZeroEvent(a.OnDone) { + a.HasDone = true + } + if !hasJSONKey(data, "hasError") && !decodedZeroEvent(a.OnError) { + a.HasError = true + } + *e = SpawnActor(a) + return nil +} + +// decodedZeroEvent reports whether v, a JSON-decoded event value held in the +// type-erased outcome field of an effect, is the zero of its own type — the wire +// form an unset scalar outcome takes when a producer boxed its machine's zero +// event. It is the any-typed counterpart of the typed zero test +// Invocation.UnmarshalJSON makes: nil (no key, a dynamic spawn's omitted option) +// and each scalar's zero back-fill nothing; everything else does. +func decodedZeroEvent(v any) bool { + switch x := v.(type) { + case nil: + return true + case string: + return x == "" + case bool: + return !x + case float64: + return x == 0 + case json.Number: + return x.String() == "0" + default: + return false + } +} + // StopActor is the effect the kernel emits when an instance exits a state that // had a running child-machine actor (auto-stop-on-exit), or when the built-in // stop action runs. The host's ActorSystem stops the actor registered under ID @@ -174,12 +244,17 @@ func evalActorBuiltinAction(a Ref) (Effect, error) { id, _ := a.Params[spawnIDParam].(string) input, _ := a.Params[spawnInputParam].(map[string]any) systemID, _ := a.Params[spawnSystemIDParam].(string) + // A spawn param the declaration left unset is absent from the params, so its + // presence is the has-done / has-error flag; a declared outcome of the zero + // event still sets it. return SpawnActor{ ID: id, Src: Ref{Name: src}, Input: input, OnDone: a.Params[spawnOnDoneParam], + HasDone: a.Params[spawnOnDoneParam] != nil, OnError: a.Params[spawnOnErrorParam], + HasError: a.Params[spawnOnErrorParam] != nil, SystemID: systemID, }, nil case stopActorBuiltinName: @@ -241,7 +316,9 @@ func (i *Instance[S, E, C]) actorEffectsOnEntry(entries []S, tr *Trace) []Effect Src: inv.Src, Input: inv.Input, OnDone: inv.OnDone, + HasDone: inv.HasOnDone, OnError: inv.OnError, + HasError: inv.HasOnError, State: fmtState(s), SystemID: inv.SystemID, }) @@ -366,6 +443,13 @@ func (a *actorAdapter[S, E, C]) DeliverFire(ctx context.Context, event any) (boo // part of the public ActorInstance contract. func (a *actorAdapter[S, E, C]) FireErr() error { return a.fireErr } +// InFinal reports whether the wrapped child instance's active configuration is +// final. The ActorSystem reads it (via the optional finalActor interface) to +// retry settling an actor a settle left running with its machine already final, +// rather than stepping a machine that has no step left. It is not part of the +// public ActorInstance contract. +func (a *actorAdapter[S, E, C]) InFinal() bool { return a.inst.InFinal() } + // ChildEffects returns and drains the buffered child actor effects — the // SpawnActor / StopActor lifecycle effects and the SendTo / SendParent / // RespondToSender / ForwardEvent communication effects the child emitted — so the diff --git a/state/actor_respawn_test.go b/state/actor_respawn_test.go index 13d52f72..a710696e 100644 --- a/state/actor_respawn_test.go +++ b/state/actor_respawn_test.go @@ -148,9 +148,9 @@ func TestActorSystem_AbsorbRespawn_NestedStartFiresStayQuiet(t *testing.T) { Transition("hosting").On("nestedDone").GoTo("heard"). Quench() starts := map[string][]state.Effect{ - "fails": {state.SpawnActor{ID: "child", Src: state.Ref{Name: "broken"}, OnError: "nestedFailed"}}, + "fails": {state.SpawnActor{ID: "child", Src: state.Ref{Name: "broken"}, OnError: "nestedFailed", HasError: true}}, "settles": { - state.SpawnActor{ID: "child", Src: state.Ref{Name: "finisher"}, OnDone: "nestedDone"}, + state.SpawnActor{ID: "child", Src: state.Ref{Name: "finisher"}, OnDone: "nestedDone", HasDone: true}, state.SendTo{TargetID: "child", Event: "finish"}, }, } diff --git a/state/actor_system.go b/state/actor_system.go index ed44394b..7fc36061 100644 --- a/state/actor_system.go +++ b/state/actor_system.go @@ -2,6 +2,8 @@ package state import ( "context" + "errors" + "runtime" "sort" "sync" "sync/atomic" @@ -113,6 +115,14 @@ type runningActor[E comparable] struct { // current event was injected with no actor origin (then respond is a no-op). The // sentinel parentActorID identifies the parent instance as the origin. sender string + // settling is set while one settle owns the actor: from the settle's entry, + // under the system lock, until it returns. A second settle for the same actor — + // from another goroutine, or reentrant from the transform itself — finds it set + // and returns nothing, so two settles never run transforms against one actor + // and a losing concurrent settle can't rewrite or abort the winner's outcome. + // The mailbox is untouched: a delivery that finds the actor owned leaves its + // envelope queued for a later Tick. + settling bool } // parentActorID is the sentinel id the routing layer uses for the parent instance @@ -160,6 +170,12 @@ type ActorSystem[S comparable, E comparable, C any] struct { // drives. Set with WithParentFireObserver; guarded by mu. parentFireObserver func(ParentFire[S]) + // settleAbortObserver, when set, is called with each settle that aborts — every + // path that drives one, a delivery and the sendTo / sendParent / forwardTo sugar + // through it, a Tick, or SettleError. Set with WithSettleAbortObserver; guarded + // by mu. + settleAbortObserver func(SettleAbort[E]) + // escalationHandler is the optional host policy invoked for each escalation. It // is nil by default — the default escalation behavior (record + inspect) needs no // handler — and wired with WithEscalationHandler. @@ -179,6 +195,12 @@ type ActorSystem[S comparable, E comparable, C any] struct { // the per-instance Inspector wired with WithInspector: the ActorSystem owns // spawning, stopping, and message delivery, which the pure Fire step never sees. inspector Inspector + + // transform, when set, rewrites every outcome before it settles, given the event + // that will carry it, or aborts the settle. It runs in settle before the actor is + // marked done and before the routing Fire, so an abort, or a panic, leaves the + // actor running. Set with WithSettleTransform. + transform func(event E, output any, err error) (out any, outErr error, abort error) } // WithActorInspector wires a live observer sink fed the ActorSystem's @@ -275,8 +297,9 @@ func (s *ActorSystem[S, E, C]) RegisterContext(src string, behavior ContextActor // each StopActor (auto-stop-on-exit, recursively stopping the actor's children). // It is how a host wires Fire's output back into the system; call it with the // effects of every Fire (and once with the parent's StartEffects for the initial -// state). A SpawnActor whose OnDone/OnError is not the parent's event type still -// spawns the actor (a fire-and-forget child) but routes no completion event. +// state). A SpawnActor that declared no OnDone / OnError, or whose declared event is +// not the parent's event type, still spawns the actor (a fire-and-forget child) but +// routes no completion event. // // A SpawnActor whose Src does not resolve against the palette is settled // immediately as an error: its OnError (when usable) is fired through the parent so @@ -444,13 +467,22 @@ func (s *ActorSystem[S, E, C]) spawn(ctx context.Context, e SpawnActor) { ref: ActorRef{ID: e.ID, SystemID: e.SystemID, Src: e.Src.Name}, state: e.State, } - if d, ok := e.OnDone.(E); ok { - ra.onDone = d - ra.hasDone = true + // The spawn's own flags say whether an outcome event was declared, so an unset + // one — the zero event an invoke's or spawn's omitted option leaves, which is + // still the parent's event type — routes nothing: a success with no onDone + // settles as a fire-and-forget no-op, a failure with no onError escalates, as a + // spawn that declared neither always has. + if e.HasDone { + if d, ok := e.OnDone.(E); ok { + ra.onDone = d + ra.hasDone = true + } } - if er, ok := e.OnError.(E); ok { - ra.onError = er - ra.hasError = true + if e.HasError { + if er, ok := e.OnError.(E); ok { + ra.onError = er + ra.hasError = true + } } s.mu.Lock() @@ -469,10 +501,11 @@ func (s *ActorSystem[S, E, C]) spawn(ctx context.Context, e SpawnActor) { } // routeError fires the parent's onError for a spawn that could not start (an -// unbound Src or a behavior that returned an error). When the parent declared a -// usable onError the failure routes there (unchanged); when it did not, the spawn -// failure escalates to the parent as a typed ActorEscalation rather than being -// silently swallowed (the G3 default), so a spawn that cannot start is never lost. +// unbound Src or a behavior that returned an error). When the spawn declared a +// usable onError the failure routes there (unchanged); when it declared none, or +// one that isn't the parent's event type, the spawn failure escalates to the parent +// as a typed ActorEscalation rather than being silently swallowed (the G3 default), +// so a spawn that cannot start is never lost. func (s *ActorSystem[S, E, C]) routeError(ctx context.Context, e SpawnActor, err error) { drop, lift := hearing(ctx, e.ID) // A failure the start AbsorbRespawn is repeating was routed or escalated when it @@ -480,6 +513,13 @@ func (s *ActorSystem[S, E, C]) routeError(ctx context.Context, e SpawnActor, err if drop { return } + // A spawn that declared no onError escalates the failure, as one whose declared + // onError isn't the parent's event type does: the unset outcome leaves the zero + // event, which must not route. + if !e.HasError { + s.escalate(ctx, &runningActor[E]{ref: ActorRef{ID: e.ID, SystemID: e.SystemID, Src: e.Src.Name}}, "", err) + return + } ev, ok := e.OnError.(E) if !ok { s.escalate(ctx, &runningActor[E]{ref: ActorRef{ID: e.ID, SystemID: e.SystemID, Src: e.Src.Name}}, "", err) @@ -572,9 +612,22 @@ func (s *ActorSystem[S, E, C]) IsRunning(id string) bool { // Deliver routes event into the mailbox of the actor identified by ref, then // drains the actor (Step) so the delivered event is processed and any resulting // completion is routed to the parent. It returns whether the actor was found -// running. It is the delivery mechanism the sendTo / sendParent / respond / -// forwardTo action sugar routes through; a host (or a test) may also call it -// directly to inject an event into an actor from outside. +// running. An abort a WithSettleTransform function returns for a settle the +// delivery drives isn't reported to Deliver's caller: the abort went to the +// delivery's Tick, whose results Deliver drops, so the actor stays running — +// with its machine already final, since the settle the transform aborted was the +// actor's completion. A later delivery or Tick doesn't step that final machine +// (its event has no transition left to fire): it retries settling the final +// outcome through the same ownership path as any settle, so the transform runs +// again, an abort is reported again to the observer, and once the transform +// stops aborting the good output lands through onDone — nothing is misrouted +// through onError. The abort itself is still reported, on this path as on every +// path that drives a settle, only to the WithSettleAbortObserver; a host that +// records aborts wires one. A delivery whose actor a concurrent +// settle still owns leaves its envelope queued (see Tick) and returns true: the +// actor was running. Deliver is the delivery mechanism the sendTo / +// sendParent / respond / forwardTo action sugar routes through; a host (or a test) +// may also call it directly to inject an event into an actor from outside. func (s *ActorSystem[S, E, C]) Deliver(ctx context.Context, ref ActorRef, event any) bool { return s.deliver(ctx, ref.ID, event, "") } @@ -602,12 +655,39 @@ func (s *ActorSystem[S, E, C]) DeliverByID(ctx context.Context, id string, event return s.Deliver(ctx, ActorRef{ID: id}, event) } +// finalActor is the optional interface a backing ActorInstance implements to +// report that its machine has already reached its final configuration, so a +// delivery or Tick to an actor a settle left running — a transform aborted +// before it could mark the actor done — retries settling the final outcome +// rather than stepping a machine that has no step left. The standard +// actorAdapter implements it; a host's own ActorInstance need not, in which case +// a delivery steps the actor as before. It follows the frozen-interface growth +// pattern: ActorInstance's method set stays locked at v1.0 and capabilities +// arrive as separate optional interfaces the system discovers by assertion. +type finalActor interface { + // InFinal reports whether the actor's machine is in its final configuration. + InFinal() bool +} + // Tick drains the mailbox of the actor under id, firing each queued event through // the actor in order. When the actor reaches its final state it is settled: the // parent's onDone event (carrying the child's output) is fired through the parent // and the resulting effects absorbed; nested-child effects the actor emits are // absorbed too. It returns the parent FireResults produced by completion routing, -// in order (empty when the actor did not complete). Tick is the ActorSystem's +// in order (empty when the actor did not complete), and, when a WithSettleTransform +// function aborts the settle, one FireResult whose Err is the abort, as the +// ServiceRunner's Tick reports its abort: no event fired, and the actor stays +// running — and the abort is reported to the WithSettleAbortObserver, as every +// path's is. An actor whose machine is already final — a settle a transform +// aborted left it running — has no step left to run, so a Tick of it never steps +// the machine, a queued envelope or none: it retries settling the final outcome +// through the same ownership path as any settle, transform, abort report and +// all, so the good output lands once the transform stops aborting. A settle whose +// actor a concurrent settle still owns is waited out +// rather than dropped: Tick holds the actor's real completion, so it settles once +// the owner releases. An actor a settle still in flight owns is otherwise left +// alone, its queued envelope left for a later Tick, so no step runs against an +// outcome a concurrent settle is rewriting. Tick is the ActorSystem's // advance verb — the host-driver counterpart of Scheduler.Tick and // ServiceRunner.Tick — safe to call with an empty mailbox (a no-op) and is how the // deterministic driver advances an actor; a production driver runs it from the @@ -617,14 +697,40 @@ func (s *ActorSystem[S, E, C]) Tick(ctx context.Context, id string) []FireResult for { s.mu.Lock() ra, ok := s.actors[id] - if !ok || ra.done || len(ra.mailbox) == 0 { + // An actor a settle still in flight owns is left alone: its envelope stays + // queued, for the settle's caller or a later Tick of the host's, rather than + // stepped against an outcome a concurrent settle is rewriting. + if !ok || ra.done || ra.settling { + s.mu.Unlock() + return out + } + inst := ra.inst + // A running actor whose machine is already final — one a settle's transform + // aborted left it, or a child Cast straight into its final state — has no + // step left to run: firing the delivered event would fail as "state is + // final" and settle the actor's completed outcome as a failure through + // onError (or an escalation). Retry settling the final outcome instead, + // through the same ownership path as any settle: the transform runs again, + // an abort is reported again to the WithSettleAbortObserver, and once the + // transform stops aborting the good output lands through onDone. Any queued + // envelope goes with it: its event has no transition left to fire. The + // retry runs with an empty mailbox too, so a host's bare Tick lands the + // outcome a delivery's abort left unsettled. + if fp, final := inst.(finalActor); final && fp.InFinal() { + ra.mailbox = nil + s.mu.Unlock() + if res, ok := s.settleCompletion(ctx, id, ra, inst.Output(), nil); ok || res.Err != nil { + out = append(out, res) + } + return out + } + if len(ra.mailbox) == 0 { s.mu.Unlock() return out } env := ra.mailbox[0] ra.mailbox = ra.mailbox[1:] ra.sender = env.sender - inst := ra.inst s.mu.Unlock() done, output, panicErr := deliverFireGuarded(ctx, inst, env.event) @@ -634,8 +740,9 @@ func (s *ActorSystem[S, E, C]) Tick(ctx context.Context, id string) []FireResult } // A child that panicked while stepping is a failure: settle it as an error // so its onError routes, or — with no onError — escalate to the parent. The - // panic never crashes the host driver. - if res, ok := s.settle(ctx, id, nil, panicErr); ok { + // panic never crashes the host driver. A transform that aborts the settle + // reports the abort here instead, leaving the actor running. + if res, ok := s.settleCompletion(ctx, id, ra, nil, panicErr); ok || res.Err != nil { out = append(out, res) } return out @@ -645,7 +752,7 @@ func (s *ActorSystem[S, E, C]) Tick(ctx context.Context, id string) []FireResult // is what a ForwardEvent forwards verbatim. s.absorbChildren(ctx, id, env.event, inst.ChildEffects()) if done { - if res, ok := s.settle(ctx, id, output, nil); ok { + if res, ok := s.settleCompletion(ctx, id, ra, output, nil); ok || res.Err != nil { out = append(out, res) } return out @@ -782,19 +889,85 @@ func (s *ActorSystem[S, E, C]) fireParentFrom(ctx context.Context, event any, se s.mu.Unlock() } -// settle marks the actor done and routes its completion through the parent: on -// success the parent's onDone fires (carrying output via LastOutput), on failure -// onError. It returns the parent FireResult and true when a routing event fired, -// or false when the actor routes no completion or is unknown. +// settle routes the actor's completion through the parent: on success the +// parent's onDone fires (carrying output via LastOutput), on failure onError. A +// WithSettleTransform function runs first for a settle that routes a completion — +// before the actor is marked done and before the routing Fire — so one that aborts, +// or panics, leaves the actor running, with its machine already final when the +// settle was the actor's completion: a later delivery or Tick retries that settle +// rather than stepping the final machine (see WithSettleTransform). An abort is +// reported as the ServiceRunner's +// is (see WithSettleTransform), to the WithSettleAbortObserver on every path that +// drives the settle. A settle that routes nothing runs no transform, settling +// exactly as with none set. It returns the parent FireResult and true when +// a routing event fired, or false when the actor routes no completion or is unknown. +// +// One settle owns the actor at a time: a settle that finds the actor already +// settled, or owned by a settle still in flight — another goroutine's, or the +// transform's own reentrant call — returns the zero result and false, firing +// nothing and running no transform, so a losing concurrent settle can't rewrite +// or abort the winner's outcome. // // When the actor FAILED and no onError was wired, settle does not silently swallow // the failure: it escalates to the parent as a typed, observable ActorEscalation // (the G3 escalate-to-parent default), so an unhandled child crash always surfaces. -// A clean completion with no onDone remains a fire-and-forget no-op. +// A clean completion with no onDone remains a fire-and-forget no-op — except a +// failure the transform rewrote into such a completion, which escalates the +// ORIGINAL error: a transform may rewrite the outcome, not erase the failure. func (s *ActorSystem[S, E, C]) settle(ctx context.Context, id string, output any, err error) (FireResult[S], bool) { s.mu.Lock() ra, ok := s.actors[id] - if !ok { + if !ok || ra.done || ra.settling { + s.mu.Unlock() + return FireResult[S]{}, false + } + ra.settling = true + s.mu.Unlock() + defer s.releaseSettle(ra) + // The transform runs only when the settle routes a completion: the actor + // succeeded and its invocation wired an onDone (ra.hasDone), or failed and wired + // an onError (ra.hasError). A settle that routes nothing — a success with no + // onDone, a failure with no onError — runs no transform, exactly as with none + // set: nothing consumes the outcome, so nothing may rewrite or abort it, and + // LastOutput and LastError report the raw outcome. ra's routing fields are + // written only at its spawn, before it is published under the lock, so reading + // them here, outside it, is safe. + routed := (err == nil && ra.hasDone) || (err != nil && ra.hasError) + // The respawn drop is decided before the transform runs: a settle a host's + // respawn replay drops (hearing) fires nothing and records nothing, so nothing + // may rewrite or abort it either — an outcome that differs on the respawn, such + // as one that won't encode, can't fail a settle that is thrown away. + drop, lift := hearing(ctx, id) + // origErr keeps the failure the actor produced, for the escalation below: the + // transform may rewrite it into a success nothing routes. + origErr := err + if s.transform != nil && routed && !drop { + ev := ra.onDone + if err != nil { + ev = ra.onError + } + // The transform runs outside the lock, before the actor is marked done, so an + // abort, or a panic in the transform, leaves the actor running and settleable + // again. It may stop the actor and spawn another under the same id while it + // runs, so from here the settle holds to ra, the actor it began for: only that + // actor, still running, settles or reports an abort. + var abort error + if output, err, abort = s.applySettleTransform(ev, ra, output, err); abort != nil { + // An actor stopped, settled, or respawned under the same id while the + // transform ran reports no abort, as the ServiceRunner's stale settle does: + // the abort came from the actor the transform ran for, and nothing of that + // actor is in flight to settle again. The done recheck runs under the + // lock, so a settle that lost to the one settling the actor reports + // nothing. + if !s.sameActor(id, ra) { + return FireResult[S]{}, false + } + s.noteSettleAbort(SettleAbort[E]{ActorID: id, Event: ev, Abort: abort}) + return FireResult[S]{Err: abort}, false + } + } + s.mu.Lock() + if cur, ok := s.actors[id]; !ok || cur != ra || cur.done { s.mu.Unlock() return FireResult[S]{}, false } @@ -810,7 +983,6 @@ func (s *ActorSystem[S, E, C]) settle(ctx context.Context, id string, output any } s.lastOutcome = actorOutcome{output: output, err: err, set: true} s.mu.Unlock() - drop, lift := hearing(ctx, id) // A completed actor's children are torn down with it. for _, c := range children { @@ -820,10 +992,16 @@ func (s *ActorSystem[S, E, C]) settle(ctx context.Context, id string, output any // G3 default: an unhandled child FAILURE (no onError wired) escalates to the // parent as a typed, observable ActorEscalation rather than being silently // swallowed. A clean completion with no onDone is still a fire-and-forget - // no-op — only a failure escalates. A failure the start AbsorbRespawn is - // repeating escalated when it first happened. - if err != nil && !drop { - s.escalate(ctx, ra, parentID, err) + // no-op — only a failure escalates. A failure the transform rewrote into + // such a completion escalates the ORIGINAL error (origErr): a transform may + // rewrite the outcome, not erase the failure. A failure the start + // AbsorbRespawn is repeating escalated when it first happened. + escErr := err + if escErr == nil { + escErr = origErr + } + if escErr != nil && !drop { + s.escalate(ctx, ra, parentID, escErr) } return FireResult[S]{}, false } @@ -851,7 +1029,14 @@ func (s *ActorSystem[S, E, C]) settle(ctx context.Context, id string, output any // SettleError fails the running actor under id explicitly (e.g. a host-detected // child crash), routing the parent's onError. It returns the parent FireResult and -// true, or false when id is not running or routes no onError. When no onError was +// true, or false when id is not running or routes no onError. When a +// WithSettleTransform function aborts the settle, it returns false with the abort, +// as given, in FireResult.Err, fires nothing and leaves the actor running, as the +// ServiceRunner's settle does, and reports the abort to the WithSettleAbortObserver. +// It also returns the zero result and false when the actor has already settled — +// a previous settle's, not a stop's — or another settle still in flight owns it: +// one settle owns an actor at a time, so a host retrying after an abort wins the +// ownership once the first returns. When no onError was // wired, the failure escalates to the parent as a typed ActorEscalation rather than // being swallowed (the G3 default), so the returned false still means "no onError // event fired" — not "the failure was lost". @@ -945,6 +1130,179 @@ func (s *ActorSystem[S, E, C]) WithParentFireObserver(observe func(ParentFire[S] return s } +// SettleAbort is one aborted settle, as WithSettleAbortObserver reports it: a +// WithSettleTransform function returned a non-nil abort for the actor's outcome, +// so no event fired, no Assign ran and the actor stayed running. +type SettleAbort[E comparable] struct { + // ActorID is the id of the actor whose settle aborted. + ActorID string + // Event is the event the settle would have carried the outcome through: the + // invocation's onDone for an output, its onError for an error. + Event E + // Abort is the abort the WithSettleTransform function returned, as given. + Abort error +} + +// WithSettleAbortObserver calls observe once for every settle that aborts, on +// every path that drives one: a delivery — Deliver and the sendTo / sendParent / +// respond / forwardTo sugar, which route through the same delivery — a Tick the +// host drives, and SettleError. It is the one channel an abort a delivery drives +// reaches: Deliver reports only whether it found the actor running, and the +// mailbox it drained is left empty, so the abort is in no return value a later +// call can recover. A settle that found its actor stopped, settled, or respawned +// under the same id while its transform ran reports no abort, as a stale settle +// does, and neither does a settle that lost the actor to one still in flight. +// observe runs inside settle's abort branch, before the abort reaches any +// caller, on every path — the settle returns the abort to its caller only after +// observe has run — and while the settle still owns the actor: the ownership it +// takes at entry is released only when the settle returns. observe runs on the +// goroutine that drove the settle, with no lock of the system's held, so it may +// read the system but must not drive it. Calls from settles driven on different +// goroutines can overlap, so observe must be safe for concurrent use. Setting it +// returns the system for chaining. +func (s *ActorSystem[S, E, C]) WithSettleAbortObserver(observe func(SettleAbort[E])) *ActorSystem[S, E, C] { + s.mu.Lock() + s.settleAbortObserver = observe + s.mu.Unlock() + return s +} + +// noteSettleAbort hands an aborted settle to the observer, if one is set. The +// caller has already rechecked the actor under the lock, so the report is only +// for a settle whose actor it still is. +func (s *ActorSystem[S, E, C]) noteSettleAbort(sa SettleAbort[E]) { + s.mu.Lock() + observe := s.settleAbortObserver + s.mu.Unlock() + if observe != nil { + observe(sa) + } +} + +// WithSettleTransform sets a function that rewrites the outcome a settle routes +// before it settles, whether a delivery, a panic the actor raised while stepping, or +// SettleError settles it, and returns the system. f gets the event that will carry +// the outcome: the invocation's onDone for an output, its onError for an error. A +// host that records outcomes uses it to give the live run and a replay the same +// value, decoded for that event. +// +// The transform runs only when the settle routes a completion: the actor succeeded +// and its invocation wired an onDone, or failed and wired an onError. A settle that +// routes nothing — a success with no onDone, a failure with no onError — runs no +// transform and can abort nothing, exactly as with none set: nothing fires, a host +// journaling outcomes records no entry for it, and LastOutput and LastError report +// the raw outcome. +// +// f returns the outcome to settle with, out and outErr. A non-nil outErr settles +// through onError, and a nil one through onDone with out, except for an +// UnboundActorError: a nil outErr leaves the UnboundActorError, so a settle handed +// one still settles through onError. LastOutput and LastError report the rewritten +// outcome. +// +// A non-nil abort stops the settle instead: no event fires, so no Assign, middleware +// or inspector runs, and the actor stays running, so it can be settled again. The +// settle reports the abort as the ServiceRunner's does — SettleError returns false +// with the abort, as given, in FireResult.Err, and the system's Tick returns that +// FireResult as one element of its slice — and, on every path that drove the +// settle, to the WithSettleAbortObserver: a delivery's abort reaches no return +// value, since Deliver returns only whether it found the actor running and the +// mailbox it drained is left empty; the observer is the one channel that abort +// reaches, and a host that records aborts wires one. An actor stopped, +// settled, or respawned under the same id while the transform ran reports no abort, +// as a stale settle does, and neither does a settle that lost the actor to another +// still in flight: one settle owns an actor at a time, so a losing concurrent +// settle runs no transform, fires nothing, reports nothing, and can't rewrite the +// winner's outcome. LastOutput and LastError still report the previous settle. +// +// An abort leaves the actor running with its machine already final: the settle it +// aborted was the actor's completion, so there is no step left to run. A delivery +// or Tick to that actor doesn't step the final machine — firing its event would +// fail "state is final" and misroute the completed outcome through onError — it +// retries settling the final outcome through the same ownership path as any +// settle: the transform runs again, an abort is reported again, and once the +// transform stops aborting a later delivery or Tick lands the good output through +// onDone. The durable runner is unaffected by the retry: it drives the same +// settle a delivery always did, so its journal records the same entries, and its +// replay never delivers to an actor. +// +// f runs before the actor is marked done, outside the system's lock, so it may run +// for a settle that then finds the actor stopped, settled, or respawned under the +// same id — by another goroutine, or by f itself — which reports no abort and leaves +// the new actor running: the settle holds to the actor it began for. A panic in f +// goes on out of the settle, leaving the actor running. Set f before the first +// settle: the field isn't guarded. +func (s *ActorSystem[S, E, C]) WithSettleTransform(f func(event E, output any, err error) (out any, outErr error, abort error)) *ActorSystem[S, E, C] { + s.transform = f + return s +} + +// sameActor reports whether the actor under id is still ra, the same *runningActor +// a settle began for, and still running, so a settle whose transform ran outside the +// lock reports its abort only for the actor it came from: one another goroutine +// stopped, settled, or respawned under the same id while the transform ran reports +// none. +func (s *ActorSystem[S, E, C]) sameActor(id string, ra *runningActor[E]) bool { + s.mu.Lock() + defer s.mu.Unlock() + cur, ok := s.actors[id] + return ok && cur == ra && !cur.done +} + +// releaseSettle returns the actor a settle took ownership of, so the next settle +// — a retry after an abort, or a delivery once the settle returns — can take it. +// The settle's defer calls it on every exit, a panic's included, so ownership +// never outlives the settle that holds it. +func (s *ActorSystem[S, E, C]) releaseSettle(ra *runningActor[E]) { + s.mu.Lock() + ra.settling = false + s.mu.Unlock() +} + +// settleCompletion settles a completion Tick holds for ra — the outcome of the +// envelope it just stepped, or a panic the actor raised doing it. A settle that +// finds the actor owned by a concurrent settle's still in flight waits it out +// rather than dropping the completion: the outcome is the actor's own, not a +// host's request, so it must settle, once the owner — which will finish, settle +// the actor or leave it running — releases it. A refusal for any other reason +// (the actor gone, settled, or respawned under the id) returns as given: the +// completion's actor is no longer the one the registry holds. +func (s *ActorSystem[S, E, C]) settleCompletion(ctx context.Context, id string, ra *runningActor[E], output any, err error) (FireResult[S], bool) { + for { + res, ok := s.settle(ctx, id, output, err) + if ok || res.Err != nil { + return res, ok + } + s.mu.Lock() + cur, alive := s.actors[id] + ours := alive && cur == ra && !cur.done + s.mu.Unlock() + if !ours { + // The completion's actor is gone, settled, or respawned under the id: + // the refusal stands. + return res, ok + } + // The actor is still the one this completion came from and still running, + // so the refusal was the ownership of a concurrent settle: wait it out and + // settle once it releases. + runtime.Gosched() + } +} + +// applySettleTransform runs the transform, for an outcome of ra that ev will +// carry, on the event the settle computed for it. An UnboundActorError stays an +// error: a transform that returns no error for it can't turn it into a success. +func (s *ActorSystem[S, E, C]) applySettleTransform(ev E, ra *runningActor[E], output any, err error) (any, error, error) { + out, terr, abort := s.transform(ev, output, err) + if abort != nil { + return nil, nil, abort + } + var unbound *UnboundActorError + if terr == nil && errors.As(err, &unbound) { + return nil, err, nil + } + return out, terr, nil +} + // noteParentFire hands a parent Fire to the observer, if one is set. func (s *ActorSystem[S, E, C]) noteParentFire(pf ParentFire[S]) { s.mu.Lock() diff --git a/state/envelope.go b/state/envelope.go index 0d6bb3cb..040ed55f 100644 --- a/state/envelope.go +++ b/state/envelope.go @@ -154,6 +154,19 @@ func captureExtra(data []byte, knownTarget any, knownKeys map[string]struct{}) ( return extra, nil } +// hasJSONKey reports whether data is a JSON object carrying key, without +// decoding it into any typed shape. A back-fill that must tell a producer that +// wrote a field from one that predates it reads this, not the decoded value: +// an absent key is the only signal an older producer left. +func hasJSONKey(data []byte, key string) bool { + var all map[string]json.RawMessage + if err := json.Unmarshal(data, &all); err != nil { + return false + } + _, ok := all[key] + return ok +} + // cloneRawExtra deep-copies a preserved-unknown map so a deep-copied IR node never // aliases the source's raw extras. The json.RawMessage byte slices are copied so a // later in-place mutation of one cannot leak into the other. diff --git a/state/invoke.go b/state/invoke.go index 6dac951b..0f2c85a8 100644 --- a/state/invoke.go +++ b/state/invoke.go @@ -75,6 +75,21 @@ type Invocation[S comparable, E comparable, C any] struct { // every other IR node carries. The kernel never inspects it; it round-trips // verbatim. Meta map[string]any `json:"meta,omitempty"` + // HasOnDone reports whether OnDone was declared for this invocation + // (WithInvokeOnDone), so a child-machine actor's host routes its success only + // when the invoke declared an event to carry it. An unset outcome leaves OnDone + // at the zero event, which must not route: the flag, not the event's value, + // says whether one was declared. It round-trips through JSON, and a load of a + // document from before the flag back-fills it for an OnDone that is present + // and non-zero — an older producer set the event only when it declared it. + HasOnDone bool `json:"hasOnDone,omitempty"` + // HasOnError reports whether OnError was declared for this invocation + // (WithInvokeOnError), the failure-side twin of HasOnDone: a child-machine + // actor's host routes its failure only when the invoke declared an onError, and + // escalates it otherwise, rather than firing the zero event an unset outcome + // leaves. It round-trips through JSON, and a load of a document from before the + // flag back-fills it for an OnError that is present and non-zero. + HasOnError bool `json:"hasOnError,omitempty"` // extra preserves unknown JSON keys a newer producer emitted so they survive a // load -> save cycle (forward-compat). Never inspected by the kernel. @@ -85,6 +100,7 @@ type Invocation[S comparable, E comparable, C any] struct { // captured into extra and preserved verbatim on round-trip. var invocationKnownKeys = map[string]struct{}{ "id": {}, "src": {}, "input": {}, "onDone": {}, "onError": {}, + "hasOnDone": {}, "hasOnError": {}, "kind": {}, "systemId": {}, "meta": {}, } @@ -96,7 +112,13 @@ func (inv Invocation[S, E, C]) MarshalJSON() ([]byte, error) { } // UnmarshalJSON decodes an Invocation and captures any unknown keys into extra so -// they survive re-serialization. +// they survive re-serialization. A document from before HasOnDone / HasOnError +// existed carries no flag keys, so the decode back-fills each flag for the +// outcome it names when the key is absent and the event is present and non-zero: +// an older producer left the event at zero exactly when it declared no outcome, +// so a reloaded definition keeps the outcomes it declared. A new producer's +// document is untouched — it writes a flag whenever it is set, and an unset +// outcome leaves the zero event, which back-fills nothing. func (inv *Invocation[S, E, C]) UnmarshalJSON(data []byte) error { type alias Invocation[S, E, C] var a alias @@ -104,6 +126,13 @@ func (inv *Invocation[S, E, C]) UnmarshalJSON(data []byte) error { if err != nil { return err } + var zero E + if !hasJSONKey(data, "hasOnDone") && a.OnDone != zero { + a.HasOnDone = true + } + if !hasJSONKey(data, "hasOnError") && a.OnError != zero { + a.HasOnError = true + } *inv = Invocation[S, E, C](a) inv.extra = extra return nil diff --git a/state/invoke_flags_test.go b/state/invoke_flags_test.go new file mode 100644 index 00000000..e051ffb0 --- /dev/null +++ b/state/invoke_flags_test.go @@ -0,0 +1,332 @@ +package state_test + +import ( + "context" + "encoding/json" + "strings" + "testing" + + "github.com/stablekernel/crucible/state" +) + +// These tests pin the load half of the declared-outcome flags: a machine or +// effect serialized by an older producer — before Invocation.HasOnDone / +// HasOnError and SpawnActor.HasDone / HasError existed — never wrote the flags, +// but it also never left an outcome event set without declaring it, so a load +// back-fills the flag for an outcome that is present and non-zero and a reloaded +// definition keeps the outcomes it declared. A new producer's serialization +// round-trips byte-identically still, and an unset outcome — the zero event — +// stays unrouted. + +// oldInvokeReg is the host palette for oldInvokeParent's reducers, so a test can +// rehydrate the machine through Provide with its Assigns bound. +func oldInvokeReg() *state.Registry[*trec] { + return state.NewRegistry[*trec](). + Reducer("recordDone", func(in state.AssignCtx[*trec]) *trec { + e := in.Entity + if o, ok := in.Event.(string); ok { + e.notes = append(e.notes, "result:"+o) + } + return e + }). + Reducer("recordFail", func(in state.AssignCtx[*trec]) *trec { + e := in.Entity + if err, ok := in.Event.(error); ok { + e.notes = append(e.notes, "error:"+err.Error()) + } + return e + }) +} + +// oldInvokeParent builds a parent whose supervising state invokes a child-machine +// actor with the given outcome options. Its transition on the zero event ("") +// catches any misroute of an unset outcome: the pre-flags kernel fired the zero +// event for an outcome nothing declared, and a load that back-fills too eagerly +// would bring that back. +func oldInvokeParent(name string, opts ...state.InvokeOption) *state.Machine[string, string, *trec] { + return state.ForgeFor[*trec](name). + Reducer("recordDone", func(in state.AssignCtx[*trec]) *trec { + e := in.Entity + if o, ok := in.Event.(string); ok { + e.notes = append(e.notes, "result:"+o) + } + return e + }). + Reducer("recordFail", func(in state.AssignCtx[*trec]) *trec { + e := in.Entity + if err, ok := in.Event.(error); ok { + e.notes = append(e.notes, "error:"+err.Error()) + } + return e + }). + State("idle"). + State("supervising").InvokeActor("child", opts...). + State("complete"). + State("failed"). + State("oops"). + Initial("idle"). + CurrentStateFn(func(*trec) string { return "idle" }). + Transition("idle").On("start").GoTo("supervising"). + Transition("supervising").On("childDone").GoTo("complete").Assign("recordDone"). + Transition("supervising").On("childErr").GoTo("failed").Assign("recordFail"). + Transition("supervising").On("").GoTo("oops"). + Quench() +} + +// stripOutcomeFlags ages a serialized machine to what an older producer wrote, +// removing the hasOnDone / hasOnError keys that producer never emitted. It fails +// the test when there is nothing to strip, so a machine that stopped serializing +// the flags can't silently pass as an aged one. +func stripOutcomeFlags(t *testing.T, raw []byte) []byte { + t.Helper() + if !strings.Contains(string(raw), `"hasOnDone":true`) && !strings.Contains(string(raw), `"hasOnError":true`) { + t.Fatal("the serialized machine carried no outcome flags to strip") + } + aged := strings.ReplaceAll(string(raw), `"hasOnDone":true,`, "") + aged = strings.ReplaceAll(aged, `,"hasOnDone":true`, "") + aged = strings.ReplaceAll(aged, `"hasOnError":true,`, "") + aged = strings.ReplaceAll(aged, `,"hasOnError":true`, "") + if strings.Contains(aged, "hasOnDone") || strings.Contains(aged, "hasOnError") { + t.Fatalf("the flag strip left keys behind: %s", aged) + } + return []byte(aged) +} + +// TestInvoke_OldJSONKeepsADeclaredOnDone proves the back-fill on load: a machine +// serialized by an older producer — one that wrote the declared onDone / onError +// events but no flags — reloads with those outcomes still declared, so the +// invoked actor's completion routes through onDone. Without the back-fill the +// flags decode as unset and the child's success settles as the fire-and-forget +// no-op an outcome nothing declared is, losing the declared routing. +func TestInvoke_OldJSONKeepsADeclaredOnDone(t *testing.T) { + ctx := context.Background() + m := oldInvokeParent("agedone", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childErr")) + raw, err := m.ToJSON(state.WithoutSrcPos()) + if err != nil { + t.Fatalf("ToJSON err = %v", err) + } + aged := stripOutcomeFlags(t, raw) + + ir, err := state.LoadFromJSON[string, string, *trec](aged) + if err != nil { + t.Fatalf("LoadFromJSON err = %v", err) + } + m2 := ir.Provide(oldInvokeReg()).Quench() + parent := m2.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", settleChildBehavior()) + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + id := state.ActorID(m2.Name(), "supervising", 0) + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + if parent.Current() != "complete" { + t.Fatalf("parent = %q, want complete: the older machine's JSON lost its declared onDone", parent.Current()) + } + if got := strings.Join(parent.Entity().notes, ","); got != "result:payload" { + t.Fatalf("notes = %q, want the declared onDone carrying the child's payload", got) + } +} + +// TestInvoke_OldJSONWithNoOnDoneStaysUnrouted pins the other side of the +// back-fill: an older machine that declared no outcome wrote the zero events (an +// unset outcome leaves OnDone / OnError at the zero event, which the tags emit), +// and the zero event back-fills nothing, so the reloaded invoke stays unrouted — +// the child's success settles as the fire-and-forget no-op, the zero event never +// fires, and nothing escalates. +func TestInvoke_OldJSONWithNoOnDoneStaysUnrouted(t *testing.T) { + ctx := context.Background() + m := oldInvokeParent("agednone") + raw, err := m.ToJSON(state.WithoutSrcPos()) + if err != nil { + t.Fatalf("ToJSON err = %v", err) + } + // A machine that declares neither outcome emits no flag keys, so its bytes + // are already the older producer's shape. + if strings.Contains(string(raw), "hasOnDone") || strings.Contains(string(raw), "hasOnError") { + t.Fatalf("a machine declaring neither outcome serialized flags: %s", raw) + } + + ir, err := state.LoadFromJSON[string, string, *trec](raw) + if err != nil { + t.Fatalf("LoadFromJSON err = %v", err) + } + m2 := ir.Provide(oldInvokeReg()).Quench() + parent := m2.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", settleChildBehavior()) + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + id := state.ActorID(m2.Name(), "supervising", 0) + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + if parent.Current() != "supervising" { + t.Fatalf("parent = %q, want supervising: an unset outcome must route nothing (and never the zero event)", parent.Current()) + } + if sys.IsRunning(id) || sys.Running() != 0 { + t.Fatalf("the unrouted completion left the actor running: IsRunning=%v Running=%d", sys.IsRunning(id), sys.Running()) + } + if esc := sys.LastEscalation(); esc != nil { + t.Fatalf("an unrouted success escalated: %+v", esc) + } +} + +// TestInvoke_FlagRoundTripStaysByteIdentical pins the forward half of the +// back-fill: a new producer's serialization round-trips byte-identically through +// ToJSON -> LoadFromJSON -> Provide -> Quench -> ToJSON, declared outcomes and +// unset ones alike, so the flags add no round-trip drift of their own. +func TestInvoke_FlagRoundTripStaysByteIdentical(t *testing.T) { + cases := []struct { + name string + opts []state.InvokeOption + }{ + {"both outcomes", []state.InvokeOption{state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childErr")}}, + {"onDone only", []state.InvokeOption{state.WithInvokeOnDone("childDone")}}, + {"onError only", []state.InvokeOption{state.WithInvokeOnError("childErr")}}, + {"neither", nil}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + m := oldInvokeParent("rtflags", tc.opts...) + raw1, err := m.ToJSON(state.WithoutSrcPos()) + if err != nil { + t.Fatalf("ToJSON err = %v", err) + } + ir, err := state.LoadFromJSON[string, string, *trec](raw1) + if err != nil { + t.Fatalf("LoadFromJSON err = %v", err) + } + m2 := ir.Provide(oldInvokeReg()).Quench() + raw2, err := m2.ToJSON(state.WithoutSrcPos()) + if err != nil { + t.Fatalf("ToJSON (round 2) err = %v", err) + } + if string(raw1) != string(raw2) { + t.Fatalf("round-trip diverged:\n%s\n--- vs ---\n%s", raw1, raw2) + } + }) + } +} + +// TestSpawnActor_OldEffectJSONKeepsADeclaredOnDone proves the same back-fill for +// the SpawnActor effect payload: an envelope an older producer journaled carries +// the declared outcome events and no flags, and decoding it back-fills HasDone / +// HasError, so a host replaying that journal routes the spawned actor's +// completion through the onDone its spawn declared. The decoded spawn is driven +// end-to-end: absorbed into a system, its child completed, the parent routed. +func TestSpawnActor_OldEffectJSONKeepsADeclaredOnDone(t *testing.T) { + ctx := context.Background() + reg := state.NewEffectRegistry() + env := state.EffectEnvelope{ + Kind: state.EffectKindSpawnActor, + Payload: json.RawMessage(`{"id":"aged","src":{"name":"child"},"onDone":"childDone","onError":"childErr","state":"supervising"}`), + } + eff, err := reg.Unmarshal(env) + if err != nil { + t.Fatalf("registry Unmarshal err = %v", err) + } + sp, ok := eff.(*state.SpawnActor) + if !ok { + t.Fatalf("decoded %T, want *SpawnActor", eff) + } + if !sp.HasDone || !sp.HasError { + t.Fatalf("decoded SpawnActor = %+v, want the declared outcomes back-filled into HasDone and HasError", *sp) + } + + m := oldInvokeParent("agedspawn", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childErr")) + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", settleChildBehavior()) + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + sys.Absorb(ctx, []state.Effect{*sp}) + if !sys.DeliverByID(ctx, "aged", "finish") { + t.Fatal("DeliverByID returned false; the aged actor was running") + } + if parent.Current() != "complete" { + t.Fatalf("parent = %q, want complete: the older effect's JSON lost its declared onDone", parent.Current()) + } + if got := strings.Join(parent.Entity().notes, ","); got != "result:payload" { + t.Fatalf("notes = %q, want the declared onDone carrying the child's payload", got) + } +} + +// TestSpawnActor_OldEffectJSONWithNoOutcomeStaysUnset pins the other side of the +// effect back-fill: an older producer writing an unset outcome left either the +// zero event (a static invoke boxes its machine's zero event into the type-erased +// field) or no key at all (a dynamic spawn's omitted option), and neither +// back-fills, so the decoded spawn routes nothing. +func TestSpawnActor_OldEffectJSONWithNoOutcomeStaysUnset(t *testing.T) { + reg := state.NewEffectRegistry() + cases := []struct { + name string + payload string + }{ + {"a static invoke's zero events", `{"id":"a1","src":{"name":"child"},"onDone":"","onError":"","state":"supervising"}`}, + {"a dynamic spawn's omitted options", `{"id":"a2","src":{"name":"child"}}`}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + eff, err := reg.Unmarshal(state.EffectEnvelope{ + Kind: state.EffectKindSpawnActor, + Payload: json.RawMessage(tc.payload), + }) + if err != nil { + t.Fatalf("registry Unmarshal err = %v", err) + } + sp, ok := eff.(*state.SpawnActor) + if !ok { + t.Fatalf("decoded %T, want *SpawnActor", eff) + } + if sp.HasDone || sp.HasError { + t.Fatalf("decoded SpawnActor = %+v, want both outcomes unset", *sp) + } + }) + } +} + +// TestSpawnActor_EffectRoundTripStaysByteIdentical pins the forward half of the +// effect back-fill: a new producer's SpawnActor envelope round-trips through the +// registry byte-identically, a declared outcome (of any event, the zero one +// included), an unset one, and a spawn that declared neither alike. +func TestSpawnActor_EffectRoundTripStaysByteIdentical(t *testing.T) { + reg := state.NewEffectRegistry() + spawns := []state.SpawnActor{ + {ID: "a1", Src: state.Ref{Name: "child"}, OnDone: "childDone", HasDone: true, OnError: "childErr", HasError: true, State: "supervising"}, + // A declared outcome of the zero event itself: the flag, not the event's + // value, says it was declared, and the flag is on the wire. + {ID: "a2", Src: state.Ref{Name: "child"}, OnDone: "", HasDone: true, State: "supervising"}, + // An unset outcome: the zero event a static invoke boxes, no flag. + {ID: "a3", Src: state.Ref{Name: "child"}, OnDone: "", OnError: "", State: "supervising"}, + // A dynamic spawn that declared neither: no events at all. + {ID: "a4", Src: state.Ref{Name: "child"}}, + } + for _, sp := range spawns { + env, err := state.MarshalEffect(sp) + if err != nil { + t.Fatalf("MarshalEffect err = %v", err) + } + b1, err := json.Marshal(env) + if err != nil { + t.Fatalf("marshal envelope err = %v", err) + } + var back state.EffectEnvelope + if uerr := json.Unmarshal(b1, &back); uerr != nil { + t.Fatalf("unmarshal envelope err = %v", uerr) + } + eff, err := reg.Unmarshal(back) + if err != nil { + t.Fatalf("registry Unmarshal err = %v", err) + } + env2, err := state.MarshalEffect(*eff.(*state.SpawnActor)) + if err != nil { + t.Fatalf("re-marshal err = %v", err) + } + b2, err := json.Marshal(env2) + if err != nil { + t.Fatalf("re-marshal envelope err = %v", err) + } + if string(b1) != string(b2) { + t.Fatalf("SpawnActor envelope round-trip diverged:\n%s\n--- vs ---\n%s", b1, b2) + } + } +} diff --git a/state/kernel.go b/state/kernel.go index bb4e43e1..6d3afcf2 100644 --- a/state/kernel.go +++ b/state/kernel.go @@ -995,11 +995,13 @@ func (b *Builder[S, E, C]) Invoke(src string, opts ...InvokeOption) *Builder[S, o(&cfg) } b.curState.state.Invoke = append(b.curState.state.Invoke, Invocation[S, E, C]{ - ID: cfg.id, - Src: Ref{Name: src, Params: cfg.params}, - Input: cfg.input, - OnDone: invokeOutcome[E](cfg.onDone, cfg.hasOnDone), - OnError: invokeOutcome[E](cfg.onError, cfg.hasOnError), + ID: cfg.id, + Src: Ref{Name: src, Params: cfg.params}, + Input: cfg.input, + OnDone: invokeOutcome[E](cfg.onDone, cfg.hasOnDone), + HasOnDone: cfg.hasOnDone, + OnError: invokeOutcome[E](cfg.onError, cfg.hasOnError), + HasOnError: cfg.hasOnError, }) return b } @@ -1039,13 +1041,15 @@ func (b *Builder[S, E, C]) InvokeActor(src string, opts ...InvokeOption) *Builde o(&cfg) } b.curState.state.Invoke = append(b.curState.state.Invoke, Invocation[S, E, C]{ - ID: cfg.id, - Src: Ref{Name: src, Params: cfg.params}, - Input: cfg.input, - OnDone: invokeOutcome[E](cfg.onDone, cfg.hasOnDone), - OnError: invokeOutcome[E](cfg.onError, cfg.hasOnError), - Kind: ActorKindMachine, - SystemID: cfg.systemID, + ID: cfg.id, + Src: Ref{Name: src, Params: cfg.params}, + Input: cfg.input, + OnDone: invokeOutcome[E](cfg.onDone, cfg.hasOnDone), + HasOnDone: cfg.hasOnDone, + OnError: invokeOutcome[E](cfg.onError, cfg.hasOnError), + HasOnError: cfg.hasOnError, + Kind: ActorKindMachine, + SystemID: cfg.systemID, }) return b } diff --git a/state/options.go b/state/options.go index 74d01403..67ff597f 100644 --- a/state/options.go +++ b/state/options.go @@ -91,7 +91,10 @@ func WithSystemID(id string) InvokeOption { // service completes successfully (or, for InvokeActor, when the child machine // reaches its final state), routing the result through an ordinary transition // from the owning state. Omitting it leaves the invocation's OnDone at the zero -// event. It mirrors WithSpawnOnDone for the declarative Invoke / InvokeActor +// event, which for a child-machine actor routes nothing — the invocation records +// that no onDone was declared, so the child's success settles as a fire-and-forget +// no-op rather than firing an event the parent must refuse. It mirrors +// WithSpawnOnDone for the declarative Invoke / InvokeActor // surface, so completion routing arrives as an additive option rather than a // positional parameter; the same shape lets fire-and-forget or onCancel routing // arrive later as further options without a signature change. @@ -105,7 +108,10 @@ func WithInvokeOnDone[E comparable](onDone E) InvokeOption { // WithInvokeOnError sets the event the host re-fires through Fire when an invoked // service fails (or, for InvokeActor, when the child machine fails), routing the // error through an ordinary transition from the owning state. Omitting it leaves -// the invocation's OnError at the zero event. It mirrors WithSpawnOnError. +// the invocation's OnError at the zero event, which for a child-machine actor +// routes nothing: the invocation records that no onError was declared, so the +// child's failure escalates to the parent rather than firing an event the parent +// must refuse. It mirrors WithSpawnOnError. func WithInvokeOnError[E comparable](onError E) InvokeOption { return func(c *invokeConfig) { c.onError = onError @@ -138,14 +144,17 @@ func WithSpawnSystemID(id string) SpawnOption { // WithSpawnOnDone sets the event the host re-fires through the parent's Fire when // a dynamically spawned actor reaches its final state, routing the child's output // through an ordinary transition from the spawning state. Omit it for a -// fire-and-forget spawn whose completion the parent does not observe. +// fire-and-forget spawn whose completion the parent does not observe: the spawn +// records that no onDone was declared, so the child's success settles without +// firing an event the parent must refuse. func WithSpawnOnDone[E comparable](onDone E) SpawnOption { return func(c *spawnConfig) { c.onDone = onDone } } // WithSpawnOnError sets the event the host re-fires through the parent's Fire when // a dynamically spawned actor fails, routing the error through an ordinary -// transition from the spawning state. +// transition from the spawning state. Omit it and the child's failure escalates to +// the parent, as an invocation that declared no onError does. func WithSpawnOnError[E comparable](onError E) SpawnOption { return func(c *spawnConfig) { c.onError = onError } } diff --git a/state/roundtrip_extra_test.go b/state/roundtrip_extra_test.go index e352d6ef..f3ab5a40 100644 --- a/state/roundtrip_extra_test.go +++ b/state/roundtrip_extra_test.go @@ -41,11 +41,16 @@ func TestRegion_UnknownFields_ByteIdenticalRoundTrip(t *testing.T) { // TestInvocation_UnknownFields_ByteIdenticalRoundTrip asserts that an Invocation // preserves unknown/future JSON keys and its Meta map verbatim across a load -> -// save cycle, honoring the lossless round-trip its doc claims. +// save cycle, honoring the lossless round-trip its doc claims. A document from a +// producer with the declared-outcome flags is byte-identical still; one from +// before the flags — the outcomes declared, the keys absent — gains the +// back-filled flags on the save (that is the back-fill doing its work), with the +// unknown fields preserved verbatim through it. func TestInvocation_UnknownFields_ByteIdenticalRoundTrip(t *testing.T) { t.Parallel() - // Keys in sorted order: futureField, id, input, meta, onDone, onError, src. - in := []byte(`{"futureField":{"k":42},"id":"inv1",` + + // Keys in sorted order: futureField, hasOnDone, hasOnError, id, input, meta, + // onDone, onError, src. + in := []byte(`{"futureField":{"k":42},"hasOnDone":true,"hasOnError":true,"id":"inv1",` + `"input":{"x":1},"meta":{"doc":"note"},"onDone":7,"onError":8,` + `"src":{"name":"svc"}}`) @@ -59,6 +64,9 @@ func TestInvocation_UnknownFields_ByteIdenticalRoundTrip(t *testing.T) { if got, ok := inv.Meta["doc"]; !ok || got != "note" { t.Fatalf("Meta round-trip lost value: got %v ok=%v", got, ok) } + if !inv.HasOnDone || !inv.HasOnError { + t.Fatalf("declared-outcome flags lost: hasOnDone=%v hasOnError=%v", inv.HasOnDone, inv.HasOnError) + } out, err := json.Marshal(inv) if err != nil { @@ -67,6 +75,27 @@ func TestInvocation_UnknownFields_ByteIdenticalRoundTrip(t *testing.T) { if string(out) != string(in) { t.Fatalf("Invocation round-trip not byte-identical:\n in=%s\nout=%s", in, out) } + + // The same document from a producer before the flags: no flag keys, the + // outcomes declared. The load back-fills the flags — the save says so — and + // the unknown field survives the upgrade verbatim. + aged := []byte(`{"futureField":{"k":42},"id":"inv1",` + + `"input":{"x":1},"meta":{"doc":"note"},"onDone":7,"onError":8,` + + `"src":{"name":"svc"}}`) + var old state.Invocation[int, int, *struct{}] + if uerr := json.Unmarshal(aged, &old); uerr != nil { + t.Fatalf("unmarshal aged Invocation: %v", uerr) + } + if !old.HasOnDone || !old.HasOnError { + t.Fatalf("aged Invocation flags = %v/%v, want both back-filled for the declared outcomes", old.HasOnDone, old.HasOnError) + } + upgraded, err := json.Marshal(old) + if err != nil { + t.Fatalf("marshal aged Invocation: %v", err) + } + if string(upgraded) != string(out) { + t.Fatalf("aged Invocation upgraded to %s\nwant the flagged document %s", upgraded, out) + } } // TestIOSpec_UnknownFields_ByteIdenticalRoundTrip asserts that an IOSpec preserves diff --git a/state/settle_abort_test.go b/state/settle_abort_test.go new file mode 100644 index 00000000..412b0904 --- /dev/null +++ b/state/settle_abort_test.go @@ -0,0 +1,628 @@ +package state_test + +import ( + "context" + "errors" + "strings" + "sync" + "sync/atomic" + "testing" + + "github.com/stablekernel/crucible/state" +) + +// These tests pin the abort-reporting half of the settle transform's contract, +// which the review of #268 surfaced: an abort is reported once for every settle +// that returns one, on every path that drives one — a host's SettleError, a +// Deliver (and the sendTo / sendParent / forwardTo sugar, which routes through +// the same delivery), and a Tick the host drives itself — through the +// WithSettleAbortObserver, whose report is the only channel a delivery's abort +// reaches. They pin the concurrency rule too: one settle owns an actor at a +// time, so a losing concurrent settle runs no transform, fires nothing and +// reports nothing, and the winner's settle is never rewritten under it. + +// abortReports collects the SettleAborts an observer is handed, safe for the +// concurrent settles a test may drive. +type abortReports struct { + mu sync.Mutex + reports []state.SettleAbort[string] +} + +func (a *abortReports) add(sa state.SettleAbort[string]) { + a.mu.Lock() + a.reports = append(a.reports, sa) + a.mu.Unlock() +} + +func (a *abortReports) take() []state.SettleAbort[string] { + a.mu.Lock() + defer a.mu.Unlock() + out := a.reports + a.reports = nil + return out +} + +// TestWithSettleAbortObserver_ReportsEachDrivingPath proves every path that +// drives a settle reports its abort to the observer exactly once, with the actor, +// the event that would have carried the outcome, and the abort itself: a host's +// SettleError, a Deliver, the sendTo sugar (which routes through the same +// dispatch the sendParent / forwardTo sugar does), and a Tick the host drives +// with a queued envelope of its own. +func TestWithSettleAbortObserver_ReportsEachDrivingPath(t *testing.T) { + ctx := context.Background() + abort := errors.New("no recording") + + t.Run("SettleError", func(t *testing.T) { + reports := &abortReports{} + parent, sys, id := settleHarness(t, func(string, any, error) (any, error, error) { + return nil, nil, abort + }) + sys.WithSettleAbortObserver(reports.add) + res, ok := sys.SettleError(ctx, id, errors.New("boom")) + if ok || !errors.Is(res.Err, abort) { + t.Fatalf("SettleError = %+v, %v; want false with the abort in FireResult.Err", res, ok) + } + got := reports.take() + if len(got) != 1 || got[0].ActorID != id || got[0].Event != "childErr" || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want one report for %q on childErr with the abort", got, id) + } + if parent.Current() != "supervising" || sys.IsRunning(id) != true { + t.Fatalf("the aborted settle fired something or finished the actor: %q running=%v", parent.Current(), sys.IsRunning(id)) + } + }) + + t.Run("Deliver", func(t *testing.T) { + reports := &abortReports{} + parent, sys, id := settleHarness(t, func(string, any, error) (any, error, error) { + return nil, nil, abort + }) + sys.WithSettleAbortObserver(reports.add) + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + got := reports.take() + if len(got) != 1 || got[0].ActorID != id || got[0].Event != "childDone" || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want one report for %q on childDone with the abort", got, id) + } + if parent.Current() != "supervising" { + t.Fatalf("the aborted delivery fired something: parent = %q", parent.Current()) + } + }) + + t.Run("a sendTo another actor drives", func(t *testing.T) { + reports := &abortReports{} + // A parent whose supervising invokes two actors: the child, which routes its + // completion, and a poker whose start sends the child its finishing event, as + // the sendTo / sendParent / forwardTo sugar does through the same dispatch. + m := state.ForgeFor[*trec]("abortpoker"). + Reducer("recordDone", func(in state.AssignCtx[*trec]) *trec { + e := in.Entity + if o, ok := in.Event.(string); ok { + e.notes = append(e.notes, "result:"+o) + } + return e + }). + State("idle"). + State("supervising"). + InvokeActor("child", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childErr")). + InvokeActor("poker"). + State("complete"). + Initial("idle"). + Transition("idle").On("start").GoTo("supervising"). + Transition("supervising").On("childDone").GoTo("complete").Assign("recordDone"). + Quench() + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + child := settleChildBehavior() + sys := state.NewActorSystem(parent). + Register("child", child). + Register("poker", func(map[string]any) (state.ActorInstance, error) { + return &abortPoker{target: state.ActorID(m.Name(), "supervising", 0)}, nil + }) + sys.WithSettleTransform(func(string, any, error) (any, error, error) { return nil, nil, abort }) + sys.WithSettleAbortObserver(reports.add) + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + got := reports.take() + if len(got) != 1 || got[0].ActorID != state.ActorID(m.Name(), "supervising", 0) || got[0].Event != "childDone" || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want one report for the child on childDone with the abort", got) + } + if parent.Current() != "supervising" { + t.Fatalf("the aborted settle fired something: parent = %q", parent.Current()) + } + }) + + t.Run("a Tick the host drives", func(t *testing.T) { + reports := &abortReports{} + parent, sys, id := settleHarness(t, nil) + started, release := make(chan struct{}), make(chan struct{}) + var firstErr error + sys.WithSettleTransform(func(event string, output any, err error) (any, error, error) { + if event == "childErr" { + // The first settle (a SettleError below) blocks here, owning the + // actor, so the delivery's envelope waits in the mailbox for the + // host's own Tick. + close(started) + <-release + return nil, nil, firstErr + } + return nil, nil, abort + }) + sys.WithSettleAbortObserver(reports.add) + firstErr = abort + settled := make(chan struct{}) + go func() { + defer close(settled) + sys.SettleError(ctx, id, errors.New("boom")) + }() + <-started + // The delivery queues its envelope; the settle in flight owns the actor, so + // the delivery's drain leaves it for the host. + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + close(release) + <-settled + // The host's own Tick drives the queued envelope's settle, which aborts. + results := sys.Tick(ctx, id) + if len(results) != 1 || !errors.Is(results[0].Err, abort) { + t.Fatalf("Tick = %+v, want the one aborted settle's FireResult", results) + } + got := reports.take() + if len(got) != 2 { + t.Fatalf("the observer got %d reports, want the SettleError's and the Tick's", len(got)) + } + if got[0].Event != "childErr" || got[1].Event != "childDone" || got[1].Abort != abort || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want the SettleError's childErr report then the Tick's childDone one", got) + } + if parent.Current() != "supervising" { + t.Fatalf("an aborted settle fired something: parent = %q", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the aborted settles ran %d Assigns, want none", n) + } + }) +} + +// abortPoker is an actor that sends its target "finish" from its initial entry, +// as the sendTo action sugar does, then keeps running. +type abortPoker struct { + target string + sent bool +} + +func (*abortPoker) DeliverFire(context.Context, any) (bool, any) { return false, nil } +func (p *abortPoker) ChildEffects() []state.Effect { + if p.sent { + return nil + } + p.sent = true + return []state.Effect{state.SendTo{TargetID: p.target, Event: "finish"}} +} +func (*abortPoker) Output() any { return nil } + +// TestSettle_TwoConcurrentSettlesOnOneActor_OneSettles proves one settle owns an +// actor at a time: of two concurrent settles on one id — a delivery that settles +// the child's success and a SettleError whose transform aborts — exactly one +// settles it, the parent fires its onDone once and reaches complete, and the +// other runs no second transform against the winner's outcome: it either found +// the actor settled and returned nothing, or it owned the actor first, reported +// its abort while the actor was still running, and left it settleable for the +// delivery. Run with -race: the system's own state stays safe, and the loser +// never rewrites or aborts the winner's settle. +func TestSettle_TwoConcurrentSettlesOnOneActor_OneSettles(t *testing.T) { + ctx := context.Background() + for round := 0; round < 25; round++ { + abort := errors.New("no recording") + reports := &abortReports{} + parent, sys, id := settleHarness(t, func(event string, output any, err error) (any, error, error) { + if err != nil { + return nil, nil, abort + } + return output, err, nil + }) + sys.WithSettleAbortObserver(reports.add) + + var wg sync.WaitGroup + wg.Add(2) + go func() { + defer wg.Done() + sys.DeliverByID(ctx, id, "finish") + }() + go func() { + defer wg.Done() + sys.SettleError(ctx, id, errors.New("boom")) + }() + wg.Wait() + // A delivery whose drain found the actor owned by the in-flight SettleError + // left its envelope queued; the host's Tick settles it. + sys.Tick(ctx, id) + + if parent.Current() != "complete" { + t.Fatalf("round %d: parent = %q, want complete: the delivery's settle must always complete the actor", round, parent.Current()) + } + if got := strings.Join(parent.Entity().notes, ","); got != "result:payload" { + t.Fatalf("round %d: notes = %q, want the one settled onDone's result:payload", round, got) + } + if sys.IsRunning(id) || sys.Running() != 0 { + t.Fatalf("round %d: the actor didn't settle: IsRunning(%v) Running %d", round, sys.IsRunning(id), sys.Running()) + } + if got := reports.take(); len(got) > 1 { + t.Fatalf("round %d: the observer got %+v, want at most the one abort the owning settle reported", round, got) + } + } +} + +// TestSettle_ATransformSettlingItsOwnActorIsRefused proves the settle that runs a +// transform owns the actor for its duration: a transform that settles its own +// actor — reentrant on the same goroutine — gets nothing back and runs no second +// transform, and the abort the owning settle reports is the only one. Without the +// ownership the nested settle would recurse through the transform a second time. +func TestSettle_ATransformSettlingItsOwnActorIsRefused(t *testing.T) { + ctx := context.Background() + abort := errors.New("no recording") + reports := &abortReports{} + var sys *state.ActorSystem[string, string, *trec] + var id string + calls := 0 + parent, sys, id := settleHarness(t, func(event string, output any, err error) (any, error, error) { + calls++ + if calls == 1 { + // Reentrant: settle the same actor while its settle runs. + res, ok := sys.SettleError(ctx, id, errors.New("inner")) + if ok || res.Err != nil { + t.Errorf("the nested SettleError = %+v, %v; want nothing: the outer settle owns the actor", res, ok) + } + } + return nil, nil, abort + }) + sys.WithSettleAbortObserver(reports.add) + if res, ok := sys.SettleError(ctx, id, errors.New("boom")); ok || !errors.Is(res.Err, abort) { + t.Fatalf("SettleError = %+v, %v; want false with the abort in FireResult.Err", res, ok) + } + if calls != 1 { + t.Fatalf("the transform ran %d times, want once: the nested settle was refused, not recursed", calls) + } + if got := reports.take(); len(got) != 1 || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want the one report the owning settle made", got) + } + if parent.Current() != "supervising" { + t.Fatalf("the aborted settle fired something: parent = %q", parent.Current()) + } +} + +// TestWithSettleTransform_ARewrittenFailureNothingRoutesEscalates proves a +// transform can't make a child's failure vanish: a failure whose settle the +// transform rewrote into a success nothing routes — the invocation wired an +// onError but no onDone — escalates the ORIGINAL error to the parent, as the +// failure does with no transform at all, rather than settling a success nothing +// consumes and nothing observes. LastOutput still reports the rewritten outcome. +func TestWithSettleTransform_ARewrittenFailureNothingRoutesEscalates(t *testing.T) { + ctx := context.Background() + m := state.ForgeFor[*trec]("vanish"). + State("idle"). + State("supervising"). + Initial("idle"). + Transition("idle").On("start").GoTo("supervising").Spawn("child", "vanish-kid", state.WithSpawnOnError("childErr")). + Quench() + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", settleChildBehavior()) + sys.WithSettleTransform(func(event string, output any, err error) (any, error, error) { + if err != nil { + // Recover it into a success nothing routes. + return "recovered", nil, nil + } + return output, err, nil + }) + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising", parent.Current()) + } + + routed, ok := sys.SettleError(ctx, "vanish-kid", errors.New("boom")) + if ok || routed.Err != nil { + t.Fatalf("SettleError = %+v, %v; want nothing routed: the rewritten outcome has no onDone", routed, ok) + } + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising: nothing fired", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the settle ran %d Assigns, want none", n) + } + // The ORIGINAL failure escalated — a transform may rewrite the outcome, not + // erase the failure — and the rewritten outcome is what LastOutput reports. + esc := sys.LastEscalation() + if esc == nil || esc.ActorID != "vanish-kid" || esc.Err == nil || esc.Err.Error() != "boom" { + t.Fatalf("LastEscalation = %+v, want the ORIGINAL boom escalated for the vanished failure", esc) + } + if out, got := sys.LastOutput(); !got || out != "recovered" { + t.Fatalf("LastOutput = %v, %v; want the rewritten outcome \"recovered\"", out, got) + } + if sys.IsRunning("vanish-kid") { + t.Fatal("the actor didn't settle") + } +} + +// TestSettleError_AnAlreadySettledActorIsRefused pins the refusal the settle +// recheck gives: SettleError on an actor a previous settle already settled — not +// stopped, still registered — returns the zero result and false, fires nothing +// and escalates nothing, whether or not a transform is set. On main it re-settled +// the actor through onError, moving the parent again. +func TestSettleError_AnAlreadySettledActorIsRefused(t *testing.T) { + ctx := context.Background() + for _, tc := range []struct { + name string + transform func(string, any, error) (any, error, error) + }{ + {"no transform", nil}, + {"a transform", func(event string, output any, err error) (any, error, error) { return output, err, nil }}, + } { + t.Run(tc.name, func(t *testing.T) { + parent, sys, id := settleHarness(t, tc.transform) + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + if parent.Current() != "complete" { + t.Fatalf("parent state = %q, want complete after the settled success", parent.Current()) + } + notes := len(parent.Entity().notes) + + res, ok := sys.SettleError(ctx, id, errors.New("boom")) + if ok || res.Err != nil { + t.Fatalf("SettleError on the settled actor = %+v, %v; want the zero result and false: the actor is settled", res, ok) + } + if parent.Current() != "complete" || len(parent.Entity().notes) != notes { + t.Fatalf("the second settle moved the parent: %q with %d notes, want complete with %d", parent.Current(), len(parent.Entity().notes), notes) + } + if esc := sys.LastEscalation(); esc != nil { + t.Fatalf("the refused settle escalated: %+v", esc) + } + }) + } +} + +// TestWithSettleTransform_AnUnboundActorErrorStaysAnError pins the keep in the +// transform's application: a settle handed an *UnboundActorError stays an error +// even when the transform returns no error for it, so it settles through onError +// — a transform can't turn an unbound spawn's failure into a success. +func TestWithSettleTransform_AnUnboundActorErrorStaysAnError(t *testing.T) { + ctx := context.Background() + parent, sys, id := settleHarness(t, func(string, any, error) (any, error, error) { + // Refuse to keep the error: the keep must override this. + return "recovered", nil, nil + }) + unbound := &state.UnboundActorError{Name: "child"} + res, ok := sys.SettleError(ctx, id, unbound) + if !ok || res.Err != nil { + t.Fatalf("SettleError = %+v, %v; want the unbound failure routed through onError", res, ok) + } + if parent.Current() != "failed" { + t.Fatalf("parent state = %q, want failed: the unbound error stayed an error", parent.Current()) + } + if err := sys.LastError(); err == nil || !errors.Is(err, unbound) { + t.Fatalf("LastError = %v, want the unbound error the settle kept", err) + } + if got := strings.Join(parent.Entity().notes, ","); !strings.Contains(got, "child") { + t.Fatalf("notes = %q, want the unbound error's message recorded", got) + } +} + +// panickingStepChild is an actor that panics while stepping the event it's +// delivered: its Fire is guarded by the system, and the panic settles the actor +// as a failure, whose settle the transform below aborts. +type panickingStepChild struct{} + +func (*panickingStepChild) DeliverFire(_ context.Context, ev any) (bool, any) { + if ev == "finish" { + panic("ka-boom") + } + return false, nil +} +func (*panickingStepChild) ChildEffects() []state.Effect { return nil } +func (*panickingStepChild) Output() any { return nil } + +// TestTick_APanickingActorsAbortedSettleReturnsTheAbort pins the panic branch of +// Tick: a child that panics while stepping settles as a failure, and a transform +// that aborts that settle makes Tick return the abort as its one FireResult — the +// outcome a host driving Tick itself reads — with the actor left running and the +// abort reported to the observer. +func TestTick_APanickingActorsAbortedSettleReturnsTheAbort(t *testing.T) { + ctx := context.Background() + abort := errors.New("no recording") + reports := &abortReports{} + m := settleParentMachine() + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", func(map[string]any) (state.ActorInstance, error) { + return &panickingStepChild{}, nil + }) + id := state.ActorID(m.Name(), "supervising", 0) + started, release := make(chan struct{}), make(chan struct{}) + var once sync.Once + sys.WithSettleTransform(func(event string, output any, err error) (any, error, error) { + if event == "childErr" { + // The first settle (a SettleError below) blocks here, owning the actor, + // so the delivery's envelope waits in the mailbox for the host's Tick; + // the panicking step's settle aborts at once. + once.Do(func() { + close(started) + <-release + }) + } + return nil, nil, abort + }) + sys.WithSettleAbortObserver(reports.add) + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + settled := make(chan struct{}) + go func() { + defer close(settled) + sys.SettleError(ctx, id, errors.New("boom")) + }() + <-started + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + close(release) + <-settled + results := sys.Tick(ctx, id) + if len(results) != 1 || !errors.Is(results[0].Err, abort) { + t.Fatalf("Tick = %+v, want the one aborted settle's FireResult for the panicking step", results) + } + got := reports.take() + if len(got) != 2 || got[1].Event != "childErr" || got[1].Abort != abort { + t.Fatalf("the observer got %+v, want the SettleError's report then the panicking step's childErr one", got) + } + if parent.Current() != "supervising" || !sys.IsRunning(id) { + t.Fatalf("the aborted settle fired something or finished the actor: %q running=%v", parent.Current(), sys.IsRunning(id)) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the aborted settles ran %d Assigns, want none", n) + } +} + +// retryHarness builds the settle harness whose transform aborts successes — and +// only successes — until allow is set, recording every abort it reports, so a +// test can drive an aborted settle and then let the retry through. +func retryHarness(t *testing.T, abort error, allow *atomic.Bool, reports *abortReports) ( + *state.Instance[string, string, *trec], *state.ActorSystem[string, string, *trec], string, +) { + t.Helper() + parent, sys, id := settleHarness(t, func(event string, output any, err error) (any, error, error) { + if err != nil { + // Failures pass through untouched: only successes abort. + return nil, err, nil + } + if !allow.Load() { + return nil, nil, abort + } + return output, nil, nil + }) + sys.WithSettleAbortObserver(reports.add) + return parent, sys, id +} + +// TestDeliver_AnAlreadyFinalActorRetriesTheSettle proves what a delivery to a +// running actor whose machine is already final — an actor a settle's transform +// aborted left it that way — does: it doesn't step the machine (the delivered +// event has no transition left to fire; stepping it would fail "state is final" +// and misroute the actor's completed outcome through onError). It retries +// settling the final outcome, through the same ownership path as any settle: the +// transform runs again, an abort is reported again to the WithSettleAbortObserver +// with the completion's event, and once the transform stops aborting a later +// delivery lands the good output through onDone. +func TestDeliver_AnAlreadyFinalActorRetriesTheSettle(t *testing.T) { + ctx := context.Background() + abort := errors.New("no recording") + var allow atomic.Bool + reports := &abortReports{} + parent, sys, id := retryHarness(t, abort, &allow, reports) + + // The first delivery completes the child; its settle aborts, leaving the + // actor running with a final machine and an empty mailbox. + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + if parent.Current() != "supervising" { + t.Fatalf("the aborted settle fired something: parent = %q", parent.Current()) + } + if got := reports.take(); len(got) != 1 || got[0].ActorID != id || got[0].Event != "childDone" || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want the one abort on childDone", got) + } + if !sys.IsRunning(id) { + t.Fatal("the aborted settle finished the actor") + } + + // The later delivery retries the settle, which aborts again and is reported + // again. Nothing is misrouted: no onError fires (the parent stays put, not + // "failed"), and the report carries the completion's childDone, not a + // childErr for a "state is final" failure. + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was still running") + } + if parent.Current() != "supervising" { + t.Fatalf("the retried settle misrouted the completion through onError: parent = %q", parent.Current()) + } + if got := reports.take(); len(got) != 1 || got[0].Event != "childDone" || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want the second abort reported again on childDone, not a childErr misroute", got) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the retried settles ran %d Assigns, want none", n) + } + if !sys.IsRunning(id) { + t.Fatal("the second aborted settle finished the actor") + } + + // Once the transform stops aborting, a later delivery lands the good output + // through onDone. + allow.Store(true) + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was still running") + } + if parent.Current() != "complete" { + t.Fatalf("parent = %q, want complete: the retried settle must land the good output through onDone", parent.Current()) + } + if got := strings.Join(parent.Entity().notes, ","); got != "result:payload" { + t.Fatalf("notes = %q, want the child's payload through onDone", got) + } + if sys.IsRunning(id) || sys.Running() != 0 { + t.Fatalf("the retried settle left the actor running: IsRunning=%v Running=%d", sys.IsRunning(id), sys.Running()) + } + if got := reports.take(); len(got) != 0 { + t.Fatalf("the observer got %+v, want nothing once the transform stopped aborting", got) + } +} + +// TestTick_AnAlreadyFinalActorRetriesTheSettle is the Tick half of the retry: a +// host Tick of an actor a settle's transform aborted left running — with an empty +// mailbox, since the delivery drained it — retries settling the final outcome +// rather than returning a no-op, so once the transform stops aborting the good +// output lands through onDone with no delivery at all. +func TestTick_AnAlreadyFinalActorRetriesTheSettle(t *testing.T) { + ctx := context.Background() + abort := errors.New("no recording") + var allow atomic.Bool + reports := &abortReports{} + parent, sys, id := retryHarness(t, abort, &allow, reports) + + // The delivery completes the child and its settle aborts; the mailbox is + // drained, so a later Tick has no envelope to step. + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + if got := reports.take(); len(got) != 1 || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want the one abort", got) + } + + // A Tick while the transform still aborts retries the settle and reports the + // abort again, as its own FireResult. + results := sys.Tick(ctx, id) + if len(results) != 1 || !errors.Is(results[0].Err, abort) { + t.Fatalf("Tick = %+v, want the retried settle's abort as its one FireResult", results) + } + if parent.Current() != "supervising" { + t.Fatalf("the retried settle fired something: parent = %q", parent.Current()) + } + if got := reports.take(); len(got) != 1 || got[0].Event != "childDone" || got[0].Abort != abort { + t.Fatalf("the observer got %+v, want the Tick's retry abort on childDone", got) + } + if !sys.IsRunning(id) { + t.Fatal("the aborted retry finished the actor") + } + + // Once the transform stops aborting, the host's own Tick lands the good + // output through onDone. + allow.Store(true) + results = sys.Tick(ctx, id) + if len(results) != 1 || results[0].NewState != "complete" || results[0].Err != nil { + t.Fatalf("Tick = %+v, want the settled completion routed through onDone", results) + } + if parent.Current() != "complete" { + t.Fatalf("parent = %q, want complete", parent.Current()) + } + if got := strings.Join(parent.Entity().notes, ","); got != "result:payload" { + t.Fatalf("notes = %q, want the child's payload through onDone", got) + } + if sys.IsRunning(id) { + t.Fatal("the retried settle left the actor running") + } +} diff --git a/state/settle_transform_test.go b/state/settle_transform_test.go new file mode 100644 index 00000000..b2bdd45d --- /dev/null +++ b/state/settle_transform_test.go @@ -0,0 +1,603 @@ +package state_test + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "strings" + "testing" + + "github.com/stablekernel/crucible/state" +) + +// upperSettleTransform uppercases a string output and wraps an error's message, and +// notes the event it was given for each outcome in *events. +func upperSettleTransform(events *[]string) func(string, any, error) (any, error, error) { + return func(event string, output any, err error) (any, error, error) { + *events = append(*events, event) + if err != nil { + return nil, errors.New("wrapped: " + err.Error()), nil + } + return strings.ToUpper(output.(string)), nil, nil + } +} + +// settleParentMachine builds a parent whose "supervising" state invokes a child +// MACHINE actor, routing its completion through Assigns that read the outcome from +// AssignCtx.Event: the done-event payload the settle carries. "supervising" returns +// to "idle" on "restart", so a transform (or a host) can leave the state and +// re-enter it, stopping the child and spawning a fresh one under the same id, as a +// supervisor restart does. +func settleParentMachine() *state.Machine[string, string, *trec] { + return state.ForgeFor[*trec]("settleparent"). + Reducer("recordDone", func(in state.AssignCtx[*trec]) *trec { + e := in.Entity + if o, ok := in.Event.(string); ok { + e.notes = append(e.notes, "result:"+o) + } + return e + }). + Reducer("recordFail", func(in state.AssignCtx[*trec]) *trec { + e := in.Entity + if err, ok := in.Event.(error); ok { + e.notes = append(e.notes, "error:"+err.Error()) + } + return e + }). + State("idle"). + State("supervising").InvokeActor("child", state.WithInvokeOnDone("childDone"), state.WithInvokeOnError("childErr")). + State("complete"). + State("failed"). + Initial("idle"). + CurrentStateFn(func(*trec) string { return "idle" }). + Transition("idle").On("start").GoTo("supervising"). + Transition("supervising").On("restart").GoTo("idle"). + Transition("supervising").On("childDone").GoTo("complete").Assign("recordDone"). + Transition("supervising").On("childErr").GoTo("failed").Assign("recordFail"). + Quench() +} + +// settleChildBehavior returns an ActorBehavior whose child completes with the fixed +// output "payload" once delivered "finish". +func settleChildBehavior() state.ActorBehavior { + child := state.ForgeFor[*trec]("settlechild"). + State("working"). + State("done").Final(). + Initial("working"). + Transition("working").On("finish").GoTo("done"). + Quench() + return func(map[string]any) (state.ActorInstance, error) { + inst := child.Cast(&trec{}, state.WithInitialState[string]("working")) + return state.NewActor(inst, func(*state.Instance[string, string, *trec]) any { + return "payload" + }), nil + } +} + +// settleHarness casts a settleParentMachine, wires its actor system with the given +// transform, and enters supervising, so the spawned child is ready to settle. +func settleHarness(t *testing.T, transform func(string, any, error) (any, error, error)) ( + *state.Instance[string, string, *trec], *state.ActorSystem[string, string, *trec], string, +) { + t.Helper() + ctx := context.Background() + m := settleParentMachine() + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", settleChildBehavior()) + if transform != nil { + sys.WithSettleTransform(transform) + } + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising", parent.Current()) + } + return parent, sys, state.ActorID(m.Name(), "supervising", 0) +} + +// TestWithSettleTransform_RewritesTheOutcome proves the transform rewrites the +// output and the error a settle routes, before the parent's Assign sees them, so +// AssignCtx.Event carries the rewritten outcome and LastOutput and LastError report +// it, and that the transform gets onDone's event for an output and onError's for an +// error. +func TestWithSettleTransform_RewritesTheOutcome(t *testing.T) { + ctx := context.Background() + cases := []struct { + name string + settle func(*state.ActorSystem[string, string, *trec], string) (state.FireResult[string], bool) + wantState string + wantNotes string + wantEvent string + wantLast string + }{ + {"a delivery settles the output", func(sys *state.ActorSystem[string, string, *trec], id string) (state.FireResult[string], bool) { + ref, ok := sys.Ref(id) + if !ok { + t.Fatalf("no actor ref for %q", id) + } + sys.Deliver(ctx, ref, "finish") + return state.FireResult[string]{}, true + }, "complete", "result:PAYLOAD", "childDone", "PAYLOAD"}, + {"SettleError settles the error", func(sys *state.ActorSystem[string, string, *trec], id string) (state.FireResult[string], bool) { + return sys.SettleError(ctx, id, errors.New("boom")) + }, "failed", "error:wrapped: boom", "childErr", "wrapped: boom"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + var events []string + parent, sys, id := settleHarness(t, upperSettleTransform(&events)) + if _, ok := tc.settle(sys, id); !ok { + t.Fatalf("the settle of %q reported false", id) + } + if parent.Current() != tc.wantState { + t.Fatalf("parent state = %q, want %q", parent.Current(), tc.wantState) + } + if got := strings.Join(parent.Entity().notes, ","); got != tc.wantNotes { + t.Fatalf("notes = %q, want %q", got, tc.wantNotes) + } + if len(events) != 1 || events[0] != tc.wantEvent { + t.Fatalf("the transform got events %q, want [%q]", events, tc.wantEvent) + } + if tc.wantEvent == "childDone" { + if out, got := sys.LastOutput(); !got || out != tc.wantLast { + t.Fatalf("LastOutput = %q, %v; want the rewritten %q", out, got, tc.wantLast) + } + } + if tc.wantEvent == "childErr" { + if err := sys.LastError(); err == nil || err.Error() != tc.wantLast { + t.Fatalf("LastError = %v, want the rewritten %q", err, tc.wantLast) + } + } + }) + } +} + +// TestWithSettleTransform_AbortFiresNothingAndLeavesTheActorRunning proves an abort +// stops the settle: no event fires, so the parent stays where it was and no Assign +// runs, the actor stays running, and the settle reports the abort as the +// ServiceRunner's does — SettleError returns false with it in FireResult.Err — so a +// later settle of the still-running actor completes it. +func TestWithSettleTransform_AbortFiresNothingAndLeavesTheActorRunning(t *testing.T) { + ctx := context.Background() + abort := errors.New("no recording") + var events []string + parent, sys, id := settleHarness(t, func(event string, output any, err error) (any, error, error) { + events = append(events, event) + if len(events) == 1 { + return nil, nil, abort + } + return upperSettleTransform(&events)(event, output, err) + }) + + // The first settle aborts: SettleError reports the abort and fires nothing. + res, ok := sys.SettleError(ctx, id, errors.New("boom")) + if ok || !errors.Is(res.Err, abort) { + t.Fatalf("SettleError = %+v, %v; want false with the abort in FireResult.Err", res, ok) + } + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q after the abort, want supervising: no event fired", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the abort ran %d Assigns, want none", n) + } + if !sys.IsRunning(id) || sys.Running() != 1 { + t.Fatalf("the aborted actor isn't running: IsRunning(%v), Running %d", sys.IsRunning(id), sys.Running()) + } + if out, none := sys.LastOutput(); none { + t.Fatalf("LastOutput = %q after the abort, want none", out) + } + if len(events) != 1 || events[0] != "childErr" { + t.Fatalf("the transform got events %q, want the one settle's [childErr]", events) + } + + // The actor the abort left running settles again, and the second settle routes. + if res, ok = sys.SettleError(ctx, id, errors.New("boom")); !ok || res.Err != nil { + t.Fatalf("the second SettleError = %+v, %v; want the settled routing", res, ok) + } + if parent.Current() != "failed" { + t.Fatalf("parent state = %q after the second settle, want failed", parent.Current()) + } + if got := strings.Join(parent.Entity().notes, ","); got != "error:wrapped: boom" { + t.Fatalf("notes = %q, want the second settle's Assign", got) + } +} + +// TestWithSettleTransform_ARespawnedActorIsNotSettledByTheOldSettle proves a settle +// whose transform ran for one actor can't settle, or report an abort for, the actor +// respawned under the same id while the transform ran. The transform stops the +// settling actor and spawns a fresh one under its id, as a supervisor restart does, +// with no real concurrency: the old settle must fire nothing and report nothing — +// not even its abort — the new actor must stay running and not done, and no onDone +// may fire, so the new actor settles only with a delivery of its own. +func TestWithSettleTransform_ARespawnedActorIsNotSettledByTheOldSettle(t *testing.T) { + ctx := context.Background() + for _, tc := range []struct { + name string + aborting bool // the transform aborts the first settle rather than passing its outcome through + }{{"the settle branch", false}, {"the abort branch", true}} { + t.Run(tc.name, func(t *testing.T) { + abort := errors.New("no recording") + var calls int + var events []string + var parent *state.Instance[string, string, *trec] + var sys *state.ActorSystem[string, string, *trec] + parent, sys, id := settleHarness(t, func(event string, output any, err error) (any, error, error) { + calls++ + if calls > 1 { + return upperSettleTransform(&events)(event, output, err) + } + // While the transform runs, the supervisor restarts the actor: leaving + // supervising stops the settling actor, and re-entering it spawns a fresh + // one under the same id, the invocation's stable id for its position. + sys.Absorb(ctx, parent.Fire(ctx, "restart").Effects) + sys.Absorb(ctx, parent.Fire(ctx, "start").Effects) + if tc.aborting { + return nil, nil, abort + } + return output, err, nil + }) + + // Drive the settle whose transform respawns the actor under it. + if tc.aborting { + res, ok := sys.SettleError(ctx, id, errors.New("boom")) + if ok || res.Err != nil { + t.Fatalf("the stale SettleError = %+v, %v; want false with no Err: its abort came from the old actor", res, ok) + } + } else if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + + // The old settle fired nothing: no onDone, no Assign, no abort, and the + // parent is where the restart left it. + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising: the old settle fired nothing", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the old settle ran %d Assigns, want none", n) + } + if out, none := sys.LastOutput(); none { + t.Fatalf("LastOutput = %q, want none: no outcome settled", out) + } + // The respawned actor under the id is running and not done. + if !sys.IsRunning(id) || sys.Running() != 1 { + t.Fatalf("the respawned actor isn't running: IsRunning(%v), Running %d", sys.IsRunning(id), sys.Running()) + } + + // The new actor settles with a delivery of its own, carrying its own + // outcome — the old settle's outcome never reaches the parent. + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false for the respawned actor") + } + if parent.Current() != "complete" { + t.Fatalf("parent state = %q after the new actor's settle, want complete", parent.Current()) + } + if got := strings.Join(parent.Entity().notes, ","); got != "result:PAYLOAD" { + t.Fatalf("notes = %q, want the new actor's own settle's result:PAYLOAD", got) + } + }) + } +} + +// TestWithSettleTransform_AnAbortedDeliveryFiresNothing proves a delivery whose +// settle aborts fires no event: the parent stays where it was, no Assign runs, the +// actor stays running and LastOutput still reports nothing, as an aborted service +// settle leaves its service in flight. The settle reported the abort to the +// delivery's Tick, as SettleError does (see +// TestWithSettleTransform_AbortFiresNothingAndLeavesTheActorRunning). +func TestWithSettleTransform_AnAbortedDeliveryFiresNothing(t *testing.T) { + ctx := context.Background() + abort := errors.New("no recording") + parent, sys, id := settleHarness(t, func(string, any, error) (any, error, error) { + return nil, nil, abort + }) + if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q after the aborted delivery, want supervising", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the aborted delivery ran %d Assigns, want none", n) + } + if !sys.IsRunning(id) || sys.Running() != 1 { + t.Fatalf("the aborted actor isn't running: IsRunning(%v), Running %d", sys.IsRunning(id), sys.Running()) + } + if out, none := sys.LastOutput(); none { + t.Fatalf("LastOutput = %q after the abort, want none", out) + } +} + +// unroutedParentMachine spawns its child through the spawn action with neither an +// onDone nor an onError — a dynamic spawn routes no completion, where an invoked +// actor always routes, firing the zero event its unset outcome leaves, which the +// parent refuses — so the child's settle routes nothing and its completion is a +// fire-and-forget no-op, exactly as with no transform. +func unroutedParentMachine() *state.Machine[string, string, *trec] { + return state.ForgeFor[*trec]("unroutedparent"). + State("idle"). + State("supervising"). + Initial("idle"). + Transition("idle").On("start").GoTo("supervising").Spawn("child", unroutedChildID). + Quench() +} + +// unroutedChildID is the explicit id of the dynamically spawned, routing-less child +// the unrouted-settle tests settle. +const unroutedChildID = "unrouted-child" + +// finishingChild returns an ActorBehavior whose child completes with the fixed output +// once delivered "finish", whatever the output encodes as. +func finishingChild(output any) state.ActorBehavior { + child := state.ForgeFor[*trec]("finchild"). + State("working"). + State("done").Final(). + Initial("working"). + Transition("working").On("finish").GoTo("done"). + Quench() + return func(map[string]any) (state.ActorInstance, error) { + inst := child.Cast(&trec{}, state.WithInitialState[string]("working")) + return state.NewActor(inst, func(*state.Instance[string, string, *trec]) any { + return output + }), nil + } +} + +// unroutedHarness casts unroutedParentMachine, wiring its actor system with the given +// transform and a child that completes with output, so the routing-less child is +// ready to settle. +func unroutedHarness(t *testing.T, transform func(string, any, error) (any, error, error), output any) ( + *state.Instance[string, string, *trec], *state.ActorSystem[string, string, *trec], string, +) { + t.Helper() + ctx := context.Background() + m := unroutedParentMachine() + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", finishingChild(output)) + if transform != nil { + sys.WithSettleTransform(transform) + } + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising", parent.Current()) + } + return parent, sys, unroutedChildID +} + +// TestWithSettleTransform_AnUnroutedSettleRunsNoTransform proves the transform runs +// only when the settle routes a completion. The child was spawned with neither an +// onDone nor an onError, so its settle routes nothing and behaves exactly as with no +// transform set: the transform is never consulted — not for an output that won't +// encode, whose transform would abort as the durable Runner's does; not for the zero +// event an onDone-less settle would hand it, which a decoder that refuses that event +// would abort on; and not for a failure, which escalates to the parent as it does +// without a transform — nothing fires, and LastOutput and LastError report the raw +// outcome. +func TestWithSettleTransform_AnUnroutedSettleRunsNoTransform(t *testing.T) { + ctx := context.Background() + for _, tc := range []struct { + name string + output any // the child's completion output, when it completes + fail bool // settle the child as a failure through SettleError + transform func(*int) func(string, any, error) (any, error, error) + }{ + {"an output that won't encode", make(chan int), false, func(calls *int) func(string, any, error) (any, error, error) { + return func(event string, output any, err error) (any, error, error) { + *calls++ + if _, jerr := json.Marshal(output); jerr != nil { + return nil, nil, fmt.Errorf("won't encode: %w", jerr) + } + return output, err, nil + } + }}, + {"the zero event", "payload", false, func(calls *int) func(string, any, error) (any, error, error) { + return func(event string, output any, err error) (any, error, error) { + *calls++ + if event == "" { + return nil, nil, errors.New("refuses the zero event") + } + return output, err, nil + } + }}, + {"a failure with no onError", nil, true, func(calls *int) func(string, any, error) (any, error, error) { + return func(string, any, error) (any, error, error) { + *calls++ + return nil, nil, errors.New("no recording") + } + }}, + } { + t.Run(tc.name, func(t *testing.T) { + calls := 0 + parent, sys, id := unroutedHarness(t, tc.transform(&calls), tc.output) + + // Drive the unrouted settle: a failure through SettleError, a success + // through a delivery. + if tc.fail { + res, ok := sys.SettleError(ctx, id, errors.New("boom")) + if ok || res.Err != nil { + t.Fatalf("SettleError = %+v, %v; want false with no Err: nothing routed and nothing aborted", res, ok) + } + } else if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + + if calls != 0 { + t.Fatalf("the transform ran %d times for an unrouted settle, want none", calls) + } + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising: nothing fired", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the unrouted settle ran %d Assigns, want none", n) + } + // The actor is done, as a routed settle's is, having settled with no + // event to fire. + if sys.IsRunning(id) || sys.Running() != 0 { + t.Fatalf("the unrouted actor didn't settle: IsRunning(%v), Running %d", sys.IsRunning(id), sys.Running()) + } + if tc.fail { + // The raw failure escalated, as it does without a transform, and + // LastError keeps it. + if esc := sys.LastEscalation(); esc == nil || esc.ActorID != id { + t.Fatalf("LastEscalation = %v, want the unrouted failure escalated as without a transform", esc) + } + if err := sys.LastError(); err == nil || err.Error() != "boom" { + t.Fatalf("LastError = %v, want the raw failure", err) + } + } else if out, got := sys.LastOutput(); !got || out != tc.output { + t.Fatalf("LastOutput = %v, %v; want the raw output %v, exactly as with no transform", out, got, tc.output) + } + }) + } +} + +// halfRoutedMachine invokes its child with only one outcome event declared: doneOnly +// wires an onDone and no onError, so a failure routes nothing; otherwise it wires an +// onError and no onDone, so a success routes nothing. The outcome the invocation left +// undeclared has no event to settle through, exactly as a dynamic spawn that declares +// neither does: an invoked actor's unset outcome used to leave the zero event, which +// the parent refused after the transform (and, for a host, its decoder) was consulted +// for it, so the invocation's own flags — not the zero event — decide routing. +func halfRoutedMachine(doneOnly bool) *state.Machine[string, string, *trec] { + b := state.ForgeFor[*trec]("halfrouted"). + State("idle"). + State("supervising") + if doneOnly { + b = b.InvokeActor("child", state.WithInvokeOnDone("childDone")) + } else { + b = b.InvokeActor("child", state.WithInvokeOnError("childErr")) + } + return b. + State("complete"). + State("failed"). + Initial("idle"). + Transition("idle").On("start").GoTo("supervising"). + Transition("supervising").On("childDone").GoTo("complete"). + Transition("supervising").On("childErr").GoTo("failed"). + Quench() +} + +// halfRoutedHarness casts halfRoutedMachine, wires the given transform and the child +// behavior that completes with "payload", and enters supervising, returning the +// parent, the system and the spawned child's id. +func halfRoutedHarness(t *testing.T, doneOnly bool, transform func(string, any, error) (any, error, error)) ( + *state.Instance[string, string, *trec], *state.ActorSystem[string, string, *trec], string, +) { + t.Helper() + ctx := context.Background() + m := halfRoutedMachine(doneOnly) + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", settleChildBehavior()) + if transform != nil { + sys.WithSettleTransform(transform) + } + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising", parent.Current()) + } + return parent, sys, state.ActorID(m.Name(), "supervising", 0) +} + +// TestWithSettleTransform_AnInvokedActorWithoutTheOutcomeDeclaredRunsNoTransform +// proves an invoked actor routes only the outcomes its invocation declared, so the +// transform runs for neither: a success with no onDone settles as the fire-and-forget +// no-op a dynamic spawn's always was, and a failure with no onError escalates to the +// parent as a dynamic spawn's does — where each used to fire the zero event its unset +// outcome leaves, consulting the transform for an event the parent then refused. +func TestWithSettleTransform_AnInvokedActorWithoutTheOutcomeDeclaredRunsNoTransform(t *testing.T) { + ctx := context.Background() + for _, tc := range []struct { + name string + doneOnly bool // wire the onDone only (a failure routes nothing) or the onError only (a success does) + fail bool // settle the child as a failure through SettleError rather than a delivery + }{ + {"a success with no onDone", false, false}, + {"a failure with no onError", true, true}, + } { + t.Run(tc.name, func(t *testing.T) { + calls := 0 + parent, sys, id := halfRoutedHarness(t, tc.doneOnly, func(event string, output any, err error) (any, error, error) { + calls++ + if event == "" { + return nil, nil, errors.New("refuses the zero event") + } + return output, err, nil + }) + if tc.fail { + if res, ok := sys.SettleError(ctx, id, errors.New("boom")); ok || res.Err != nil { + t.Fatalf("SettleError = %+v, %v; want false with no Err: nothing routed and nothing aborted", res, ok) + } + } else if !sys.DeliverByID(ctx, id, "finish") { + t.Fatal("DeliverByID returned false; the actor was running") + } + if calls != 0 { + t.Fatalf("the transform ran %d times for the undeclared outcome, want none: no event carries it", calls) + } + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising: nothing fired", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the settle ran %d Assigns, want none", n) + } + // The actor settled, as a routed settle's does, with no event to fire. + if sys.IsRunning(id) || sys.Running() != 0 { + t.Fatalf("the actor didn't settle: IsRunning(%v), Running %d", sys.IsRunning(id), sys.Running()) + } + if tc.fail { + // The raw failure escalated, as a dynamic spawn's unrouted failure does, + // and LastError keeps it. + if esc := sys.LastEscalation(); esc == nil || esc.ActorID != id { + t.Fatalf("LastEscalation = %v, want the undeclared failure escalated, as a dynamic spawn's is", esc) + } + if err := sys.LastError(); err == nil || err.Error() != "boom" { + t.Fatalf("LastError = %v, want the raw failure", err) + } + } else if out, got := sys.LastOutput(); !got || out != "payload" { + t.Fatalf("LastOutput = %v, %v; want the raw output \"payload\"", out, got) + } + }) + } +} + +// failingChildBehavior returns an ActorBehavior whose spawn fails, so the system +// routes the failure through the invocation's onError, or escalates it when none was +// declared. +func failingChildBehavior() state.ActorBehavior { + return func(map[string]any) (state.ActorInstance, error) { + return nil, errors.New("can't start") + } +} + +// TestASpawnWithoutOnErrorEscalatesNotFiresTheZeroEvent proves a spawn whose +// invocation declared no onError escalates its failure to the parent as a dynamic +// spawn's does, firing no zero event: a parent that declares a transition on the zero +// event never runs it, and nothing was caught for the failure. On main the unset +// onError left the zero event, which fired and such a parent caught. +func TestASpawnWithoutOnErrorEscalatesNotFiresTheZeroEvent(t *testing.T) { + ctx := context.Background() + // The parent declares a transition on the zero event, which a fired zero-event + // onError would take. + m := state.ForgeFor[*trec]("zeroescape"). + State("idle"). + State("supervising").InvokeActor("child"). + State("caught"). + Initial("idle"). + Transition("idle").On("start").GoTo("supervising"). + Transition("supervising").On("").GoTo("caught"). + Quench() + parent := m.Cast(&trec{}, state.WithInitialState[string]("idle")) + sys := state.NewActorSystem(parent).Register("child", failingChildBehavior()) + res := parent.Fire(ctx, "start") + sys.Absorb(ctx, res.Effects) + if parent.Current() != "supervising" { + t.Fatalf("parent state = %q, want supervising: the spawn failed, no onError was declared, and no zero event fired", parent.Current()) + } + if n := len(parent.Entity().notes); n != 0 { + t.Fatalf("the failed spawn ran %d Assigns, want none: no zero event fired", n) + } + if esc := sys.LastEscalation(); esc == nil || esc.ActorID != state.ActorID(m.Name(), "supervising", 0) { + t.Fatalf("LastEscalation = %v, want the failed spawn escalated: no onError was declared", esc) + } +} diff --git a/state/wirefreeze_test.go b/state/wirefreeze_test.go index 81cd50a5..21589415 100644 --- a/state/wirefreeze_test.go +++ b/state/wirefreeze_test.go @@ -168,6 +168,8 @@ func TestWireShape_Frozen(t *testing.T) { {"Kind", "kind,omitempty"}, {"SystemID", "systemId,omitempty"}, {"Meta", "meta,omitempty"}, + {"HasOnDone", "hasOnDone,omitempty"}, + {"HasOnError", "hasOnError,omitempty"}, }, }, { diff --git a/telemetry/datadog/go.mod b/telemetry/datadog/go.mod index 8040bb01..846799aa 100644 --- a/telemetry/datadog/go.mod +++ b/telemetry/datadog/go.mod @@ -32,7 +32,6 @@ require ( github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/ebitengine/purego v0.10.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect @@ -51,12 +50,11 @@ require ( github.com/philhofer/fwd v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect github.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect github.com/shirou/gopsutil/v4 v4.26.2 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/tinylib/msgp v1.6.3 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect @@ -66,21 +64,23 @@ require ( go.opentelemetry.io/collector/featuregate v1.51.1-0.20260205185216-81bc641f26c0 // indirect go.opentelemetry.io/collector/pdata v1.51.1-0.20260205185216-81bc641f26c0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.145.1-0.20260205185216-81bc641f26c0 // indirect - go.opentelemetry.io/otel v1.44.0 // indirect - go.opentelemetry.io/otel/metric v1.44.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.44.0 // indirect - go.opentelemetry.io/otel/trace v1.44.0 // indirect + go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/metric v1.47.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.47.0 // indirect + go.opentelemetry.io/otel/trace v1.47.0 // indirect go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.1 // indirect - go.yaml.in/yaml/v3 v3.0.4 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect + golang.org/x/crypto v0.58.0 // indirect golang.org/x/exp v0.0.0-20260209203927-2842357ff358 // indirect - golang.org/x/mod v0.33.0 // indirect - golang.org/x/sys v0.45.0 // indirect + golang.org/x/mod v0.41.0 // indirect + golang.org/x/net v0.62.0 // indirect + golang.org/x/sys v0.49.0 // indirect golang.org/x/time v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/ini.v1 v1.67.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/telemetry/datadog/go.sum b/telemetry/datadog/go.sum index 1ad49834..7c0380d2 100644 --- a/telemetry/datadog/go.sum +++ b/telemetry/datadog/go.sum @@ -52,8 +52,6 @@ github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1 github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38= github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -62,8 +60,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU= github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -123,8 +121,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/puzpuzpuz/xsync/v3 v3.5.1 h1:GJYJZwO6IdxN/IKbneznS6yPkVC+c3zyY/j19c++5Fg= @@ -143,8 +139,9 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -152,8 +149,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/tinylib/msgp v1.6.3 h1:bCSxiTz386UTgyT1i0MSCvdbWjVW+8sG3PjkGsZQt4s= github.com/tinylib/msgp v1.6.3/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA= github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA= @@ -205,16 +203,18 @@ go.opentelemetry.io/collector/processor/processortest v0.145.0 h1:RDGBmyZnHk7XVK go.opentelemetry.io/collector/processor/processortest v0.145.0/go.mod h1:WAvxAzSojkdoZB915Z1lsVHCPDJBb2fepjJBjenrzjg= go.opentelemetry.io/collector/processor/xprocessor v0.145.0 h1:DaIE7MxRlg0OL1o2P0GQZtmZeExAmVso3qWv8S0RLps= go.opentelemetry.io/collector/processor/xprocessor v0.145.0/go.mod h1:kUwRyKBU/kjCmXodd+0z7CpvcP0A9G9/QL+MaJt4U2o= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= -go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= -go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= +go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I= +go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0= +go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw= +go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.opentelemetry.io/proto/slim/otlp v1.9.0 h1:fPVMv8tP3TrsqlkH1HWYUpbCY9cAIemx184VGkS6vlE= @@ -232,22 +232,19 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= -go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= -golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= +golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= golang.org/x/exp v0.0.0-20260209203927-2842357ff358 h1:kpfSV7uLwKJbFSEgNhWzGSL47NDSF/5pYYQw1V0ub6c= golang.org/x/exp v0.0.0-20260209203927-2842357ff358/go.mod h1:R3t0oliuryB5eenPWl3rrQxwnNM3WTwnsRZZiXLAAW8= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= -golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= -golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= +golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -261,8 +258,7 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -278,8 +274,7 @@ golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhS golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 h1:ggcbiqK8WWh6l1dnltU4BgWGIGo+EVYxCaAPih/zQXQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/telemetry/otel/go.mod b/telemetry/otel/go.mod index a4038323..ebab4c6f 100644 --- a/telemetry/otel/go.mod +++ b/telemetry/otel/go.mod @@ -4,22 +4,21 @@ go 1.27.4 require ( github.com/stablekernel/crucible/telemetry v0.0.0 - go.opentelemetry.io/otel v1.44.0 - go.opentelemetry.io/otel/metric v1.44.0 - go.opentelemetry.io/otel/sdk v1.44.0 - go.opentelemetry.io/otel/sdk/metric v1.44.0 - go.opentelemetry.io/otel/trace v1.44.0 + go.opentelemetry.io/otel v1.47.0 + go.opentelemetry.io/otel/metric v1.47.0 + go.opentelemetry.io/otel/sdk v1.47.0 + go.opentelemetry.io/otel/sdk/metric v1.47.0 + go.opentelemetry.io/otel/trace v1.47.0 ) require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - golang.org/x/sys v0.45.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect + golang.org/x/sys v0.49.0 // indirect ) replace github.com/stablekernel/crucible/telemetry => ../ diff --git a/telemetry/otel/go.sum b/telemetry/otel/go.sum index a9b85059..84883696 100644 --- a/telemetry/otel/go.sum +++ b/telemetry/otel/go.sum @@ -1,37 +1,34 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= -go.opentelemetry.io/otel/metric/x v0.66.0 h1:YkCrx1zLOChi9ZcZ6euupOcsgzbVlec7D/xoEU1+cTA= -go.opentelemetry.io/otel/metric/x v0.66.0/go.mod h1:d1+BDj9t96do0/1LoU1ayfCv79ZgNE41qbhBvnMOBZk= -go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= -go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= +go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= +go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= +go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= +go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= +go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= +go.opentelemetry.io/otel/metric/x v0.69.0 h1:DjRLr15H83v+hCW7JA9NoJvOkYTtmq5YoDRbe9deYpM= +go.opentelemetry.io/otel/metric/x v0.69.0/go.mod h1:uVvsMPMFFyj/HUQfrUnH3JjnOQ1dwFDorgFLRBasM0k= +go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I= +go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0= +go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw= +go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw= +go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= +go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=