Repository navigation
chore(release): pull release/v1.163.0 into main - #5708
Conversation
## What are the changes introduced in this PR? - Remove the unsupported default `lead` → `Lead` mapping from TikTok Ads Offline Events. - Replace the positive Lead processor fixtures with a regression case asserting the existing 400 InstrumentationError. - Preserve explicit and default `Purchase` mappings unchanged. ## What is the related Linear task? Resolves RUD-3387 ## Please explain the objectives of your changes below TikTok offline event sets do not support `Lead`. Plain `lead` track events now follow the transformer's existing invalid-event path instead of producing a payload TikTok rejects. The integrations-config update is handled independently. Existing saved configurations explicitly mapping an event to `Lead` remain trusted at runtime; config migration and additional validation are intentionally out of scope. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? A plain `lead` track event without an explicit mapping now returns a 400 InstrumentationError. `Purchase` and all other supported mappings are unchanged. ### Any new dependencies introduced with this change? N/A ### Any new generic utility introduced or modified. Please explain the changes. N/A ### Any technical or performance related pointers to consider with the change? No performance impact. Existing saved explicit `Lead` mappings are not migrated or blocked by this transformer change. ### Validation - `npm run lint` — passed - `npm run format:ci` — passed - `npm run test:ts -- component --destination=tiktok_ads_offline_events` — passed, 15/15 tests - Full `generate:secret-paths` — passed; generated artifact unchanged - `npm test -- --testPathPattern="tiktok_ads_offline_events" --no-coverage` — no co-located unit tests found for this destination - Scoped Lead search — no remaining Lead references in destination source or component fixtures <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? - [x] Any documentation changes needed with this change? - [x] Is the PR limited to 10 file changes? - [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.
👑 *An automated PR*
…nation (#5681) ## What are the changes introduced in this PR? Adds `MARKETO_AUDIENCE`, a batching-framework destination that adds leads to, and removes them from, an existing Marketo static list. It is used by rETL and by Lookout activations. - **`src/v0/destinations/marketo_audience/`** (`DestinationIntegration`, registered `{ routerTransform: true, batching: true }` in `src/features.ts`): - **`transformEvents` override (pre-stage), run once per batch before `super.transformEvents`:** - fetches the token once per call, using the shared `getAuthToken` and a `MARKETO_AUDIENCE_AUTH` cache. A failed token call gets a fixed reason per class (throttled, retry, or abort with its status), so Marketo's message text never reaches a row; a network failure with no HTTP status retries; - checks each row's own list and identifiers; - looks up emails in batches (up to 300 per `POST /rest/v1/leads.json?_method=GET`, with a `URLSearchParams` form body). A returned lead whose email wasn't requested is ignored, so it can't fail the other emails in the batch; a network failure with no HTTP status retries the rows. A 1003 (more than 1,000 leads match) halves the batch until single emails remain, so only the email that still returns 1003 fails, with "More than 1,000 Marketo leads match this email". A `nextPageToken` is followed even when `moreResult` is absent. - **Rows:** if the router input both adds and removes one lead on one list, every row for that lead fails, including a `dontBatch` row that the framework transforms in a separate call. Each later row naming a lead already seen goes in its own request. Every failure is a typed error on its own row; an unexpected pre-stage error fails the remaining rows with a retryable error and is logged with its error name and stack frames only (no message text, which can contain emails). - **`transformEvent`:** synchronous. Builds one `POST`/`DELETE /rest/v1/lists/{listId}/leads.json` per row with `Authorization: Bearer`. - **Batching:** `ChunkBatchStrategy` of 300 lead IDs, body `{ input }`. - **`delivery.ts`:** overrides 2xx, 4xx and 5xx, and every verdict goes through `perItem`, so the raw body stays out of job errors. 2xx: Marketo's HTTP-200 responses become one verdict per job, matched by lead ID (codes 1004/1015/1008, token 601/602 eviction, throttled 502/606/608/615 and daily quota 607, 1013, 603). 4xx: abort, except the proxy's synthetic 400 for a network failure (EPIPE, ENOTFOUND…), which retries because Marketo never saw the request. 5xx: retry with a fixed reason. No lead ID, email or Marketo message text appears in any reason. - **`secretPaths.json`:** `"MARKETO_AUDIENCE": ["headers.Authorization"]`, so Live Events masks the token. - **`test/integrations/destinations/marketo_audience/`:** router (8 cases), dataDelivery (9 cases), network mocks. ## What is the related Linear task? Resolves ACT2-1230 (parent ACT2-1013) ## Please explain the objectives of your changes below Spec: [rudder-specs#214](rudderlabs/rudder-specs#214), §6.3, decisions D5–D12. Pattern: HubSpot `hs_audience` (#5638). **Dependencies and merge order:** - `check:secret-paths` passes: the `marketo_audience` definition (rudder-integrations-config #2836, ACT2-1228) is merged to config `main`. - Operator values (router batch, proxy, throttle) are in rudderstack-operator ACT2-1233. Delivery needs `transformerProxy: true`. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? N/A. No shared code changes; `network.js` is untouched. Following the review of #5638, there's no per-destination log suppression: request bodies reach network logs only at the global `LOG_LEVEL=event`. ### Any new dependencies introduced with this change? N/A ### Any new generic utility introduced or modified. Please explain the changes. N/A. `getAuthToken` is reused unchanged. This destination strips the shared error when Marketo returns `expires_in: 0`, because that error contains the token. MARKETO and MARKETO_STATIC_LIST still have that leak; it's out of scope here. ### Any technical or performance related pointers to consider with the change? - **Token:** at most one identity call per batch. A failed fetch fails every remaining row once. 601/602 from the lookup or delivery evicts the cached token, per pod; a later `dontBatch` call on the same instance then fetches a new one. - **Daily quota (607):** throttled, as in MARKETO and MARKETO_STATIC_LIST. Rows retry until Marketo resets the quota at 12:00 AM CST, and the rETL sync stays running until then. - **Repeated leads:** if two rows resolve to the same lead with the same operation (the same Lead ID twice, or a Lead ID and an email for one lead), they go in separate requests via `internalGroupKey`. No request holds a lead ID twice, so delivery matches each result to its job by lead ID. - **Accepted for v1:** with `LOG_LEVEL=event`, network logs include the lookup body (up to 300 emails) and the identity response, the same as other destinations today (documented in the spec's observability notes). **Not covered (phase 2, waiting on Marketo credentials):** - `live.ts` is left out until `LIVE_SECRET_MARKETO_AUDIENCE` exists in Vault. The live matrix ignores `enabled: false` and would fail on every push. - Live checks: - POST and DELETE accept the JSON `input` body, and result IDs echo the sent IDs. - The status for re-adding a member and for removing a non-member. - Case-insensitive email lookup through the `_method=GET` form post. - Real 606/607/1008 bodies and paging. - What Marketo echoes for a merged lead. <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? - [ ] All changes manually tested? (mocked only; live checks in phase 2) - [ ] Any documentation changes needed with this change? - [ ] Is the PR limited to 10 file changes? (18 files: one new destination plus its tests and fixtures) - [x] Is the PR limited to one linear task? - [x] Are relevant unit and component test-cases added in **new readability format**? **Checks** (Node 22, the repo's pinned major): - The pre-commit hook (`test:ts`, `test:js`, lint-staged, commitlint) passed on every commit; the latest run had `test:ts` 128 suites and `test:js` 101 suites. - Component tests (`--destination=marketo_audience`) pass, and `tsc --noEmit` on src and test is clean. ### 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)
…ique lead IDs (#5704) ## What are the changes introduced in this PR? Follow-up to #5681 for MARKETO_AUDIENCE. It fixes the 3 items @lvrach left at c543f42, one commit each. Only `src/v0/destinations/marketo_audience` and its unit tests change. 1. **Cap on 1003 splits** (review comment 4323376958, then 4327977981, `lookup.ts`). A 1003 split sent its lookups one after another with no limit: if every 20th email matches more than 1,000 leads, one 300-email chunk made 163 calls. One `lookupLeadsByEmail` call (one per `transformEvents` call) now makes at most 19 lookup calls. Every page counts, and all chunks of the batch share the budget. 19 calls is what splitting one email out of a 300-email chunk takes when each lookup fits in one page (one lookup, then nine halvings of two), and it is under a fifth of Marketo's 100 calls per 20 s per instance. Without a 1003, a chunk reads at most 4 pages, so for up to 1,200 emails only a split reaches the cap. Emails still unresolved when the budget runs out retry with the fixed reason `Marketo lead lookup split limit reached (code 1003)`, and every email still gets exactly one outcome. A lookup cut short mid-pages drops its partial matches, so all of its emails retry. The retry carries fewer rows, because the rows split out or resolved in this pass are gone. 2. **Token memo** (review comment 4323376968, `routerTransform.ts`). A dontBatch row's call now uses the memoised token only while it equals the cached one. Otherwise it clears the memoised token and the pending request together. This fixes both reported cases: - After a refetch fails, the later dontBatch rows fail with that error without calling identity again. Before, 200 rows with a 401 identity made 201 calls. - When another request has cached a newer token B, the row takes B instead of sending its own older token A. 3. **Unique sent lead IDs** (review comment 4323376974, `delivery.ts`). A lead ID sent twice would let one result answer two jobs. That now retries the batch like any other unmatched response. The router can't send a duplicate today (`internalGroupKey` keeps IDs unique per request), so this is only a second defence. ## What is the related Linear task? Part of ACT2-1230 (parent ACT2-1013): review follow-ups from #5681 ## Please explain the objectives of your changes below #5681 was merged without these 3 non-blocking items so it would keep its approval; this PR fixes them. Both Marketo Flagsmith flags (`enable-marketo-audience-destination`, `enable-lookout-marketo-audience-activation`) are off in every environment, so no traffic reaches this code until the flags are turned on. Each item started as a failing test (known-bad run before each fix): | Item | Test | Before the fix | |---|---|---| | 1 | `stops after 19 lookup calls and retries the emails left` | 163 calls instead of 19 | | 1 | `counts each page call against the limit` (first email 1,001 leads, others 3) | 20 calls instead of 19 | | 1 | `shares one call limit across the chunks of one lookup` (1,200 emails, one 1003 per chunk) | 76 calls instead of 19 | | 2 | `fails later dontBatch rows without another identity call after a refetch fails` | 4 identity calls instead of 2 | | 2 | `sends the token another request cached, not its own older one` | `Bearer token-a` instead of `Bearer token-b` | | 3 | `retries every job: the same lead sent twice` | both jobs `success` instead of retry | ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? Only MARKETO_AUDIENCE, which is behind flags that are off. A chunk with many 1003 emails now retries the rows it could not resolve instead of making unlimited calls. ### Any new dependencies introduced with this change? N/A ### Any new generic utility introduced or modified. Please explain the changes. N/A. The shared `marketo/util.js` is unchanged. ### Any technical or performance related pointers to consider with the change? The cap covers one `transformEvents` call: every chunk of the batch and every page count against it. The router transforms each dontBatch row in a call of its own, so each of those calls gets its own budget. Not covered: Marketo calls from other `transformEvents` calls, requests or pods against the same instance. The cap limits one call; it doesn't pace the instance as a whole. <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? - [ ] All changes manually tested? (mocked only: unit and component tests) - [ ] Any documentation changes needed with this change? - [x] Is the PR limited to 10 file changes? (7 files) - [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. ### Checks run locally - marketo_audience unit tests: 160 passed (154 before, plus 6 new) - marketo_audience component tests (router + proxy v1): 17 passed - Pre-commit hook on each commit (latest e8ff489): ts 6527 passed / 2 skipped, js 2021 passed, lint-staged clean - `tsc --noEmit`, eslint and prettier clean; `generate:secret-paths` for marketo_audience gives the same `["headers.Authorization"]` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…termediates (#5707) ## What are the changes introduced in this PR? Moves both images to Node 22.23.4, the first 22.x release that rejects certificates issued under the eMudhra intermediates whose private keys were compromised (https://emudhra.we-have-a-problem.com/). - **`.nvmrc`** - 22.22.3 to 22.23.4, so CI runs on the patched release. - **`Dockerfile`** - `node:22.22.3-alpine3.22` to `node:22.23.4-alpine3.24`. The official image publishes 22.23.x only on alpine3.23 and alpine3.24, so the Alpine version has to move too; 3.24 is the one that stays supported longest. - **`Dockerfile-ut-func`** - Node now comes from the official `node:22.23.4-bookworm-slim` image (`COPY --from` of `node`, its headers and `node_modules`, plus the `npm`, `npx` and `corepack` links) instead of NodeSource's `setup_22.x`. NodeSource still serves 22.23.3, and `setup_22.x` installs whatever it has, so the UT image could not be pinned to a patched release that way. The version is now the pinned tag, the same release the main image runs, and Dependabot keeps it current. `python3` is installed explicitly because node-gyp needs it and the NodeSource package used to pull it in. - **`Dockerfile-ut-func`** (review suggestions) - `ubuntu:22.04` is pinned by index digest, and the first `RUN` adds `apt-get upgrade -y` and an explicit `ca-certificates`, so the system bundle that `curl` reads carries the Ubuntu fix too. The main image (destination transformations) moves too, because both images and CI share `.nvmrc`. ## What is the related Linear task? Part of https://linear.app/rudderstack/issue/SEC-607 ## Please explain the objectives of your changes below `fetch` and `fetchV2` in user transformations go through `node-fetch` on an `https.Agent` with no `ca` option (`src/util/ivmFactory.js`, `src/util/utils.js`). Nothing sets `--use-openssl-ca`, `--use-system-ca` or `NODE_EXTRA_CA_CERTS`: not this repo, not rudderstack-operator, not rudder-devops, where `NODE_OPTIONS` is only `--no-node-snapshot`. Node's bundled root store therefore decides what is trusted, and a patched system `ca-certificates` does not help. How this was verified: - **Official Node binaries against the advisory's twelve `*-emudhra.we-have-a-problem.com` test hosts**, using `https.get` with the default CA store. 22.22.3 (what ships today) and 22.23.3 both trust the six emSign-chained hosts. 22.23.4 rejects all twelve with `CERT_REVOKED`. - **The Alpine 3.24 move**, using `node:22.23.3-alpine3.24` as a stand-in until 22.23.4 is published: the `production` target builds (including `isolated-vm`), `/health` is up, and a `/transformation/test` run with `fetchV2` works. That run also trusted `dv-g3b-emudhra.we-have-a-problem.com` while the image had `ca-certificates-bundle-20261020-r0` installed, which confirms the system store is not on this path. Apart from `NODE_VERSION`, the image config (`Env`, `Entrypoint`, `Cmd`, `WorkingDir`) of the old and stand-in bases is identical. - **The UT image with Node copied from the official image**, using `node:22.23.3-bookworm-slim` as a stand-in: the `production` target builds, with `isolated-vm` 6.2.0 compiled from source through node-gyp and `python3`. `node`, `npm`, `npx` and `corepack` resolve from `/usr/local/bin` for the `node` user, `ca-certificates` is `20260816ubuntu0.22.04.1`, `/health` is up, and a `/transformation/test` run with `fetchV2` works. - **The final images on the pinned 22.23.4 bases** (built locally on arm64): both run Node v22.23.4, and a `/transformation/test` run with `fetchV2` in each gets `200` from `https://example.com/` and `CERT_REVOKED` from `https://dv-g3b-emudhra.we-have-a-problem.com/`. The arm64 manifests in both pinned indexes are the same images that rejected all twelve test hosts. - **Not run locally**: the unit and component suites. CI runs them on 22.23.4 through `.nvmrc`. Both bases are pinned by index digest. When Docker Hub adds the remaining architectures to these tags, the tags move to new indexes and Dependabot will offer the new digests; the pinned indexes already carry `linux/amd64` and `linux/arm64`. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? Node 22.23.x also ships Mozilla's earlier root removals: the bundled store drops from 145 to 116 roots between 22.22.3 and 22.23.4, including `DigiCert Global Root CA`, `DigiCert Assured ID Root CA` and `GTS Root R2`. A transformation that calls an endpoint whose chain still ends only at one of those roots will start failing TLS. The matching rudder-pytransformer change (rudderlabs/rudder-pytransformer#145) drops the same roots through certifi, so JS and Python transformations keep trusting the same set. In the UT image, `node`, `npm` and `npx` move from `/usr/bin` to `/usr/local/bin`, which comes first on the default `PATH`. ### Any new dependencies introduced with this change? N/A ### Any new generic utility introduced or modified. Please explain the changes. N/A ### Any technical or performance related pointers to consider with the change? Alpine 3.22 to 3.24 changes the musl and g++ toolchain that builds `isolated-vm`; the stand-in build above covers it on arm64 only. <hr> ### Developer checklist - [x] My code follows the style guidelines of this project - [ ] **No breaking changes are being introduced.** - [ ] All related docs linked with the PR? - [ ] All changes manually tested? - [ ] Any documentation changes needed with this change? - [x] Is the PR limited to 10 file changes? - [x] Is the PR limited to one linear task? - [ ] 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.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5708 +/- ##
==========================================
+ Coverage 92.21% 92.29% +0.08%
==========================================
Files 725 731 +6
Lines 40174 40633 +459
Branches 9321 9441 +120
==========================================
+ Hits 37045 37501 +456
- Misses 2945 2948 +3
Partials 184 184 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
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 |
lvrach
left a comment
There was a problem hiding this comment.
Release v1.163.0 reviewed (four lanes plus a risk analysis): GO with conditions.
Ships: #5707 (Node 22.23.4, the eMudhra CA fix), #5681 and #5704 (new marketo_audience destination), and #5702 (TikTok offline). All test workflows and the staging image builds (amd64 + arm64) are green.
Before prod
- Run the pod check on staging:
node -vmust be v22.23.4, andhttps://dv-g3b-emudhra.we-have-a-problem.com/must fail withCERT_REVOKED. - Bump the DT image before UT. Watch UT
fetch/fetchV2failures per transformation for about 30 minutes before the manually pinnedut-customer objects move.
Heads-up
- #5702 breaks bare
leadevents. A trackleadevent with no expliciteventsToStandardmapping now fails per event with a 400 (Event name (lead) is not valid…, transform.js:112). Before, it was sent asLead. The CHANGELOG says only "remove default Lead mapping", so the TikTok owner should know. - Rollback: going back to 1.162.0 removes the
marketo_audienceroute (404). That matters only if a workspace has already configured it. - #5704: the merged code is byte-identical to the approved head e8ff489.



👑 An automated PR