Skip to content

Commit

Permalink
Merge branch 'develop' into feat.hs-batching
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-4116 authored Dec 13, 2023
2 parents 1adef48 + b5eaced commit a847359
Show file tree
Hide file tree
Showing 22 changed files with 286 additions and 29 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2.9.1
uses: docker/setup-buildx-action@v3.0.0

- name: Login to DockerHub
uses: docker/[email protected]
Expand All @@ -50,7 +50,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Build Docker Image
uses: docker/build-push-action@v4.1.1
uses: docker/build-push-action@v5.1.0
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -66,7 +66,7 @@ jobs:
docker run ${{ inputs.build_tag }} npm run test:ts:ci
- name: Build and Push Multi-platform Images
uses: docker/build-push-action@v4.1.1
uses: docker/build-push-action@v5.1.0
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -91,7 +91,7 @@ jobs:
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2.9.1
uses: docker/setup-buildx-action@v3.0.0

- name: Login to DockerHub
uses: docker/[email protected]
Expand All @@ -100,7 +100,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Build Docker Image
uses: docker/build-push-action@v4.1.1
uses: docker/build-push-action@v5.1.0
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -116,7 +116,7 @@ jobs:
docker run ${{ inputs.build_tag }} npm run test:ts:ci
- name: Build and Push Multi-platform Images
uses: docker/build-push-action@v4.1.1
uses: docker/build-push-action@v5.1.0
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -138,7 +138,7 @@ jobs:

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.9.1
uses: docker/setup-buildx-action@v3.0.0

- name: Login to DockerHub
uses: docker/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v8.0.0
- uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.PAT }}
operations-per-run: 200
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/report-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 1

- name: Setup Node
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 1

- name: Setup Node
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

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.52.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.1...v1.52.0) (2023-12-12)


### Features

