Skip to content

feat(features): declare transformerProxy capability for GA destinations - #5546

Merged
shekhar-rudder merged 1 commit into
developfrom
feature/int-6881-transformer-proxy-capability
Sep 3, 2026
Merged

shekhar-rudder merged 1 commit into
developfrom
feature/int-6881-transformer-proxy-capability

Conversation

@shekhar-rudder

@shekhar-rudder shekhar-rudder commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

What

Adds an optional transformerProxy flag to DestinationCapabilities and declares it for the 40 destinations that already have the transformer proxy enabled fleet-wide, plus the TEST_DESTINATION fixture. /features gains a top-level map:

{ "routerTransform": { ... },
  "supportTransformerProxyV1": true,
  "transformerProxy": { "CUSTOMERIO": true, ... } }

Pairs with rudderlabs/rudder-server#7337, which reads the map and only falls back to Router.<DEST>.transformerProxy when a destination is not declared.

Behaviour change

None. All 40 declared destinations already have the env set to true, and the rudder-server side treats the capability as an alternative to the env rather than a replacement. The observable change comes later, when the env entries are removed and delivery keeps working.

Deliberately excluded

Screened all 47 destination directories containing a networkHandler or delivery.ts for an actually-exported handler:

  • GA — a false positive. src/v0/destinations/ga/networkHandler.js exports only gaResponseHandler, a deletion-API response parser. It exports no handler class, so networkHandlerFactory resolves GA to genericNetworkHandler. It is not proxy-capable despite the filename. The new invariant test exists to keep this class of mistake out.
  • CLICKSEND, MONDAY, POSTSCRIPT, FB — real proxy handlers, but proxy has never been enabled for them in any environment. Declaring them would turn proxy delivery on for the first time, which is a rollout, not a config consolidation. Worth doing, separately, with its own validation.
  • REDDIT_AUDIENCE — pre-GA. It has no destination definition in rudder-integrations-config, and reddit_audience/networkHandler.ts is marked as the legacy handler until GA.
  • AF, and ACTIVE_CAMPAIGN / ATTENTIVE_TAG / KLAVIYO / KOCHAVA / MAILCHIMP / REFINER / SINGULAR / SLACK / ZENDESK — proxy is enabled for these (AF fleet-wide, the rest per-customer) but they have no handler of their own and are delivered by genericNetworkHandler, so they cannot honestly declare the capability. They stay env-driven, and their env entries cannot be cleaned up until each is decided.

Test plan

  • src/features.test.ts: 9 passed, tsc --noEmit clean, prettier/eslint clean.
  • Three new assertions, the first of which is the one that matters:
    • every destination declaring transformerProxy genuinely implements it — checked from the export shape, which is what fails for GA. Asserted from source rather than by requiring networkHandlerFactory, which would pull the whole v0/util runtime (and isolated-vm) into a previously light unit suite.
    • the never-enabled destinations and GA stay off the map
    • AF stays off the map
  • test/apitests/service.api.test.ts and src/services/__tests__/misc.test.ts compare against defaultFeaturesConfig itself rather than a literal, so the new key needs no snapshot updates.
  • Two adjacent suites (src/services/__tests__/misc.test.ts, src/cdk/v2/utils.test.ts) fail locally on an isolated-vm NODE_MODULE_VERSION mismatch; verified identical failures on the base commit with the change stashed, so they are a local ABI problem and not from this diff. CI is the arbiter.

Follow-ups (not in this PR)

  • Remove Router.<DEST>.transformerProxy for these 40 from rudderstack-operator and rudder-devops once a transformer image at or above this release is pinned everywhere. That is the change that actually deletes the drift.
  • Decide CLICKSEND / MONDAY / POSTSCRIPT / FB individually.
  • Decide what to do about the 10 proxy-enabled destinations with no handler of their own.
  • Delete the two dead Router.throttler.<DEST>.transformerProxy keys.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HbD4xkXp922cKx6zAVQnbg

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 93f17a1d-ffd2-4075-b16d-4a3d6932d77f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.02%. Comparing base (c7dff70) to head (dbe7316).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5546   +/-   ##
========================================
  Coverage    93.02%   93.02%           
========================================
  Files          726      726           
  Lines        39146    39146           
  Branches      9178     9174    -4     
========================================
  Hits         36414    36414           
  Misses        2509     2509           
  Partials       223      223           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shekhar-rudder
shekhar-rudder marked this pull request as ready for review September 2, 2026 14:15
@shekhar-rudder
shekhar-rudder requested review from a team as code owners September 2, 2026 14:15
Comment thread src/features.ts Resolved
Comment thread src/features.ts Resolved
Adds an optional transformerProxy flag to DestinationCapabilities and declares
it for the 40 destinations that already have the transformer proxy enabled
fleet-wide, plus the TEST_DESTINATION fixture. /features gains a top-level
transformerProxy map, built by the same getCapabilityMap helper as the others.

Enablement lives today in Router.<DEST>.transformerProxy, hand-maintained
across 29 YAML files in rudderstack-operator and rudder-devops, with no
relationship to the transformer image that implements the proxy handler.
Whether a destination can be proxied is a fact this repo owns — it is true
exactly when the destination ships a networkHandler or a batching-framework
delivery.ts — so this publishes it from the repo that owns it and lets
rudder-server read it from /features. Same shape as the batching framework's
GA map.

Deliberately excluded:

- CLICKSEND, MONDAY, POSTSCRIPT, FB — ship working proxy handlers but have
  never had proxy enabled in any environment. Declaring them would turn proxy
  delivery on for the first time, which is a rollout, not a consolidation.
- REDDIT_AUDIENCE — pre-GA; no destination definition in
  rudder-integrations-config, and its networkHandler is marked legacy until GA.
- GA — src/v0/destinations/ga/networkHandler.js exports only a deletion-API
  response parser, no handler class, so GA resolves to genericNetworkHandler.
  It is not proxy-capable despite the filename.
- AF and the nine per-customer-only destinations (ACTIVE_CAMPAIGN,
  ATTENTIVE_TAG, KLAVIYO, KOCHAVA, MAILCHIMP, REFINER, SINGULAR, SLACK,
  ZENDESK) — proxy is enabled for them but they have no handler of their own,
  so they cannot declare the capability and stay env-driven.

Three assertions cover it, the first being the one that would have caught GA:
every declared destination genuinely implements the proxy, checked from the
export shape rather than by requiring networkHandlerFactory, which would pull
the v0/util runtime into a light unit suite.

No behaviour change: the env already says true for all 40, and the
rudder-server side treats the capability as an alternative to the env rather
than a replacement.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HbD4xkXp922cKx6zAVQnbg
@shekhar-rudder
shekhar-rudder force-pushed the feature/int-6881-transformer-proxy-capability branch from 514dd57 to dbe7316 Compare September 2, 2026 15:41
@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

@shekhar-rudder
shekhar-rudder merged commit 255a02b into develop Sep 3, 2026
43 checks passed
@shekhar-rudder
shekhar-rudder deleted the feature/int-6881-transformer-proxy-capability branch September 3, 2026 08:25
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.

2 participants