feat(hook): Deliver events to integrations - #607
Conversation
b5394eb to
837e0d8
Compare
a09dcab to
b6aef89
Compare
837e0d8 to
b5394eb
Compare
b6aef89 to
a09dcab
Compare
|
🛑 Automatic stack rebase aborted — diff mismatch The rebase of Please rebase manually and verify the changes are correct. |
| failures = append(failures, fmt.Errorf("hook %s: %w", child.Name(), err)) | ||
| } | ||
| } | ||
| return errors.Join(failures...) |
There was a problem hiding this comment.
errors.Join creates an error tree (Unwrap() []error), but platform/errs.NewClassifierProcessor only walks linear Unwrap() error chains. Plain transient errors returned by child hooks can therefore bypass configured classifiers and default to non-retryable, sending the event directly to the DLQ. Let's think through how to make the error classifier properly unwrap joined error chains and classify them for retryability.
| // succeeded. | ||
| func (h Hook) Handle(ctx context.Context, event *basehook.HookEvent) error { | ||
| var failures []error | ||
| for _, child := range h.children { |
There was a problem hiding this comment.
Should these independent hooks run concurrently rather than serially? This would avoid one slow hook from blocking others from starting. Just need to be careful to avoid any leaked goroutines here.
## Summary **What**: - Define the shared event format every domain publishes for fire-and-forget lifecycle notifications, carrying origin, type, timing, a staleness marker, and open per-event detail. - Derive an event's identity from the transition it describes, so replaying a transition produces the same identity and duplicate deliveries collapse. **Why**: - Enable integrations to react to pipeline milestones without adding call sites that can stall or fail a merge. - Establish one schema and one identity rule before any producer ships, so a consumer spanning several domains needs only one reader. ## Test Plan - [x] Add unit tests. ## Revert Plan - Revert this PR. No topic is registered and no message of this shape exists on any queue. ## Issues - [CODEM-416](https://linear.app/uber/issue/CODEM-416/hooks-integration-downstream-notificaiton) ## Stack 1. @ uber#606 1. uber#607 1. uber#608
Summary
What:
Why:
Test Plan
Revert Plan
Issues
Stack