* onboard msl changes for new record event ([#2644](https://github.com/rudderlabs/rudder-transformer/issues/2644)) ([36d3f25](https://github.com/rudderlabs/rudder-transformer/commit/36d3f258ed5ea4ba1899c8b2cae8203bf73d90ed)), closes [#2813](https://github.com/rudderlabs/rudder-transformer/issues/2813)
* onboard reddit cloud mode destination ([#2829](https://github.com/rudderlabs/rudder-transformer/issues/2829)) ([babb89a](https://github.com/rudderlabs/rudder-transformer/commit/babb89a5bf6d1b84d1319b967953c7c1b6de7c2c))
* tiktok_ads: add support for custom events ([#2891](https://github.com/rudderlabs/rudder-transformer/issues/2891)) ([091354c](https://github.com/rudderlabs/rudder-transformer/commit/091354c4427b33c9f8ac2678db3a4ab38b008e7d))


### Bug Fixes

* active_campaign error handler ([#2895](https://github.com/rudderlabs/rudder-transformer/issues/2895)) ([5a6d296](https://github.com/rudderlabs/rudder-transformer/commit/5a6d296b0ce83f3b6b4e215839fb65d4e0f2de41))
* add check to remove empty properties object from payload ([#2896](https://github.com/rudderlabs/rudder-transformer/issues/2896)) ([1a86a07](https://github.com/rudderlabs/rudder-transformer/commit/1a86a0723e3f5fb6fdf9cf1dc716a47c6da16745))
* adobe_analytics event field check ([#2890](https://github.com/rudderlabs/rudder-transformer/issues/2890)) ([bf39215](https://github.com/rudderlabs/rudder-transformer/commit/bf39215dd1bbed482665c837a2bfabfcb751c753))
* covert toString before toLowercase ([#2830](https://github.com/rudderlabs/rudder-transformer/issues/2830)) ([bed431e](https://github.com/rudderlabs/rudder-transformer/commit/bed431e1de94ab28df1ee592d083a1481b960b6d))
* **dm:** add workspaceId in common metadata to be returned to the callers ([#2868](https://github.com/rudderlabs/rudder-transformer/issues/2868)) ([b3437a3](https://github.com/rudderlabs/rudder-transformer/commit/b3437a34358d5fd5b1eb63f30a5a695f39aa84ff))
* **integrations:** onboard sprig destination ([#2857](https://github.com/rudderlabs/rudder-transformer/issues/2857)) ([ede22e3](https://github.com/rudderlabs/rudder-transformer/commit/ede22e3f8fb60a9e36e2a3f5a5e86260255c49ef))
* mailjet source transformation by adding email exists check ([#2889](https://github.com/rudderlabs/rudder-transformer/issues/2889)) ([4a7eaa0](https://github.com/rudderlabs/rudder-transformer/commit/4a7eaa09000bcb82eb7f217d500223939bd9b07b))
* missing null check in braze populateCustomAttributesWithOperation ([#2897](https://github.com/rudderlabs/rudder-transformer/issues/2897)) ([50e921d](https://github.com/rudderlabs/rudder-transformer/commit/50e921d1451bf7016e60b2e238b8f842d72b5b71))
* removed retry logic from v1 cm360, added adapter for v1 to v0 conversion ([#2860](https://github.com/rudderlabs/rudder-transformer/issues/2860)) ([776d2c4](https://github.com/rudderlabs/rudder-transformer/commit/776d2c4abe23cd279195064684b9ccc807d83afc))
* **dm:** use clones as false for tracking plan node cache ([#2899](https://github.com/rudderlabs/rudder-transformer/issues/2899)) ([8f47db8](https://github.com/rudderlabs/rudder-transformer/commit/8f47db8bcf581d1807cfa2aa823ef400a30a09e3))

### [1.51.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.0...v1.51.1) (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.1",
"version": "1.52.0",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/reddit/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ steps:
template: |
let event = .message.event;
let eventInLowerCase = event.trim().toLowerCase();;
let eventNames = .destination.Config.eventsMapping.(){.from === event}.to[] ?? [];
let eventNames = .destination.Config.eventsMapping? .destination.Config.eventsMapping.(){.from === event}.to[] ?? []: [];
eventNames.length === 0 ? eventNames = $.ecomEventMaps.(){eventInLowerCase in .src}.dest[] ?? [];
const event_type = (eventNames.length === 0 || eventNames[0]==="") ? ({"tracking_type": "Custom", "custom_event_name": event}): ({tracking_type: eventNames[0]});
Expand Down
8 changes: 6 additions & 2 deletions src/services/destination/postTransformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { generateErrorObject } from '../../v0/util';
import { ErrorReportingService } from '../errorReporting';
import tags from '../../v0/util/tags';
import stats from '../../util/stats';
import { FixMe } from '../../util/types';

export class DestinationPostTransformationService {
public static handleProcessorTransformSucessEvents(
Expand Down Expand Up @@ -161,7 +162,7 @@ export class DestinationPostTransformationService {
}

public static handlevV1DeliveriesFailureEvents(
error: NonNullable<unknown>,
error: FixMe,
metaTo: MetaTransferObject,
): DeliveriesResponse {
const errObj = generateErrorObject(error, metaTo.errorDetails, false);
Expand All @@ -172,7 +173,10 @@ export class DestinationPostTransformationService {
}
const responses = metadataArray.map((metadata) => {
const resp = {
error: errObj.message || '[Delivery] Error occured while processing payload',
error:
JSON.stringify(error.destinationResponse?.response) ||
errObj.message ||
'[Delivery] Error occured while processing payload',
statusCode: errObj.status,
metadata,
} as DeliveryJobState;
Expand Down
2 changes: 1 addition & 1 deletion src/util/trackingPlan.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const logger = require('../logger');
const { responseStatusHandler } = require('./utils');
const stats = require('./stats');

const tpCache = new NodeCache();
const tpCache = new NodeCache({ useClones: false });
const CONFIG_BACKEND_URL = process.env.CONFIG_BACKEND_URL || 'https://api.rudderlabs.com';
const TRACKING_PLAN_URL = `${CONFIG_BACKEND_URL}/workspaces`;

Expand Down
3 changes: 3 additions & 0 deletions src/v0/destinations/adobe_analytics/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ function handleContextData(payload, destinationConfig, message) {
*/

function escapeToHTML(inputString) {
if (typeof inputString !== 'string') {
return inputString;
}
return inputString.replace(
/[&<>]/g,
(match) =>
Expand Down
2 changes: 1 addition & 1 deletion src/v0/destinations/marketo_static_list/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const processRouterDest = async (inputs, reqMetadata) => {
// use lodash.groupby to group the inputs based on message type
const transformedRecordEvent = [];
let transformedAudienceEvent = [];
const groupedInputs = lodash.groupBy(inputs, (input) => input.message.type);
const groupedInputs = lodash.groupBy(inputs, (input) => input.message.type?.toLowerCase());

const respList = [];
// process record events
Expand Down
2 changes: 1 addition & 1 deletion src/v0/util/errorTypes/filteredEventsError.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { BaseError } = require('./base');
const { BaseError } = require('@rudderstack/integrations-lib');
const { HTTP_STATUS_CODES } = require('../constant');

class FilteredEventsError extends BaseError {
Expand Down
2 changes: 1 addition & 1 deletion src/v0/util/errorTypes/transformerProxyError.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { BaseError } = require('@rudderstack/integrations-lib');
const tags = require('../tags');
const { BaseError } = require('./base');

const errorTypes = Object.values(tags.ERROR_TYPES);
const metaTypes = Object.values(tags.METADATA);
Expand Down
2 changes: 1 addition & 1 deletion src/v0/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const isPrimitive = (arg) => {
const isNewStatusCodesAccepted = (reqMetadata = {}) => {
if (reqMetadata && typeof reqMetadata === 'object' && !Array.isArray(reqMetadata)) {
const { features } = reqMetadata;
return !!(features && features[FEATURE_FILTER_CODE]);
return !!features?.[FEATURE_FILTER_CODE];
}
return false;
};
Expand Down
10 changes: 10 additions & 0 deletions src/v0/util/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { TAG_NAMES } = require('@rudderstack/integrations-lib');
const utilities = require('.');
const { getFuncTestData } = require('../../../test/testHelper');
const { FilteredEventsError } = require('./errorTypes');
const { hasCircularReference, flattenJson } = require('./index');

// Names of the utility functions to test
Expand Down Expand Up @@ -116,3 +118,11 @@ describe('flattenJson', () => {
);
});
});

describe('tests for generateErrorObject', () => {
test('test-0', () => {
const myErr = new FilteredEventsError('error-1');
const outputErrObj = utilities.generateErrorObject(myErr);
expect(outputErrObj.statTags).toEqual({});
});
});
4 changes: 1 addition & 3 deletions test/__tests__/data/braze_router.json
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,7 @@
},
{
"error": "[Braze Deduplication]: Duplicate user detected, the user is dropped",
"statTags": {
"errorCategory": "transformation"
},
"statTags": {},
"statusCode": 298,
"batched": false,
"metadata": [
Expand Down
Loading

0 comments on commit a847359

Please sign in to comment.