-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: filter destinations for events from rETL in processor #4247
Conversation
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
processor/processor.go
Outdated
if len(destinationID) != 0 { | ||
enhanceWithDestination(&shallowEventCopy, &backendconfig.DestinationT{ | ||
ID: destinationID, | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear this won't be reliable under all circumstances, at least if there are mixed events for the same source in the same batch, i.e. some events having a destination_id and some others not having anything or having another destination_id: Both TransformerEvent.Metadata
& TransformerEvent.Destination
are being overwritten during Handle#validateEvents
based on the value found in the first event of the batch! (see proc#getTransformerEvents
)
We could fill TransformerEvent.Metadata.DestinationID
and then read it from TransformerResponse.Metadata.DestinationID
, but having to rely on an external service for making sure that this field is being transferred properly is not the safest approach. Furthermore, proc#getTransformerEvents
is a generic method used by other steps as well & we wouldn't want to break other steps :/
We might need to find an alternative strategy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack have thought of another strategy will update the PR
abce436
to
3be17a4
Compare
3be17a4
to
32da9eb
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4247 +/- ##
==========================================
- Coverage 73.95% 73.95% -0.01%
==========================================
Files 389 390 +1
Lines 55209 55272 +63
==========================================
+ Hits 40831 40877 +46
- Misses 12054 12068 +14
- Partials 2324 2327 +3 ☔ View full report in Codecov by Sentry. |
e1d87bf
to
d5145af
Compare
d5145af
to
49550b3
Compare
76b5f69
to
7d7d782
Compare
7d7d782
to
9c3b414
Compare
Description
For events received through rETL endpoints, destination ID for an event will be stored in params field in JobsDB. For all the events having destination ID in params should be delivered to only those destinations irrespective of how many other destinations are connected to the source. All the other destinations will be filtered at processor.
Base PR: #4234
Linear Ticket
pipe-620
Security