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.50.0 into main #2824

Merged
merged 18 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5dcc9f2
chore(release): pull main into develop post release v1.49.0 (#2801)
ujjwal-ab Nov 7, 2023
b41aebf
chore(dm): added stats for the user transformation batch request (#2…
abhimanyubabbar Nov 8, 2023
8be8294
chore: security upgrade crypto-js from 4.1.1 to 4.2.0 (#2768)
mihir-4116 Nov 8, 2023
c14b689
chore: security upgrade axios from 1.4.0 to 1.6.0 (#2772)
ktgowtham Nov 8, 2023
c02370e
fix: shopify redis metric when there is no data returned for a key (#…
anantjain45823 Nov 9, 2023
8eb1e1d
chore: import error classes from integrations lib (#2719)
Gauravudia Nov 10, 2023
0996e81
feat: introduce v1/source/sourceType endpoint (#2722)
anantjain45823 Nov 10, 2023
42bec54
chore: add error import from lib for missing integrations (#2818)
Gauravudia Nov 10, 2023
0e14296
feat: add clickId support for tiktok and pinterest destination (#2784)
ujjwal-ab Nov 10, 2023
195b48a
feat: move cdkV1 to cdkv2 component tests (#2804)
aashishmalik Nov 10, 2023
7b17293
chore(release): pull main into develop post release v1.49.1 (#2819)
sanpj2292 Nov 13, 2023
e82cef8
feat: add delivery_category as part of contents, remove flattening cu…
sandeepdsvs Nov 13, 2023
916ea4c
feat: adding support for future oauth facility in salesforce (#2746)
shrouti1507 Nov 13, 2023
ee1f473
feat: add delivery_category as part of contents, update flattening cu…
sandeepdsvs Nov 13, 2023
93a82bd
feat: use custom screen name amplitude (#2823)
aashishmalik Nov 13, 2023
b928461
chore(release): 1.50.0
web-flow Nov 13, 2023
a56d668
fix: source transform error stat (#2825)
chandumlg Nov 13, 2023
2055dab
fix: snapchat_conversion category mapping (#2826)
aashishmalik Nov 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

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.50.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.1...v1.50.0) (2023-11-13)


### Features

* add clickId support for tiktok and pinterest destination ([#2784](https://github.com/rudderlabs/rudder-transformer/issues/2784)) ([0e14296](https://github.com/rudderlabs/rudder-transformer/commit/0e1429663d167a2c5cded0d9130374eb586a18c0))
* add delivery_category as part of contents, remove flattening custom_data in FB conversions ([#2812](https://github.com/rudderlabs/rudder-transformer/issues/2812)) ([e82cef8](https://github.com/rudderlabs/rudder-transformer/commit/e82cef88e154d47519f0deeb60f55773f25fd3ad))
* add delivery_category as part of contents, update flattening custom_data in FB Pixel ([#2816](https://github.com/rudderlabs/rudder-transformer/issues/2816)) ([ee1f473](https://github.com/rudderlabs/rudder-transformer/commit/ee1f4733e82291375d85a6de8b8626ffdc8907b1))
* adding support for future oauth facility in salesforce ([#2746](https://github.com/rudderlabs/rudder-transformer/issues/2746)) ([916ea4c](https://github.com/rudderlabs/rudder-transformer/commit/916ea4c8d08f69b68b7795dd513a25a3cded55fa))
* introduce v1/source/sourceType endpoint ([#2722](https://github.com/rudderlabs/rudder-transformer/issues/2722)) ([0996e81](https://github.com/rudderlabs/rudder-transformer/commit/0996e816d3671c3e25561f76e3219be99225f24b))
* move cdkV1 to cdkv2 component tests ([#2804](https://github.com/rudderlabs/rudder-transformer/issues/2804)) ([195b48a](https://github.com/rudderlabs/rudder-transformer/commit/195b48ac0f438a200933e4bbb956fcc3941b7aed))
* use custom screen name amplitude ([#2823](https://github.com/rudderlabs/rudder-transformer/issues/2823)) ([93a82bd](https://github.com/rudderlabs/rudder-transformer/commit/93a82bd4856b462768d0213ae3de8b9b78e9858c))


### Bug Fixes

* source_transform_error stat label correction ([#2825](https://github.com/rudderlabs/rudder-transformer/issues/2825)) ([f3bcd7c](https://github.com/rudderlabs/rudder-transformer/commit/f3bcd7c9338ef96267be84f845c63f5234d37e33))
* shopify redis metric when there is no data returned for a key ([#2811](https://github.com/rudderlabs/rudder-transformer/issues/2811)) ([c02370e](https://github.com/rudderlabs/rudder-transformer/commit/c02370e38fabb581698baa00e1ddd3da93dc07fa))
* snapchat_conversion category mapping ([#2826](https://github.com/rudderlabs/rudder-transformer/issues/2826)) ([7acd004](https://github.com/rudderlabs/rudder-transformer/commit/7acd004e4290dfb5ea20402929041462eddb4496))

### [1.49.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.0...v1.49.1) (2023-11-10)


Expand Down
53 changes: 40 additions & 13 deletions package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-transformer",
"version": "1.49.1",
"version": "1.50.0",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down Expand Up @@ -63,14 +63,15 @@
"@koa/router": "^12.0.0",
"@ndhoule/extend": "^2.0.0",
"@pyroscope/nodejs": "^0.2.6",
"@rudderstack/integrations-lib": "^0.1.8",
"@rudderstack/workflow-engine": "^0.5.7",
"ajv": "^8.12.0",
"ajv-draft-04": "^1.0.0",
"ajv-formats": "^2.1.1",
"axios": "^1.4.0",
"axios": "^1.6.0",
"btoa": "^1.2.1",
"component-each": "^0.2.6",
"crypto-js": "^4.1.1",
"crypto-js": "^4.2.0",
"dotenv": "^16.0.3",
"flat": "^5.0.2",
"form-data": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/networkhandler/genericNetworkHandler.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { NetworkError } = require('@rudderstack/integrations-lib');
const { isHttpStatusSuccess } = require('../../v0/util/index');
const { proxyRequest, prepareProxyRequest } = require('../network');
const { getDynamicErrorType, processAxiosResponse } = require('../utils/networkUtils');
const { NetworkError } = require('../../v0/util/errorTypes');
const tags = require('../../v0/util/tags');

/**
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/utils/networkUtils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable eqeqeq */
const lodash = require('lodash');
const { isEmpty } = require('lodash');
const { AbortedError } = require('@rudderstack/integrations-lib');
const {
isHttpStatusRetryable,
isDefinedAndNotNullAndNotEmpty,
Expand All @@ -9,7 +10,6 @@ const {
isHttpStatusSuccess,
getErrorStatusCode,
} = require('../../v0/util');
const { AbortedError } = require('../../v0/util/errorTypes');
const tags = require('../../v0/util/tags');
const { HTTP_STATUS_CODES } = require('../../v0/util/constant');

Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v1/autopilot/transform.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { Utils } = require('rudder-transformer-cdk');
const { InstrumentationError } = require('../../../v0/util/errorTypes');
const { InstrumentationError } = require('@rudderstack/integrations-lib');

function identifyPostMapper(event, mappedPayload) {
const { message } = event;
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v1/dcm_floodlight/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
removeUndefinedAndNullValues,
isDefinedAndNotNull,
} = require('rudder-transformer-cdk/build/utils');
const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib');
const {
getIntegrationsObj,
isEmpty,
Expand All @@ -14,7 +15,6 @@ const {
} = require('../../../v0/util');
const { GENERIC_TRUE_VALUES, GENERIC_FALSE_VALUES } = require('../../../constants');
const { BASE_URL, BLACKLISTED_CHARACTERS } = require('./config');
const { ConfigurationError, InstrumentationError } = require('../../../v0/util/errorTypes');

// append properties to endpoint
// eg: ${BASE_URL}key1=value1;key2=value2;....
Expand Down
8 changes: 4 additions & 4 deletions src/cdk/v1/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ const path = require('path');
const basePath = path.resolve(__dirname);
ConfigFactory.init({ basePath, loggingMode: 'production' });

const tags = require('../../v0/util/tags');
const { generateErrorObject } = require('../../v0/util');
const {
InstrumentationError,
TransformationError,
ConfigurationError,
InstrumentationError,
} = require('../../v0/util/errorTypes');
} = require('@rudderstack/integrations-lib');
const tags = require('../../v0/util/tags');
const { generateErrorObject } = require('../../v0/util');

const defTags = {
[tags.TAG_NAMES.IMPLEMENTATION]: tags.IMPLEMENTATIONS.CDK_V1,
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v2/bindings/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const {
InstrumentationError,
ConfigurationError,
NetworkError,
} = require('../../../v0/util/errorTypes');
} = require('@rudderstack/integrations-lib');
const { isHttpStatusSuccess } = require('../../../v0/util');
const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils');
const tags = require('../../../v0/util/tags');
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/dcm_floodlight/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const lodash = require('lodash');
const { InstrumentationError } = require('@rudderstack/integrations-lib');
const { getValueFromPropertiesOrTraits, getHashFromArray } = require('../../../../v0/util');
const { GENERIC_TRUE_VALUES, GENERIC_FALSE_VALUES } = require('../../../../constants');
const { InstrumentationError } = require('../../../../v0/util/errorTypes');

// valid flag should be provided [1|true] or [0|false]
const mapFlagValue = (key, value) => {
Expand Down
8 changes: 4 additions & 4 deletions src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ steps:
"hashed_maids": .context.device.advertisingId,
"client_ip_address": .context.ip ?? .request_ip,
"client_user_agent": .context.userAgent,
"external_id": {{{{$.getGenericPaths("userId")}}}}
"external_id": {{{{$.getGenericPaths("userId")}}}},
"click_id": .properties.clickId
});
!.destination.Config.sendExternalId ? userFields = userFields{~["external_id"]} : null;
userFields = $.removeUndefinedAndNullAndEmptyValues(userFields);
Expand Down Expand Up @@ -185,14 +186,13 @@ steps:
- name: payload
template: |
$.outputs.eventNames.().({...$.outputs.basePayload, event_name: .})[]

- name: checkSendTestEventConfig
description: |
If sendTestEvent is enabled, we send test event to the destination
ref: https://help.pinterest.com/en/business/article/track-conversions-with-the-conversions-api
template: |
^.destination.Config.sendAsTestEvent ? {"test": true} : {}

^.destination.Config.sendAsTestEvent ? {"test": true} : {}

- name: buildResponseForBatchMode
description: In batchMode we return payload directly
Expand Down
10 changes: 3 additions & 7 deletions src/cdk/v2/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,9 @@ export function getCachedWorkflowEngine(
}

export async function executeWorkflow(workflowEngine: WorkflowEngine, parsedEvent: FixMe) {
try {
const result = await workflowEngine.execute(parsedEvent);
// TODO: Handle remaining output scenarios
return result.output;
} catch (error) {
throw getErrorInfo(error, isCdkV2Destination(parsedEvent), defTags);
}
const result = await workflowEngine.execute(parsedEvent);
// TODO: Handle remaining output scenarios
return result.output;
}

export async function processCdkV2Workflow(
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v2/utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import path from 'path';
import fs from 'fs/promises';
import { WorkflowExecutionError, WorkflowCreationError } from '@rudderstack/workflow-engine';
import { PlatformError } from '@rudderstack/integrations-lib';
import logger from '../../logger';
import { generateErrorObject } from '../../v0/util';
import { PlatformError } from '../../v0/util/errorTypes';
import tags from '../../v0/util/tags';
import { CatchErr } from '../../util/types';

Expand Down
1 change: 1 addition & 0 deletions src/constants/destinationCanonicalNames.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const DestHandlerMap = {
ga360: 'ga',
salesforce_oauth: 'salesforce',
};

const DestCanonicalNames = {
Expand Down
9 changes: 7 additions & 2 deletions src/controllers/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ export default class SourceController {
const { version, source }: { version: string; source: string } = ctx.params;
const integrationService = ServiceSelector.getNativeSourceService();
try {
const resplist = await integrationService.sourceTransformRoutine(
events,
const { implementationVersion, input } = ControllerUtility.adaptInputToVersion(
source,
version,
events,
);
const resplist = await integrationService.sourceTransformRoutine(
input,
source,
implementationVersion,
requestMetadata,
);
ctx.body = resplist;
Expand Down
Loading
Loading