Skip to content

Commit

Permalink
chore(release): pull main into develop post release v1.77.0 (#3701)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpj2292 authored Sep 3, 2024
2 parents 59e5f5f + fa98d66 commit 001909e
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 8 deletions.
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.77.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.76.1...v1.77.0) (2024-09-02)


### Features

* add support for customerio source email subscribed event ([#3679](https://github.com/rudderlabs/rudder-transformer/issues/3679)) ([4cb2799](https://github.com/rudderlabs/rudder-transformer/commit/4cb27998f2c1e2a2a7b535666a54621fd1d43ef0))
* add support for headers to source transformation flows ([#3683](https://github.com/rudderlabs/rudder-transformer/issues/3683)) ([f8cd6bd](https://github.com/rudderlabs/rudder-transformer/commit/f8cd6bda158654501555554ac0d284af8ba058fd))
* include source attribute for identify messages for koala ([#3667](https://github.com/rudderlabs/rudder-transformer/issues/3667)) ([b1d0d08](https://github.com/rudderlabs/rudder-transformer/commit/b1d0d08b91273fd3b8fa2e87381c5ae090e1cb21)), closes [#3603](https://github.com/rudderlabs/rudder-transformer/issues/3603)
* webhook v2 ([#3651](https://github.com/rudderlabs/rudder-transformer/issues/3651)) ([e21ebd0](https://github.com/rudderlabs/rudder-transformer/commit/e21ebd0085aadfe61cb6442da6689e32be33f52f))


### Bug Fixes

* adding a new condition for retrying the function creation in python transformation ([#3684](https://github.com/rudderlabs/rudder-transformer/issues/3684)) ([9fb463e](https://github.com/rudderlabs/rudder-transformer/commit/9fb463e7661c225077b11a0196b3190c15741058))
* handle trade desk null, undefined fields ([#3661](https://github.com/rudderlabs/rudder-transformer/issues/3661)) ([2d8b315](https://github.com/rudderlabs/rudder-transformer/commit/2d8b315a5f2e681bc256128032e4ee066f9177fc))
* klaviyo jobs order ([#3686](https://github.com/rudderlabs/rudder-transformer/issues/3686)) ([26926c4](https://github.com/rudderlabs/rudder-transformer/commit/26926c40fcbf4c146a37ac16c2cc7280e110a6e6))
* login using docker creds on the node to allow to pull the desired image ([#3682](https://github.com/rudderlabs/rudder-transformer/issues/3682)) ([fc6bcf7](https://github.com/rudderlabs/rudder-transformer/commit/fc6bcf7eda690d82cfe2d381753948058efbcd3d))
* npm vulnerabilities ([c305974](https://github.com/rudderlabs/rudder-transformer/commit/c3059746f25677eae739468c3a4b7496aa82f4da))
* npm vulnerabilities ([#3695](https://github.com/rudderlabs/rudder-transformer/issues/3695)) ([494df08](https://github.com/rudderlabs/rudder-transformer/commit/494df08bc992632ebc405c88a3f23ed5e1262553))

### [1.76.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.76.0...v1.76.1) (2024-08-29)


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.76.1",
"version": "1.77.0",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
15 changes: 13 additions & 2 deletions src/v0/destinations/reddit/networkHandler.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
const { RetryableError } = require('@rudderstack/integrations-lib');
const { RetryableError, TAG_NAMES, NetworkError } = require('@rudderstack/integrations-lib');
const isString = require('lodash/isString');
const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network');
const { isHttpStatusSuccess } = require('../../util/index');
const { REFRESH_TOKEN } = require('../../../adapters/networkhandler/authConstants');

const { processAxiosResponse } = require('../../../adapters/utils/networkUtils');
const {
processAxiosResponse,
getDynamicErrorType,
} = require('../../../adapters/utils/networkUtils');

const redditRespHandler = (destResponse) => {
const { status, response } = destResponse;
Expand All @@ -29,6 +32,14 @@ const redditRespHandler = (destResponse) => {
authErrorCategory,
);
}
throw new NetworkError(
`${JSON.stringify(response)} during reddit response transformation`,
status,
{
[TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status),
},
destResponse,
);
};
const responseHandler = (responseParams) => {
const { destinationResponse } = responseParams;
Expand Down
58 changes: 55 additions & 3 deletions test/integrations/destinations/reddit/dataDelivery/business.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const testScenariosForV1API = [
body: generateProxyV1Payload(
{
...commonRequestParameters,
endpoint: 'https://dfareporting.googleapis.com/test_url_for_valid_request',
endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd',
},
[generateMetadata(1)],
),
Expand All @@ -119,10 +119,62 @@ export const testScenariosForV1API = [
response: [
{
metadata: generateMetadata(1),
statusCode: 500,
statusCode: 200,
},
],
status: 500,
status: 200,
},
},
},
},
},
{
id: 'reddit_v1_scenario_2',
name: 'reddit',
description:
'[Proxy v1 API] :: Test for a valid request with a failed 403 response from the destination',
scenario: 'Business',
feature: 'dataDelivery',
module: 'destination',
version: 'v1',
input: {
request: {
body: generateProxyV1Payload(
{
...commonRequestParameters,
endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/403_event',
},
[generateMetadata(1)],
),
method: 'POST',
},
},
output: {
response: {
status: 200,
body: {
output: {
message:
'{"success":false,"error":{"reason":"UNAUTHORIZED","explanation":"JSON error unexpected type number on field events event_metadata value"}} during reddit response transformation',
response: [
{
metadata: generateMetadata(1),
statusCode: 403,
error:
'{"success":false,"error":{"reason":"UNAUTHORIZED","explanation":"JSON error unexpected type number on field events event_metadata value"}}',
},
],
statTags: {
destType: 'REDDIT',
destinationId: 'default-destinationId',
errorCategory: 'network',
errorType: 'aborted',
feature: 'dataDelivery',
implementation: 'native',
module: 'destination',
workspaceId: 'default-workspaceId',
},
status: 403,
},
},
},
Expand Down
56 changes: 56 additions & 0 deletions test/integrations/destinations/reddit/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,60 @@ export const networkCallsData = [
statusText: 'Unauthorized',
},
},
{
httpReq: {
url: 'https://ads-api.reddit.com/api/v2.0/conversions/events/403_event',
data: {
events: [
{
event_at: '2019-10-14T09:03:17.562Z',
event_type: {
tracking_type: 'Purchase',
},
user: {
aaid: 'c12d34889302d3c656b5699fa9190b51c50d6f62fce57e13bd56b503d66c487a',
email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2',
external_id: '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d',
ip_address: 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db',
user_agent:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36',
screen_dimensions: {},
},
event_metadata: {
item_count: 3,
products: [
{
id: '123',
name: 'Monopoly',
category: 'Games',
},
{
id: '345',
name: 'UNO',
category: 'Games',
},
],
},
},
],
},
params: { destination: 'reddit' },
headers: {
Authorization: 'Bearer dummyAccessToken',
'Content-Type': 'application/json',
},
method: 'POST',
},
httpRes: {
data: {
success: false,
error: {
reason: 'UNAUTHORIZED',
explanation: 'JSON error unexpected type number on field events event_metadata value',
},
},
status: 403,
statusText: 'Unauthorized',
},
},
];

0 comments on commit 001909e

Please sign in to comment.