Repository navigation
chore(release): pull release/v1.164.0 into main - #5714
Conversation
…reach their own list
groupRouterTransformEvents read `ev.context?.sources?.job_id`, but router
inputs are `{ message, metadata, destination, connection }`, so the key was
always 'default'. Every rETL sync on one destination fell into one group, and
the batching framework built the integration from that group's first
connection: rows from a second concurrent sync went to the first sync's
list or audience while both runs reported success (ACT2-1257).
Key on `metadata.sourceJobId`, falling back to
`message.context.sources.job_id`. Event-stream jobs carry neither, so their
grouping is unchanged.
- rewrite the grouping unit tests with the real router input shape
- add a two-connection router case for custom_audience, reddit_audience,
iterable_audience, hs_audience and braze_audience
- update marketo_static_list, mailchimp, google_adwords_offline_conversions
and customerio_audience fixtures: rows with and without a source job id
now batch separately (same per-row output, regrouped or reordered)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
rudder-server's router request metadata has no source job field, so the `metadata.sourceJobId` branch never matched in production; the source job id reaches the transformer only as `message.context.sources.job_id`. Key on that alone, and make the tests use the shape the router actually sends: - grouping unit tests build the job id on the message only - the five two-connection router cases give each row its own `message.context.sources.job_id` and a `metadata.sourceId` matching its connection, instead of `metadata.sourceJobId` Co-Authored-By: Claude Opus 5.5 <[email protected]>
… read one connection per group linkedin_audience, fb_custom_audience (VDM v2), google_adwords_remarketing_lists (VDM v2 legacy and Data Manager), customerio_audience and zoho (VDM v2) take the list, audience or module from one connection for the whole router group, so they had the same wrong-list bug as the five audience destinations covered earlier (ACT2-1257). Each new case sends two rows from two syncs (own connection, own message.context.sources.job_id) and expects one request per target; each fails on the old grouping key. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… tests Review on #5705 found two more destinations that take their target from one row for the whole group: customerio (VDM v2 objects read `object` from the group's connection) and hs rETL (path, objectType and identifierType from inputs[0]). Add a two-sync router case for each; both fail on the old grouping key (event rows sent as person identifies; company rows sent to the contacts upsert endpoint). Also from review: - grouping unit tests assert which rows land in each group, and cover sources without job_id and a missing destination id again - JSDoc describes the source job id key - customerio_audience error-case comments follow output order Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r payloads Give the customerio rows a destination ID and the hs rows the job_run_id / task_run_id fields rudder-sources sends. Co-Authored-By: Claude Opus 5.5 <[email protected]>
👑 *An automated PR*
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.0 to 1.16.1. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/follow-redirects/follow-redirects/commit/46301256333c90b7faac7aa126effe72ec16d16e"><code>4630125</code></a> Release version 1.16.1 of the npm package.</li> <li><a href="https://github.com/follow-redirects/follow-redirects/commit/9865ca45490e4d0f7b6944870318408344570aff"><code>9865ca4</code></a> Support key/value header arrays.</li> <li><a href="https://github.com/follow-redirects/follow-redirects/commit/080a76d0e125b37bf81717368a61d5dc37aa56c8"><code>080a76d</code></a> Escape all RegExp modifiers.</li> <li>See full diff in <a href="https://github.com/follow-redirects/follow-redirects/compare/v1.16.0...v1.16.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/rudderlabs/rudder-transformer/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…reach their own list (#5705) ## What are the changes introduced in this PR? When two rETL syncs feed the same audience destination and their runs overlap, rows from one sync are sent to the other sync's list, and both runs report success. Cause: rudder-server sends every job of a destination in one `/routerTransform` call. `groupRouterTransformEvents` is meant to split those rows per source job (that was #3496), but it read `ev.context?.sources?.job_id`. Router inputs are `{ message, metadata, destination, connection }`, so `context` is under `message`, and the key was always `'default'`. Every sync on a destination landed in one group, and the batching framework builds the integration from the group's first connection (`processDestinationIntegration.ts`), so every request went to that connection's list. Fix: key on `ev.message?.context?.sources?.job_id`. That is the only place the source job id reaches the router transform: rudder-server's router metadata (`router/types/types.go` `JobMetadataT`) has no source job field. Exposed on `develop` (each takes the list / audience / module from one connection for the whole group): | Destination | Where the target is read | Path | | -- | -- | -- | | Custom Activation (`custom_audience`) | `this.connectionConfig` (endpoint `audienceId`, `isHashRequired`) | batching framework | | Reddit Audience | `audienceId` from `this.connectionConfig` | batching framework | | Iterable Audience | `this.connection` | batching framework | | HubSpot Audience | `audienceId` from `this.connection` | batching framework | | Braze Audience | `customAttributeName` from `this.connectionConfig` | batching framework | | LinkedIn Audience | `audienceId` from the first row of each action group (`transform.ts`) | v0 router | | FB Custom Audience (VDM v2) | `groupedRecordInputs[0].connection` (`recordTransform.ts`) | v0 router | | Google Ads Remarketing Lists, legacy and Data Manager (VDM v2) | `[0].connection` (`recordTransform.ts`, `dataManager/recordTransform.ts`) | v0 router | | Customer.io Audience | `inputs[0].connection` (segment, `id_type`) | v0 router | | Zoho (VDM v2) | `inputs[0].connection` (`object` module, `identifierMappings`) | cdk v2 | | Customer.io (VDM v2 object destination) | `object` from `this.connection` (`vdmV2ObjectDestination.ts`): an event sync's rows went out as person identifies | batching framework | | HubSpot (rETL) | path and `objectType` / `identifierType` from `inputs[0]` (`hs/transform.ts`, `retl-transform.ts`): a companies sync's rows went to the contacts upsert endpoint | v0 router | Gainsight PX, Marketo and Pinterest Audience read each row's own connection and put the target in that row's request, so they were already safe (unchanged here). When the two connections have different `isHashRequired` (Custom Activation, Reddit), the second sync's rows were checked against the first sync's flag and rejected as instrumentation errors ("Hashing is disabled but the value … appears to be unhashed"); nothing was sent unhashed. Explainer: https://rudder-office.fly.dev/docs/audience-wrong-list-concurrent-syncs.html ## What is the related Linear task? Resolves ACT2-1257 ## Please explain the objectives of your changes below - `src/v0/util/index.js`: grouping key fix (one line) and comment. - `src/v0/util/index.test.js`: grouping tests rewritten with the real router input shape. The old tests put `context` at the top level, a shape production never sends, so they passed on the broken key. - A two-connection router component case for every exposed destination: `custom_audience`, `reddit_audience`, `iterable_audience`, `hs_audience`, `braze_audience`, `linkedin_audience`, `fb_custom_audience`, `google_adwords_remarketing_lists` (legacy and Data Manager), `customerio_audience`, `zoho`, `customerio` (person + event objects), `hs` (rETL contacts + companies). Two rows on one destination, each with its own `message.context.sources.job_id`, connection and matching `metadata.sourceId` (the shape rudder-server sends), asserting each request goes to its own list / module. Each case fails on the old key; the only other cases that fail there are the four regrouped fixtures below, which return to their old grouping. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? Rows that carry different source job ids, or a job id vs none, are now transformed in separate groups for every router destination. That is what #3496 intended. Effects: - Concurrent rETL syncs on one destination become separate vendor batches, each on its own connection (the fix). - Traffic from the stock SDKs and replays carries no `context.sources.job_id`, so its batching is unchanged. Events that do carry one (cloud/ETL extract sources run by rudder-sources, or a client that sets `context.sources.job_id` itself) now batch per job, in smaller batches. - A batch that mixes rETL rows with event-stream rows now goes out as two batches, and router output order can change. rudder-server validates router responses as a set of job ids, so no job is dropped or mis-attributed. - Delivery order for one user can change when that user's rows sit in two groups of one router call. rudder-server sends batched requests sorted by their lowest job id (`router/worker.go:442-444`), so with SDK rows j1, j3 in one group and an rETL row j2 in another, `[j1, j3]` is delivered before `[j2]` and j2's older value lands last, even when every request succeeds. If the second request fails, j3 is already delivered while j2 retries. Before, all three shared one request. Groups of an audience destination write different lists, so this matters only for destinations that mix one user's rETL and event-stream rows; dynamic-config grouping already behaves this way. - Braze with `supportDedup`: each group builds its own dedup lookup against Braze's current state (`braze/transform.ts:618-630`) and groups run concurrently, so when one user's rETL row and SDK row land in the same router call, the SDK group can drop the newer update as "Duplicate user detected". Rare; noted rather than handled here. Four existing fixtures had such mixes and were updated: `marketo_static_list` and `customerio_audience` (reorder only), `mailchimp` and `google_adwords_offline_conversions` (one batch becomes two, same rows and payloads). ### Any new dependencies introduced with this change? N/A ### Any new generic utility introduced or modified. Please explain the changes. `groupRouterTransformEvents` (shared by `nativeIntegration.ts` and `cdkV2Integration.ts`): grouping key reads the job id from `message.context.sources.job_id` instead of the non-existent top-level `context`. ### Any technical or performance related pointers to consider with the change? - Smaller vendor batches only where one router call holds rows from several source jobs (concurrent rETL syncs; cloud/ETL or profiles sources that stamp `context.sources.job_id` sharing a destination with other traffic). At most one extra partial batch per extra group. - `google_adwords_offline_conversions` store sales: a mixed call now creates one offline user data job per group instead of one shared job. - Known edge, not changed here: a user transformation on an rETL connection that rebuilds the message without `context.sources` puts that sync's rows back in the default group. ### Verification - Unit: `src/v0/util/index.test.js` 223/223. - Component: `npm run test:ts -- component --feature=router` 593 passed, 1 skipped. - `npm test -- src/v0 src/services src/cdk src/v1`: 3293 passed. - `check:secret-paths` against integrations-config `main`: no drift. - Local stack (rudder-mini), one Custom Activation destination, two mirror connections `LIST_A` / `LIST_B` from two 500-row tables, both full syncs started in the same second: | Transformer | `/LIST_A` | `/LIST_B` | Requests carrying the other sync's rows | Both runs reported | | -- | -- | -- | -- | -- | | stock `develop` image (old key) | 1,000 (500 from table B) | 0 | 5 | 500 succeeded, 0 failed | | this branch @ 98cf63f | 500, all table A | 500, all table B | 0 | 500 succeeded, 0 failed | ### Pre-ready review Independent review before opening, then a five-lens review panel (security, correctness, product, ops, coherence) with blinded adversarial checks on each finding and load-bearing claim. Findings and rulings: - Important, fixed: the first version keyed on `metadata.sourceJobId` first, and the new component cases only set that field. rudder-server never sends it on router requests, so the tests covered a path production doesn't take. Fixed in 98cf63f: key only on the message job id; cases now use the shape the router sends. - Minor, fixed: comment overstated "event-stream jobs share one group"; reworded. Fixture `metadata.sourceId` now matches each row's connection. - Should-fix, fixed: the first draft listed 5 exposed destinations; LinkedIn, FB Custom Audience, Google Ads Remarketing Lists (both paths), Customer.io Audience and Zoho have the same pattern. Review on the PR then added Customer.io (VDM v2 objects) and HubSpot rETL. Confirmed by executing two-connection inputs on base vs head, and each now has a test. - Nit, documented above: per-user delivery order across groups. - Minor, noted above: user transformations that drop `context.sources`. A possible follow-up is to also key rETL rows on `metadata.sourceId` (which the router does send) so a transformation cannot merge two syncs. - Not an issue: two connections cannot share a `job_id` (config-backend starts each rETL sync with its connection id; `unique_source_destination` on connections), and one connection keeps one `job_id` across runs and retries (checked in live `rt_jobs`). <hr> ### Developer checklist - [x] My code follows the style guidelines of this project - [x] **No breaking changes are being introduced.** - [x] All related docs linked with the PR? - [x] All changes manually tested? - [ ] Any documentation changes needed with this change? - [ ] Is the PR limited to 10 file changes? (32: 2 source/unit files, 30 component fixtures) - [x] Is the PR limited to one linear task? - [x] Are relevant unit and component test-cases added in **new readability format**? ### Reviewer checklist - [ ] Is the type of change in the PR title appropriate as per the changes? - [ ] Verified that there are no credentials or confidential data exposed with the changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
## What are the changes introduced in this PR? add activation team as codeowner ## Please explain the objectives of your changes below To make activation team self reliant on audience related integrations ### Reviewer checklist - [ ] Is the type of change in the PR title appropriate as per the changes? - [ ] Verified that there are no credentials or confidential data exposed with the changes.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5714 +/- ##
==========================================
+ Coverage 92.29% 92.31% +0.02%
==========================================
Files 731 732 +1
Lines 40633 40743 +110
Branches 9441 9485 +44
==========================================
+ Hits 37501 37612 +111
+ Misses 2948 2947 -1
Partials 184 184 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



👑 An automated PR