From cd6c3b0672a0b17078627f28f6613a2ef1898ee7 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Mon, 4 Dec 2023 14:15:18 +0530 Subject: [PATCH 1/5] fix: marketo new field introduction backward compatibility --- src/v0/destinations/marketo/config.js | 18 ++++++------------ test/__tests__/data/marketo_input.json | 13 +++++++++---- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/v0/destinations/marketo/config.js b/src/v0/destinations/marketo/config.js index 16449ebbad..604be41dc0 100644 --- a/src/v0/destinations/marketo/config.js +++ b/src/v0/destinations/marketo/config.js @@ -14,24 +14,18 @@ const DESTINATION = 'marketo'; const formatConfig = (destination) => ({ ID: destination.ID, ...destination.Config, - customActivityEventMap: getHashFromArray( - destination.Config.rudderEventsMapping, - 'event', - 'marketoActivityId', - false, - ), + customActivityEventMap: destination.Config?.rudderEventsMapping + ? getHashFromArray(destination.Config.rudderEventsMapping, 'event', 'marketoActivityId', false) + : getHashFromArray(destination.Config.customActivityEventMap, 'from', 'to', false), customActivityPropertyMap: getHashFromArray( destination.Config.customActivityPropertyMap, 'from', 'to', false, ), - customActivityPrimaryKeyMap: getHashFromArray( - destination.Config.rudderEventsMapping, - 'event', - 'marketoPrimarykey', - false, - ), + customActivityPrimaryKeyMap: destination.Config?.rudderEventsMapping + ? getHashFromArray(destination.Config.rudderEventsMapping, 'event', 'marketoPrimarykey', false) + : getHashFromArray(destination.Config.customActivityPrimaryKeyMap, 'from', 'to', false), leadTraitMapping: getHashFromArray(destination.Config.leadTraitMapping, 'from', 'to', false), responseRules: destination.DestinationDefinition ? destination.DestinationDefinition.ResponseRules diff --git a/test/__tests__/data/marketo_input.json b/test/__tests__/data/marketo_input.json index 6a891fdea0..10fff935fc 100644 --- a/test/__tests__/data/marketo_input.json +++ b/test/__tests__/data/marketo_input.json @@ -170,11 +170,16 @@ } ], "createIfNotExist": true, - "rudderEventsMapping": [ + "customActivityPrimaryKeyMap": [ { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" + "from": "Product Clicked", + "to": "name" + } + ], + "customActivityEventMap": [ + { + "from": "Product Clicked", + "to": "100001" } ] } From b13f0a6340177a56417692ad7dcf3829d4990826 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 4 Dec 2023 17:00:24 +0530 Subject: [PATCH 2/5] fix: remove ErrorResponse type from postTransfomration delivery --- src/services/destination/postTransformation.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 1e99961045..dc5ab0644d 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -148,7 +148,7 @@ export class DestinationPostTransformationService { } public static handleDeliveryFailureEvents( - error: ErrorResponse, + error: NonNullable, metaTo: MetaTransferObject, ): DeliveryResponse { const errObj = generateErrorObject(error, metaTo.errorDetails, false); @@ -161,12 +161,6 @@ export class DestinationPostTransformationService { authErrorCategory: errObj.authErrorCategory, }), } as DeliveryResponse; - - // for transformer-proxy to maintain contract - const { response } = error; - if (response) { - resp.response = response; - } ErrorReportingService.reportError(error, metaTo.errorContext, resp); return resp; } From 24a2cd4d025b5ce01ef32a0ff3b0a43d340dd11d Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Wed, 6 Dec 2023 16:32:48 +0530 Subject: [PATCH 3/5] chore: cleanup of postTransformation.ts --- src/services/destination/postTransformation.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index dc5ab0644d..0b91eb7cc1 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -16,15 +16,6 @@ import { ErrorReportingService } from '../errorReporting'; import tags from '../../v0/util/tags'; import stats from '../../util/stats'; -type ErrorResponse = { - status?: number; - message?: string; - destinationResponse?: object; - statTags?: object; - authErrorCategory?: string | undefined; - response?: object | undefined; -}; - export class DestinationPostTransformationService { public static handleProcessorTransformSucessEvents( event: ProcessorTransformationRequest, From 45db59067d2272d13b08c355740707e7e53a3458 Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Wed, 6 Dec 2023 16:36:14 +0530 Subject: [PATCH 4/5] chore: remove logging in tiktok_audience (#2864) --- src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml b/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml index 3db4c405ad..a7fa855938 100644 --- a/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml +++ b/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml @@ -13,7 +13,6 @@ steps: loopOverInput: true - name: successfulEvents - debug: true template: | $.outputs.transform#idx{"output" in .}.({ "batchedRequest": .output, From 6dd0eb21a87246d9d04172715f24f09cdc50044a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 6 Dec 2023 11:19:32 +0000 Subject: [PATCH 5/5] chore(release): 1.51.1 --- CHANGELOG.md | 9 +++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 451051777d..b769b51a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.51.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.0...v1.51.1) (2023-12-06) + + +### Bug Fixes + +* marketo backward compatibility ([#2880](https://github.com/rudderlabs/rudder-transformer/issues/2880)) ([af6aebb](https://github.com/rudderlabs/rudder-transformer/commit/af6aebba9a9891fadc91fe2dc4ae4db4b1e269c9)) +* marketo new field introduction backward compatibility ([cd6c3b0](https://github.com/rudderlabs/rudder-transformer/commit/cd6c3b0672a0b17078627f28f6613a2ef1898ee7)) +* remove ErrorResponse type from postTransfomration delivery ([b13f0a6](https://github.com/rudderlabs/rudder-transformer/commit/b13f0a6340177a56417692ad7dcf3829d4990826)) + ## [1.51.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.1...v1.51.0) (2023-12-06) diff --git a/package-lock.json b/package-lock.json index 24e6a3bc3a..27655f81ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 457c0eecf2..a36ac26e9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": {