Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pull release/v1.51.1 into main #2881

Merged
merged 7 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
1 change: 0 additions & 1 deletion src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ steps:
loopOverInput: true

- name: successfulEvents
debug: true
template: |
$.outputs.transform#idx{"output" in .}.({
"batchedRequest": .output,
Expand Down
17 changes: 1 addition & 16 deletions src/services/destination/postTransformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -148,7 +139,7 @@ export class DestinationPostTransformationService {
}

public static handleDeliveryFailureEvents(
error: ErrorResponse,
error: NonNullable<unknown>,
metaTo: MetaTransferObject,
): DeliveryResponse {
const errObj = generateErrorObject(error, metaTo.errorDetails, false);
Expand All @@ -161,12 +152,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;
}
Expand Down
18 changes: 6 additions & 12 deletions src/v0/destinations/marketo/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions test/__tests__/data/marketo_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down
Loading