Repository navigation
feat: add OriginalID and OriginalDestinationID to support replay event transformations - #7274
Merged
Merged
Conversation
…t transformations 🔒 Scanned for secrets using gitleaks 8.28.0
mihir20
marked this pull request as ready for review
August 17, 2026 08:07
…configuration for tests 🔒 Scanned for secrets using gitleaks 8.28.0
… values from JSON 🔒 Scanned for secrets using gitleaks 8.28.0
atzoum
reviewed
Aug 17, 2026
| ID string | ||
| ID string | ||
| // OriginalID is the ID of the original destination for replay destinations | ||
| OriginalID string `json:"-"` |
Contributor
There was a problem hiding this comment.
We are caching configs as json in the database, by ignoring this field we would be omitting it if backend config is unavailable and we load a cached version. omitempty can be used instead
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7274 +/- ##
==========================================
- Coverage 79.69% 79.67% -0.03%
==========================================
Files 601 601
Lines 67184 67191 +7
==========================================
- Hits 53544 53535 -9
- Misses 10474 10488 +14
- Partials 3166 3168 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…icts during unmarshalling 🔒 Scanned for secrets using gitleaks 8.28.0
…in JSON tagging 🔒 Scanned for secrets using gitleaks 8.28.0
ktgowtham
approved these changes
Aug 17, 2026
atzoum
approved these changes
Aug 17, 2026
This was referenced Aug 17, 2026
Merged
mihir20
pushed a commit
that referenced
this pull request
Aug 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.83.0-rc.1](v1.82.0...v1.83.0-rc.1) (2026-08-17) ### Features * add OriginalID and OriginalDestinationID to support replay event transformations ([#7274](#7274)) ([28d38e9](28d38e9)) * bingads integration tests ([#7253](#7253)) ([fdb8c0a](fdb8c0a)) * **processor:** fork event processing for rsources pipelines ([#7235](#7235)) ([707ea06](707ea06)) ### Bug Fixes * pyt contract tests data race ([#7247](#7247)) ([9e62d0c](9e62d0c)) ### Miscellaneous * bump sqlconnect-go to v1.30.2 ([#7251](#7251)) ([f5d6175](f5d6175)) * **jobsdb:** multi-consumer compaction improvements ([#7248](#7248)) ([b4af86c](b4af86c)) * pyt contract tests for candidate releases ([#7252](#7252)) ([149e91a](149e91a)) * pyt contract tests for transformations auth ([#7239](#7239)) ([ac4a859](ac4a859)) * **router:** support per-partition noOfWorkers override ([#7270](#7270)) ([9d6f7cf](9d6f7cf)) * sync release v1.82.0 to main branch ([#7243](#7243)) ([a6e29f2](a6e29f2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
mihir20
pushed a commit
that referenced
this pull request
Aug 18, 2026
🤖 I have created a release *beep* *boop* --- ## [1.83.0](v1.82.0...v1.83.0) (2026-08-17) ### Features * add OriginalID and OriginalDestinationID to support replay event transformations ([#7274](#7274)) ([28d38e9](28d38e9)) * bingads integration tests ([#7253](#7253)) ([fdb8c0a](fdb8c0a)) * **processor:** fork event processing for rsources pipelines ([#7235](#7235)) ([707ea06](707ea06)) ### Bug Fixes * pyt contract tests data race ([#7247](#7247)) ([9e62d0c](9e62d0c)) ### Miscellaneous * bump sqlconnect-go to v1.30.2 ([#7251](#7251)) ([f5d6175](f5d6175)) * **jobsdb:** multi-consumer compaction improvements ([#7248](#7248)) ([b4af86c](b4af86c)) * pyt contract tests for candidate releases ([#7252](#7252)) ([149e91a](149e91a)) * pyt contract tests for transformations auth ([#7239](#7239)) ([ac4a859](ac4a859)) * **router:** support per-partition noOfWorkers override ([#7270](#7270)) ([9d6f7cf](9d6f7cf)) * sync release v1.82.0 to main branch ([#7243](#7243)) ([a6e29f2](a6e29f2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
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.
Description
Problem
During an event replay,
ApplyReplaySourcescreates replay destinations as copies of the original destinations with new IDs (backend-config/replay_types.go). That new replay destination ID is what reaches user transformations viametadata(event).destinationId.Any user transformation that branches on destination ID (e.g. matching hardcoded original destination IDs to route/filter events) can therefore never match during a replay — every replayed event gets filtered, even though the same transformation works correctly for live traffic.
The platform already solves this exact problem for source IDs: the user transformer flips
sourceId↔originalSourceIdbefore calling the transformation and flips them back on the response, so transformations always see the original source ID. Destinations never got the same treatment.Fix
Mirror the existing source-ID mechanism for destination IDs:
backend-config:DestinationTgets anOriginalIDfield (same asSourceT), populated byApplyReplaySourceswhen building replay destinations.processor:MetadatagetsOriginalDestinationID(json:"originalDestinationId,omitempty"), stamped alongside the other destination metadata after the tracking-plan flow and carried throughCommonMetadata().omitemptykeeps non-replay payloads unchanged.user_transformer:sendBatchflipsdestinationId↔originalDestinationId(alongside the existing source flip) before calling the transformation, andTransformflips them back on every response, including failed events.Scope is deliberately identical to the source-ID behavior: only the user-transformation payload sees the original destination ID. Everything downstream (destination transformation, router, reporting, stats) keeps the replay destination ID, which remains the actual delivery target.
Tests
user_transformer_test.goverifying the transformation receives the original source and destination IDs and the response carries the replay IDs restored (runs across all three HTTP client types).TestApplyReplayConfigextended to assertOriginalIDis set on replay destinations.Linear Ticket
pipe-3282
Security