Repository navigation
feat(features): declare transformerProxy capability for GA destinations - #5546
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 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 @@
## 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. 🚀 New features to boost your workflow:
|
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
514dd57 to
dbe7316
Compare
|



What
Adds an optional
transformerProxyflag toDestinationCapabilitiesand declares it for the 40 destinations that already have the transformer proxy enabled fleet-wide, plus theTEST_DESTINATIONfixture./featuresgains 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>.transformerProxywhen 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
networkHandlerordelivery.tsfor an actually-exported handler:GA— a false positive.src/v0/destinations/ga/networkHandler.jsexports onlygaResponseHandler, a deletion-API response parser. It exports no handler class, sonetworkHandlerFactoryresolves GA togenericNetworkHandler. 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, andreddit_audience/networkHandler.tsis marked as the legacy handler until GA.AF, andACTIVE_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 bygenericNetworkHandler, 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 --noEmitclean, prettier/eslint clean.transformerProxygenuinely implements it — checked from the export shape, which is what fails for GA. Asserted from source rather than by requiringnetworkHandlerFactory, which would pull the wholev0/utilruntime (andisolated-vm) into a previously light unit suite.AFstays off the maptest/apitests/service.api.test.tsandsrc/services/__tests__/misc.test.tscompare againstdefaultFeaturesConfigitself rather than a literal, so the new key needs no snapshot updates.src/services/__tests__/misc.test.ts,src/cdk/v2/utils.test.ts) fail locally on anisolated-vmNODE_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)
Router.<DEST>.transformerProxyfor 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.CLICKSEND/MONDAY/POSTSCRIPT/FBindividually.Router.throttler.<DEST>.transformerProxykeys.🤖 Generated with Claude Code
https://claude.ai/code/session_01HbD4xkXp922cKx6zAVQnbg