diff --git a/cmd/hatchet-loadtest/rampup/emit.go b/cmd/hatchet-loadtest/rampup/emit.go index 2f82f1290..f35ce3c80 100644 --- a/cmd/hatchet-loadtest/rampup/emit.go +++ b/cmd/hatchet-loadtest/rampup/emit.go @@ -54,7 +54,7 @@ func emit(ctx context.Context, startEventsPerSecond, amount int, increase, durat var err error ev := Event{CreatedAt: time.Now(), ID: id} l.Debug().Msgf("pushed event %d", ev.ID) - err = c.Event().Push(context.Background(), "load-test:event", ev) + err = c.Event().Push(context.Background(), "load-test:event", ev, nil, nil) if err != nil { panic(fmt.Errorf("error pushing event: %w", err)) } diff --git a/pkg/examples/run/event.go b/pkg/examples/run/event.go index 95ae7ff9c..2d6df1d04 100644 --- a/pkg/examples/run/event.go +++ b/pkg/examples/run/event.go @@ -26,6 +26,8 @@ func event() { v1_workflows.SimpleInput{ Message: "Hello, World!", }, + nil, + nil, ) // !! diff --git a/pkg/examples/z_v0/assignment-affinity/run.go b/pkg/examples/z_v0/assignment-affinity/run.go index a26ba847a..aef029f66 100644 --- a/pkg/examples/z_v0/assignment-affinity/run.go +++ b/pkg/examples/z_v0/assignment-affinity/run.go @@ -89,6 +89,8 @@ func run() (func() error, error) { context.Background(), "user:create:affinity", testEvent, + nil, + nil, ) if err != nil { panic(fmt.Errorf("error pushing event: %w", err)) diff --git a/pkg/examples/z_v0/assignment-sticky/run.go b/pkg/examples/z_v0/assignment-sticky/run.go index 36185e8b3..3c22ea1bd 100644 --- a/pkg/examples/z_v0/assignment-sticky/run.go +++ b/pkg/examples/z_v0/assignment-sticky/run.go @@ -111,6 +111,8 @@ func run() (func() error, error) { context.Background(), "user:create:sticky", testEvent, + nil, + nil, ) if err != nil { panic(fmt.Errorf("error pushing event: %w", err)) diff --git a/pkg/examples/z_v0/cancellation/run.go b/pkg/examples/z_v0/cancellation/run.go index 1c0ec2f1d..b617b391b 100644 --- a/pkg/examples/z_v0/cancellation/run.go +++ b/pkg/examples/z_v0/cancellation/run.go @@ -69,6 +69,8 @@ func run(events chan<- string) (func() error, error) { context.Background(), "user:create:cancellation", testEvent, + nil, + nil, ) if err != nil { panic(fmt.Errorf("error pushing event: %w", err)) diff --git a/pkg/examples/z_v0/compute/main.go b/pkg/examples/z_v0/compute/main.go index 40cfd9010..ff2e9db0a 100644 --- a/pkg/examples/z_v0/compute/main.go +++ b/pkg/examples/z_v0/compute/main.go @@ -141,6 +141,8 @@ func run(events chan<- string) (func() error, error) { context.Background(), "user:create:simple", testEvent, + nil, + nil, client.WithEventMetadata(map[string]string{ "hello": "world", }), diff --git a/pkg/examples/z_v0/dag/main.go b/pkg/examples/z_v0/dag/main.go index 646973ccd..761772529 100644 --- a/pkg/examples/z_v0/dag/main.go +++ b/pkg/examples/z_v0/dag/main.go @@ -150,6 +150,8 @@ func run(ch <-chan interface{}, events chan<- string) error { context.Background(), "user:create:simple", testEvent, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/deprecated/requeue/main.go b/pkg/examples/z_v0/deprecated/requeue/main.go index 6b8e9ab09..7c17984a6 100644 --- a/pkg/examples/z_v0/deprecated/requeue/main.go +++ b/pkg/examples/z_v0/deprecated/requeue/main.go @@ -59,6 +59,8 @@ func main() { context.Background(), "example:event", event, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/deprecated/schedule-timeout/main.go b/pkg/examples/z_v0/deprecated/schedule-timeout/main.go index 851c118de..5745bd063 100644 --- a/pkg/examples/z_v0/deprecated/schedule-timeout/main.go +++ b/pkg/examples/z_v0/deprecated/schedule-timeout/main.go @@ -35,6 +35,8 @@ func main() { context.Background(), "user:create", event, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/deprecated/timeout/main.go b/pkg/examples/z_v0/deprecated/timeout/main.go index ba7605995..c1ae2723f 100644 --- a/pkg/examples/z_v0/deprecated/timeout/main.go +++ b/pkg/examples/z_v0/deprecated/timeout/main.go @@ -69,6 +69,8 @@ func main() { context.Background(), "user:create", event, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/deprecated/yaml/main.go b/pkg/examples/z_v0/deprecated/yaml/main.go index 46142fe78..77dc73ddb 100644 --- a/pkg/examples/z_v0/deprecated/yaml/main.go +++ b/pkg/examples/z_v0/deprecated/yaml/main.go @@ -97,6 +97,8 @@ func main() { context.Background(), "user:create", testEvent, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/errors-test/main.go b/pkg/examples/z_v0/errors-test/main.go index a345a2d0a..a9d1b786b 100644 --- a/pkg/examples/z_v0/errors-test/main.go +++ b/pkg/examples/z_v0/errors-test/main.go @@ -112,6 +112,8 @@ func main() { context.Background(), "user:create", testEvent, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/limit-concurrency/cancel-in-progress/main.go b/pkg/examples/z_v0/limit-concurrency/cancel-in-progress/main.go index 876ccaaa2..18988cc16 100644 --- a/pkg/examples/z_v0/limit-concurrency/cancel-in-progress/main.go +++ b/pkg/examples/z_v0/limit-concurrency/cancel-in-progress/main.go @@ -103,6 +103,8 @@ func run(ch <-chan interface{}, events chan<- string) error { context.Background(), "concurrency-test-event", firstEvent, + nil, + nil, ) if err != nil { @@ -123,6 +125,8 @@ func run(ch <-chan interface{}, events chan<- string) error { concurrencyLimitEvent{ Index: 1, }, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/limit-concurrency/group-round-robin/main.go b/pkg/examples/z_v0/limit-concurrency/group-round-robin/main.go index 4dd813558..50236aebd 100644 --- a/pkg/examples/z_v0/limit-concurrency/group-round-robin/main.go +++ b/pkg/examples/z_v0/limit-concurrency/group-round-robin/main.go @@ -120,7 +120,13 @@ func run(ch <-chan interface{}, events chan<- string) error { event = concurrencyLimitEvent{1} } - c.Event().Push(context.Background(), "concurrency-test-event-rr", event) + c.Event().Push( + context.Background(), + "concurrency-test-event-rr", + event, + nil, + nil, + ) } select { diff --git a/pkg/examples/z_v0/logging/main.go b/pkg/examples/z_v0/logging/main.go index 59064100d..12f53a9c2 100644 --- a/pkg/examples/z_v0/logging/main.go +++ b/pkg/examples/z_v0/logging/main.go @@ -109,6 +109,8 @@ func run(events chan<- string) (func() error, error) { context.Background(), "user:log:simple", testEvent, + nil, + nil, client.WithEventMetadata(map[string]string{ "hello": "world", }), diff --git a/pkg/examples/z_v0/middleware/run.go b/pkg/examples/z_v0/middleware/run.go index ea0403b5f..b49875170 100644 --- a/pkg/examples/z_v0/middleware/run.go +++ b/pkg/examples/z_v0/middleware/run.go @@ -118,6 +118,8 @@ func run(events chan<- string) (func() error, error) { context.Background(), "user:create:middleware", testEvent, + nil, + nil, ) if err != nil { panic(fmt.Errorf("error pushing event: %w", err)) diff --git a/pkg/examples/z_v0/namespaced/main.go b/pkg/examples/z_v0/namespaced/main.go index 937f2a534..2a26bff41 100644 --- a/pkg/examples/z_v0/namespaced/main.go +++ b/pkg/examples/z_v0/namespaced/main.go @@ -128,6 +128,8 @@ func run(events chan<- string) (func() error, error) { context.Background(), "user:create:simple", testEvent, + nil, + nil, ) if err != nil { panic(fmt.Errorf("error pushing event: %w", err)) diff --git a/pkg/examples/z_v0/register-action/main.go b/pkg/examples/z_v0/register-action/main.go index f1bf8b629..a00192fd8 100644 --- a/pkg/examples/z_v0/register-action/main.go +++ b/pkg/examples/z_v0/register-action/main.go @@ -136,6 +136,8 @@ func main() { context.Background(), "user:create", testEvent, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/retries/main.go b/pkg/examples/z_v0/retries/main.go index 92ec83c88..d4a85348d 100644 --- a/pkg/examples/z_v0/retries/main.go +++ b/pkg/examples/z_v0/retries/main.go @@ -118,6 +118,8 @@ func run(ch <-chan interface{}, events chan<- string) error { context.Background(), "user:create:simple", testEvent, + nil, + nil, ) if err != nil { diff --git a/pkg/examples/z_v0/simple/main.go b/pkg/examples/z_v0/simple/main.go index dc8405e99..7eecbbe1c 100644 --- a/pkg/examples/z_v0/simple/main.go +++ b/pkg/examples/z_v0/simple/main.go @@ -120,6 +120,8 @@ func run(events chan<- string) (func() error, error) { context.Background(), "user:create:simple", testEvent, + nil, + nil, client.WithEventMetadata(map[string]string{ "hello": "world", }), diff --git a/pkg/examples/z_v0/timeout/run.go b/pkg/examples/z_v0/timeout/run.go index 9e21e0e58..06eed2d0a 100644 --- a/pkg/examples/z_v0/timeout/run.go +++ b/pkg/examples/z_v0/timeout/run.go @@ -49,6 +49,8 @@ func run(done chan<- string, job worker.WorkflowJob) (func() error, error) { context.Background(), "user:create:timeout", testEvent, + nil, + nil, ) if err != nil { panic(fmt.Errorf("error pushing event: %w", err)) diff --git a/pkg/examples/z_v0/webhook/run.go b/pkg/examples/z_v0/webhook/run.go index c23a11bf1..3baa69daa 100644 --- a/pkg/examples/z_v0/webhook/run.go +++ b/pkg/examples/z_v0/webhook/run.go @@ -72,6 +72,8 @@ func run( context.Background(), event, testEvent, + nil, + nil, ) if err != nil { return fmt.Errorf("error pushing event: %w", err)