Skip to content

fix: replay destinations not using the config corresponding to their connected source type - #7307

Merged
atzoum merged 1 commit into
masterfrom
fix.replayDestConfig
Aug 27, 2026
Merged

atzoum merged 1 commit into
masterfrom
fix.replayDestConfig

Conversation

@atzoum

@atzoum atzoum commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

A destination connected to several sources appears once per source, and those copies are not interchangeable: the control plane filters a destination's config against the keys its definition declares for the connected source's type. ApplyReplaySources read it out of ConfigT.DestinationsMap(), keyed by id alone and last-write-wins, so a replay destination inherited an arbitrary copy - quite possibly one filtered for an unrelated source type. In the sampled namespace a Snowflake destination sits on 19 sources: the 18 cloud/webhook ones carry connectionMode, the single iOS one does not.

Found while writing the v2 mapper (PIPE-3279), whose fixture comparison against a captured v1 response failed ~1 run in 3 on unchanged input.

Key decisions

  • Resolved by source type, not by the (source, destination) pair. Filtering varies on source type alone, so instances sharing one are identical - and a replay does not require that its source and destination were ever connected.
  • The fallback is arbitrary but fixed (first source type in ascending order).

Linear Ticket

resolves PIPE-3320

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@atzoum
atzoum requested review from ktgowtham and mihir20 August 25, 2026 08:40
@codecov

codecov Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.18519% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.32%. Comparing base (6f96eea) to head (f9ea990).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
backend-config/types.go 52.94% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7307      +/-   ##
==========================================
- Coverage   79.81%   79.32%   -0.49%     
==========================================
  Files         604      604              
  Lines       67687    67729      +42     
==========================================
- Hits        54022    53724     -298     
- Misses      10482    10837     +355     
+ Partials     3183     3168      -15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

A destination connected to several sources appears once per source, and each copy carries a
different config: the control plane filters it against the keys the destination definition
declares for that source's type. ApplyReplaySources read the destination out of DestinationsMap,
which is keyed by id alone and last write wins, so a replay destination inherited an arbitrary
copy - one filtered for an unrelated source type.

Resolve the instance by the replay source's own source type instead, falling back to the first
source type in ascending order when the destination sits under no source of that type, which a
replay does not require.
🔒 Scanned for secrets using gitleaks 8.30.1
@atzoum atzoum changed the title fix: replay destinations copy the config of their own source type fix: replay destinations not using the config corresponding to their connected source type Aug 27, 2026
@atzoum
atzoum force-pushed the fix.replayDestConfig branch from 148b7a1 to f9ea990 Compare August 27, 2026 06:08
originalDestinations[replayDestination.OriginalDestinationID],
sourceTypeOf(source.SourceDefinition.Name, source.SourceDefinition.Category),
)
if !ok {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By this, we will only be able to do replay for a destination connected to the same source type. If in a replay a destination is connected to an android source type and originally it is connected to ios sourceType we won't be able to replay

@atzoum atzoum Aug 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destinationForSourceType falls back to the first destination config (lexicographically sorted by sourceType).
The only scenario where ok will be false is when the destination doesn't exist at all in the config (for any sourceType). In such case the behavior remains similar to the previous one, the destination is not added.

@atzoum
atzoum enabled auto-merge (squash) August 27, 2026 08:49
@atzoum
atzoum merged commit ee7aa93 into master Aug 27, 2026
217 of 238 checks passed
@atzoum
atzoum deleted the fix.replayDestConfig branch August 27, 2026 11:21
@atzoum atzoum mentioned this pull request Aug 27, 2026
1 task done
This was referenced Aug 31, 2026
itsmihir pushed a commit that referenced this pull request Aug 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.85.0-rc.1](v1.84.0...v1.85.0-rc.1)
(2026-08-31)


### Features

* backend config v2 resolver with stub mapper
([#7275](#7275))
([267b973](267b973))
* **warehouse:** clickhouse v2 connection and schema
([#7301](#7301))
([2eb1fa6](2eb1fa6))
* **warehouse:** clickhouse v2 ddl operations
([#7302](#7302))
([f2887c5](f2887c5))
* **warehouse:** clickhouse v2 loading
([#7303](#7303))
([3e48618](3e48618))
* **warehouse:** enable the clickhouse v2 driver behind a flag
([#7311](#7311))
([3ce1da5](3ce1da5))


### Bug Fixes

* race conditions while counting initial pending events can cause wrong
counting
([#7292](#7292))
([3efa718](3efa718))
* replay destinations not using the config corresponding to their
connected source type
([#7307](#7307))
([ee7aa93](ee7aa93))
* **router:** abort router-transform on proactive invalid_grant instead
of retrying (INT-6779)
([#7175](#7175))
([4d7348d](4d7348d))
* tracking plan merged config is cached without its event type
([#7314](#7314))
([624dd5c](624dd5c))


### Miscellaneous

* setattr/delattr hardening
([#7291](#7291))
([2855af4](2855af4))
* sync release v1.84.0 to main branch
([#7306](#7306))
([fa102b7](fa102b7))
* webhook reasons
([#7294](#7294))
([c298d59](c298d59))

---
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>
itsmihir pushed a commit that referenced this pull request Sep 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.85.0](v1.84.0...v1.85.0)
(2026-08-31)


### Features

* backend config v2 resolver with stub mapper
([#7275](#7275))
([267b973](267b973))
* **warehouse:** clickhouse v2 connection and schema
([#7301](#7301))
([2eb1fa6](2eb1fa6))
* **warehouse:** clickhouse v2 ddl operations
([#7302](#7302))
([f2887c5](f2887c5))
* **warehouse:** clickhouse v2 loading
([#7303](#7303))
([3e48618](3e48618))
* **warehouse:** enable the clickhouse v2 driver behind a flag
([#7311](#7311))
([3ce1da5](3ce1da5))


### Bug Fixes

* race conditions while counting initial pending events can cause wrong
counting
([#7292](#7292))
([3efa718](3efa718))
* replay destinations not using the config corresponding to their
connected source type
([#7307](#7307))
([ee7aa93](ee7aa93))
* **router:** abort router-transform on proactive invalid_grant instead
of retrying (INT-6779)
([#7175](#7175))
([4d7348d](4d7348d))
* tracking plan merged config is cached without its event type
([#7314](#7314))
([624dd5c](624dd5c))


### Miscellaneous

* setattr/delattr hardening
([#7291](#7291))
([2855af4](2855af4))
* sync release v1.84.0 to main branch
([#7306](#7306))
([fa102b7](fa102b7))
* webhook reasons
([#7294](#7294))
([c298d59](c298d59))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants