Repository navigation
chore(release): pull release/v1.167.1 into main - #5765
Conversation
👑 *An automated PR*
…lures 🔒 Scanned for secrets using gitleaks 8.30.1
## What are the changes introduced in this PR? Removes the #5735 entry from the v1.166.0 section of `CHANGELOG.md`. The changelog was generated in `chore(release): v1.166.0` before #5735 was reverted from the release in #5738, so it still listed #5735 as shipping. With the revert, nothing from #5735 ships in v1.166.0. Replaces #5740, whose commit message failed commitlint (`footer-max-line-length`: a body line starting with `#5735` is parsed as a footer). Same change, reworded commit message. ## What is the related Linear task? Related to INT-7442 ## Please explain the objectives of your changes below Keep the v1.166.0 changelog accurate. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? N/A — changelog only. ### 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? N/A <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? - [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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…lures (#5764) ## What are the changes introduced in this PR? Make the HS_AUDIENCE live membership suite recover from leftover list membership after a previous run crashes. Setup now removes any existing membership for the configured test contact and verifies that it is absent before registering cleanup, instead of failing immediately. Extract `removeMembership` so setup and cleanup share the membership-removal request and verification. Cleanup still runs only when the cleanup resource has been registered. ## What is the related Linear task? N/A — no Linear task linked. ## Please explain the objectives of your changes below Allow the live suite to start from a clean state when an interrupted run leaves the test contact in the sandbox list. The suite continues to validate the configured list and contact before removing leftover membership. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? Previously, setup failed if the test contact was already a list member. It now removes that membership and verifies its absence before continuing. This change is limited to the live integration test; production destination behavior is unchanged. ### Any new dependencies introduced with this change? None. ### Any new generic utility introduced or modified. Please explain the changes. None. `removeMembership` is a helper local to the HS_AUDIENCE live suite. ### Any technical or performance related pointers to consider with the change? Setup makes an additional removal request and verifies the result only when leftover membership exists. ### Validation - GitHub Actions: `live (hs_audience)` passed. - GitHub Actions: formatting and lint checks passed. <hr> ### Developer checklist - [ ] 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? - [ ] Is the PR limited to 10 file changes? - [ ] 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.
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.1 to 1.16.2. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/follow-redirects/follow-redirects/commit/e3b45a7a104fd84ab8e8914c78e9df4b930c1651"><code>e3b45a7</code></a> Release version 1.16.2 of the npm package.</li> <li><a href="https://github.com/follow-redirects/follow-redirects/commit/b0a7751e9cd64cd8eeb6ec67d2f206a9cc88d3f8"><code>b0a7751</code></a> Use Array.isArray.</li> <li><a href="https://github.com/follow-redirects/follow-redirects/commit/d96d1fe6781172705baf6ae2d3d56a2a99a52397"><code>d96d1fe</code></a> Add funding emergency notice.</li> <li>See full diff in <a href="https://github.com/follow-redirects/follow-redirects/compare/v1.16.1...v1.16.2">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>
…op duplicate (#5749) ## What are the changes introduced in this PR? Fixes two problems in the Intercom processor component tests. Tests only — no production code changes. **1. "No Version" identify tests didn't test a missing `apiVersion`** (`intercom-identify-test-11`, `-12`, `-13`) - They built the destination as `{ ...v1Destination, apiVersion: undefined }`, which sets `apiVersion` on the destination object, not in `Config`. `Config.apiVersion` stayed `'v1'`, so they exercised v1 (`/users`, `Intercom-Version: 1.4`). - Their success criteria also said the destination defaults to **v1**, but the transform defaults to **v2** when `Config.apiVersion` is not set (`procWorkflow.yaml`, `apiVersion` step). - They now use a `Config` without `apiVersion` and expect the v2 output the transform produces: | Test | Expected now | |---|---| | `intercom-identify-test-11` | search finds no contact → `POST /contacts` with `external_id` (from `context.traits.userId`) | | `intercom-identify-test-12` | search finds no contact → `POST /contacts` | | `intercom-identify-test-13` | search finds a contact → `PUT /contacts/<id>` | - Test 13's traits now use a distinct email (`[email protected]`). Tests 12 and 13 previously had identical traits, so they sent the same search and could not take different paths; with a distinct email, 13 covers the update path its description names. - Added the three `POST /contacts/search` mocks these cases need (`network.ts`). - Descriptions and success criteria now say the destination defaults to v2. **2. Duplicate validation test removed** `intercom-validation-test-5` was identical to `intercom-validation-test-4` (same input, output and description) apart from its id. ## What is the related Linear task? Related to INT-7442 ## Please explain the objectives of your changes below Make the Intercom processor tests test what their descriptions claim. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? N/A — tests only. ### 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? N/A <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? - [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. ### Testing - Intercom component tests: 72/72 pass (73 before; the drop is the removed duplicate). - Intercom unit tests (`src/cdk/v2/destinations/intercom`): 54/54 pass. - Secret paths: regeneration leaves `src/secretPaths/secretPaths.json` unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…#5763) [ACT2-1371](https://linear.app/rudderstack/issue/ACT2-1371) · [INT-7464](https://linear.app/rudderstack/issue/INT-7464/intercom-retl-v2-send-mapped-external-id-with-email-and-search) ## What changed and why Rows in a v2 rETL Intercom identify aborted with 410 `retry limit reached`. The real reply was a 409: the search used `external_id`, but `POST /contacts` carried only the email, so Intercom refused it when a contact held that email. The handler retries a 409 as search lag, so the row ran out of retries. New contacts also lost their `external_id`, so no later sync could find them. Setups with `lookup: external_id` now send `external_id` with the email, and one search by `external_id` or email decides the outcome: update the contact that holds the `external_id`, else claim a contact that holds the email with no `external_id`, else create. A new user takes one Intercom call and a claim two. When a full page of 50 results has no `external_id` match, a second search by `external_id` alone covers a match past page one. Other setups do not change. The search reports whether it matched by `external_id` or by email, so only a contact found by `external_id` can get a company detach, never a claimed one. Real Intercom answers `POST /contacts` with an email and a new `external_id` as follows: | Contact holding the email | Intercom's answer | This PR | |---|---|---| | None | creates | `POST` | | Different `external_id` | creates a separate user | `POST` | | No `external_id` | 409 | `PUT` on that contact, adding the `external_id` | A `PUT` with a different `external_id` answers 200 and silently replaces it, and Intercom has no conditional update. So a claim has these guards: - A direct `GET` confirms the contact is still free, because search lags behind writes. - The `GET` also confirms the contact still holds the row's email. - An `external_id` match needs the contact to actually hold one, so the IDs `"null"` and `"undefined"` never match an email-only contact. - Only the first row in a router call claims a contact. The others answer 429 and retry, because the rETL retry limit applies only from 500 up. | Record | Before | After | |---|---|---| | rETL identify, `external_id` + email, `lookup: external_id` | `external_id` dropped | sent; search by `external_id`, then claim by email on a miss | | rETL identify, `external_id` + email, no such lookup | `external_id` dropped | unchanged | | rETL identify, no email | `external_id` sent | unchanged | | rETL track or group | | unchanged | | API v1, event stream | | unchanged | ## Please review these points - **A race remains.** Rows on different router workers at the same moment can both pass the `GET` and both `PUT`, and the later one replaces the earlier ID. This was not reproduced on mini. It needs rows that share an email, and an email-only contact that holds it. - **A contact with no `external_id` takes the row's ID and field values.** We cannot tell whose contact it was. The customer needs to agree to this before release. - **Rate limits.** A row that misses makes one more search, and a claim makes one `GET`. Deferred rows answer 429, which feeds pickup throttling where adaptive throttling is on. ## Review panel Self-check with 6 lenses and Codex, then a Claude and Codex adversary on each of 6 claims. The single search was checked against the earlier two-search flow over 40,000 simulated cases, and Intercom's `external_id` search was confirmed to be exact (case and spaces matter). Findings were fixed on this branch. - Explainer: https://rudder-office.fly.dev/docs/intercom-retl-409-explainer.html - Proof: https://rudder-office.fly.dev/docs/intercom-retl-409-proof.html - Reviewed sha: `7b9ea25cc` ## Verification Real rETL syncs on mini through rudder-server and the transformer, delivered to the Intercom test workspace. This ran a build of `7b9ea25cc`. | Row state | Stock | This PR | |---|---|---| | New user | Created, `external_id` lost | Created with `external_id` | | Email-only contact | 410 | Same contact, now with the ID | | Email held by another user | 410 | Separate contact, the other user unchanged | | Contact found by ID | Updated | Updated | | Three users share an email an email-only contact holds | Not run | Three contacts with three IDs | | Re-sync straight after | Not run | 7 of 7 delivered, nothing moved | - Live Integration Tests on real Intercom: passed on `7b9ea25cc`, including 3 new scenarios - `npm run test:ts -- component --destination=intercom`: 80 passed - `npm test -- --testPathPattern="destinations/intercom" --no-coverage`: 84 passed ## Not in this PR - A search-lag 409 can still end as a masked 410 inside the rETL retry limit. - Event-stream destinations can get the same 409. - A row whose email-only contact is past the first 50 search results still gets the 409. It needs over 50 users on one email. - `sendAnonymousId` can replace an `external_id` on a contact found by email. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…5761) ## What are the changes introduced in this PR? Gainsight PX look-ups that time out or get no HTTP response are now retried as 500s. Before this change they were aborted as permanent 400s. The router transform makes a GET call before every identify and group event to check whether the user or account already exists. When that call failed, `handleErrorResponse` (`gainsight_px/util.js`) used the provider's status code only if the failed response had a body. A timeout or connection reset has no response, so it fell back to a hard-coded **400**, and the event was aborted with `error while fetching user: ` (nothing after the colon) instead of being retried. In one recent incident, the Gainsight API was slow and returning 500s for about an hour during a daily full sync. The look-ups that hit our 60s request timeout were aborted, and about 800 events were permanently lost from a single destination in roughly 15 minutes. **Fix:** `handleHttpRequest` already returns a `processedResponse`. Its status comes from the shared `processAxiosResponse` → `nodeSysErrorToStatus` mapping, which gives 500 for `ECONNABORTED`, `ETIMEDOUT` and `ECONNRESET`. gainsight_px was ignoring it and parsing the raw axios error itself. All three calls (the user/account existence check, `createAccount` and `updateAccount`) now read `processedResponse`. ## What is the related Linear task? N/A. No ticket has been filed yet. ## Please explain the objectives of your changes below ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? | failure on the GET/POST/PUT | before | after | |---|---|---| | timeout / connection reset (no response) | 400, aborted, `error while fetching user: ` | 500, retried, `… "[ECONNABORTED] :: Connection aborted"` | | 5xx with an empty body | 400, aborted | the real status, retried | | DNS failure / unknown socket error | 400 | 400 (shared mapping, unchanged) | | 4xx/5xx with a body, expected 404/400 with a body | unchanged | unchanged | ### Known review findings The review raised two edge cases that change behaviour. They are deliberately **not** handled here: neither has been reproduced, and in the last 30 days Gainsight PX returned only 200/404/429/500 to the GET look-ups, with no account create or update calls at all. - **Empty-body expected status** (for example an empty 400 on account update). Before, this aborted as 400. Now it returns `err: ''`, and the identify path's `if (err)` reads that as success, so the account update is skipped silently. - **Unexpected 2xx** (for example 200 where 201 was expected). Before, this aborted as 400. Now it throws with status 200. rudder-server treats a status-200 output as a successful transform, fails to parse the missing request (599), and retries until the job expires. ### Any new dependencies introduced with this change? N/A ### Any new generic utility introduced or modified. Please explain the changes. - **Live harness:** `expectedFailure` gains `transformStatusCode`. Pipeline steps used to fail on *any* non-2xx `/routerTransform` output, so the harness couldn't say "this transform must fail with status X". The new field lets it, and it is documented in `test/integrations/live/README.md`. - The field sits inside `expectedFailure`, following the harness's "one field for every kind of failure" rule. - The failure diff contains only status codes, so router outputs (which carry credentials) never reach the jest output. - Unit tests are in `runPipelineStep.test.ts`. - The fix itself reuses the existing `processAxiosResponse`. ### Any technical or performance related pointers to consider with the change? - `drip`, `mailchimp` and `yahoo_dsp` have the same "parse the raw error, default to 400" pattern on transform-time look-ups. They are left for a follow-up so this change stays limited to one destination. - The `err === null` / `if (err)` "not found" contract in `transform.js` (identify/group) is left untouched. Replacing it with an explicit not-found flag would also close the first known finding above. - Testing: - **Live**, against the real Gainsight PX API with the e2e sandbox key. I ran the actual router transform with `REQUEST_TIMEOUT_IN_MS=1`. Before the fix it returned `400 "error while fetching user: "`; after the fix it returns `500`. The control run with the default timeout returned `200` both times. - **Unit tests** (`util.test.ts`): a timeout gives a retryable 500, and a 404 still means "user not found". - **Live spec** (`test/integrations/destinations/gainsight_px/live.ts`, picked up by the live CI matrix automatically): - `gainsight-px-identify-existing-user`: an identify for the sandbox user goes through lookup → PUT `/users/{id}`, and the run-unique `title` is read back from Gainsight. This uses the standard `title` field because the `gainsight_px_audience` spec writes custom attributes on the same user. - `gainsight-px-identify-lookup-timeout`: a setup step adds a URL-scoped axios interceptor (`timeout: 1`) on PX requests, removed at scenario cleanup. The step expects `expectedFailure: { transformStatusCode: 500 }`. Run against the unfixed `util.js`, this scenario **fails** (gets 400); with the fix it passes. - **Vault:** `LIVE_SECRET_GAINSIGHT_PX` needs `config.productTagKey` (the sandbox product key) added, because PX rejects any other `propertyKeys` value with a 400. I tested locally with the key read from the sandbox user. Without it, both scenarios fail in CI with "product tag key is required". - **Existing suites:** all gainsight_px unit and component tests pass. <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? - [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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
There was a problem hiding this comment.
🟡 Changes recommended
Cross-call contact adoption can silently overwrite another row’s external_id, while incomplete lookup handling causes avoidable 409 retries and the live-test assertion can miss missing jobs.
4 open issues
What changed in this PR
Merges release v1.167.1 into main, bringing destination fixes and expanded test coverage to rudder-transformer.
Changes:
- Preserves mapped Intercom external IDs alongside email and adds contact-adoption handling.
- Makes Gainsight PX lookup timeouts retryable and adds live transform-failure assertions.
- Improves HubSpot audience live-test recovery and updates release metadata.
| File | Description |
|---|---|
test/integrations/live/types.ts |
Adds expected transform-failure status configuration. |
test/integrations/live/runPipelineStep.ts |
Checks expected transform failures without delivery. |
test/integrations/live/runPipelineStep.test.ts |
Tests transform-failure expectations. |
test/integrations/live/README.md |
Documents transform-failure assertions. |
test/integrations/destinations/intercom/router/data.ts |
Covers competing contact claims within a batch. |
test/integrations/destinations/intercom/processor/validationTestData.ts |
Removes an obsolete identify-validation case. |
test/integrations/destinations/intercom/processor/trackTestData.ts |
Verifies unchanged track external-ID behavior. |
test/integrations/destinations/intercom/processor/identifyTestData.ts |
Expands identity-matching and default-version coverage. |
test/integrations/destinations/intercom/network.ts |
Adds contact-search and direct-read mocks. |
test/integrations/destinations/intercom/live/spec.ts |
Adds live external-ID and shared-email scenarios. |
test/integrations/destinations/hs_audience/live.ts |
Clears leftover sandbox membership before testing. |
test/integrations/destinations/gainsight_px/live.ts |
Adds live identify and lookup-timeout scenarios. |
src/v0/destinations/gainsight_px/util.test.ts |
Tests timeout classification and account responses. |
src/v0/destinations/gainsight_px/util.js |
Preserves processed network-error statuses. |
src/cdk/v2/destinations/intercom/utils.test.js |
Tests contact selection and repeat-claim handling. |
src/cdk/v2/destinations/intercom/utils.js |
Adds contact adoption and per-call claim protection. |
src/cdk/v2/destinations/intercom/rtWorkflow.yaml |
Applies claim checks to router results. |
src/cdk/v2/destinations/intercom/procWorkflow.yaml |
Preserves opted-in external IDs and selects contact updates. |
package.json |
Bumps release version to 1.167.1. |
package-lock.json |
Updates release version and follow-redirects. |
CHANGELOG.md |
Records release fixes and adjusts prior entries. |
Review effort: Balanced
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5765 +/- ##
==========================================
+ Coverage 92.42% 92.44% +0.02%
==========================================
Files 741 741
Lines 41059 41119 +60
Branches 9648 9589 -59
==========================================
+ Hits 37949 38013 +64
- Misses 2848 2923 +75
+ Partials 262 183 -79 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|





👑 An automated PR