feat: replace event destination_id with matched_destination_ids#801
Open
feat: replace event destination_id with matched_destination_ids#801
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
a734b05 to
293b703
Compare
Contributor
Sounds good
Yes
I'd omit |
Collaborator
Author
|
@alexbouchardd perfect, that's what we already implemented so should be good to go, can you review/approve? |
alexbouchardd
approved these changes
Mar 31, 2026
docs/apis/openapi.yaml
Outdated
| in: query | ||
| required: false | ||
| schema: | ||
| type: string |
Contributor
There was a problem hiding this comment.
Should support an array
…#688) Events now track which destinations they were routed to via a new matched_destination_ids field, replacing the confusing destination_id which was just the publish input. - Add MatchedDestinationIDs to Event model, stamped during Handle() - Add DB migrations (Postgres text[], ClickHouse Array(String)) that add the new column and drop destination_id in one step - Update all logstore implementations (pg, ch, mem) for persistence, queries, and metrics - Enable GET /events?destination_id=... filtering via array overlap - Update API responses and OpenAPI spec; omit field from attempt-embedded events where it's unavailable - Un-skip all previously blocked destination filter tests No backfill: existing events will have empty matched_destination_ids. Only new events going forward will be populated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…leanup Monitor goroutines were outliving their tests — Shutdown() closed the Redis client but the Monitor loop kept retrying, then panicked logging to a completed test. Fix: cancel the context before shutdown so Monitor exits cleanly. Also use assert.Eventually for timing-sensitive assertions instead of fixed sleep durations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
293b703 to
4a1c82b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace
event.destination_id(publish input) withmatched_destination_ids(actual routing results). EnablesGET /events?destination_id=...filtering (#688). Dropsdestination_idfrom event persistence per team consensus (#799).Resolves #688. Resolves #799.
matched_destination_idsto Event model, DB (pg + ch), all logstores, API, OpenAPIdestination_idfrom events table (single migration per DB)matched_destination_idsfor filtering/dimensionsDiscussion points
matched_destination_ids. No backfill.matched_destination_idson the API? — currently returned onGET /eventsandGET /events/:id.include=event),matched_destination_idsis omitted because the attempts table doesn't have it. Options: accept the gap, denormalize into attempts, or join at query time.Test plan
🤖 Generated with Claude Code