Skip to content

Commit

Permalink
chore(release): pull main into develop post release v1.72.0 (#3589)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip authored Jul 25, 2024
2 parents ebf9e3f + 953dc5e commit c48f775
Show file tree
Hide file tree
Showing 16 changed files with 338 additions and 48 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

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.72.3](https://github.com/rudderlabs/rudder-transformer/compare/v1.72.2...v1.72.3) (2024-07-24)


### Bug Fixes

* add validation for cordial destination ([#3599](https://github.com/rudderlabs/rudder-transformer/issues/3599)) ([b7860a5](https://github.com/rudderlabs/rudder-transformer/commit/b7860a5b2b87fb61aaff8c68a904ac996d63efd3))
* update getConversionActionId function for gaoc ([#3594](https://github.com/rudderlabs/rudder-transformer/issues/3594)) ([68367f5](https://github.com/rudderlabs/rudder-transformer/commit/68367f5227c96f2700a773018b991b1e87a0774d))

### [1.72.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.72.1...v1.72.2) (2024-07-23)

### [1.72.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.72.0...v1.72.1) (2024-07-23)


### Bug Fixes

* garl get auth err category ([#3590](https://github.com/rudderlabs/rudder-transformer/issues/3590)) ([475ebc1](https://github.com/rudderlabs/rudder-transformer/commit/475ebc104c69a52eaa425a9ed564ea9aca1ecd9c))

## [1.72.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.71.3...v1.72.0) (2024-07-22)


### Features

* add support for subscribing for RETL flow ([#3195](https://github.com/rudderlabs/rudder-transformer/issues/3195)) ([cc56004](https://github.com/rudderlabs/rudder-transformer/commit/cc560044ceb769da1f0090da4f690933552b6347))
* braze source event mapping ([#3527](https://github.com/rudderlabs/rudder-transformer/issues/3527)) ([e357141](https://github.com/rudderlabs/rudder-transformer/commit/e357141d22e5296b6d1cda2e763ac24abfcb66e6))
* introduces new user fields in titkok ads ([#3575](https://github.com/rudderlabs/rudder-transformer/issues/3575)) ([6304abb](https://github.com/rudderlabs/rudder-transformer/commit/6304abb2346f331b78e927b73e7c2ca17e94f4cf))
* onboard cordial destination ([#3581](https://github.com/rudderlabs/rudder-transformer/issues/3581)) ([fbcdcd6](https://github.com/rudderlabs/rudder-transformer/commit/fbcdcd609888150efa0da33eec60a4cc7b436d06))
* onboarding new destination zoho ([#3555](https://github.com/rudderlabs/rudder-transformer/issues/3555)) ([20aa7f3](https://github.com/rudderlabs/rudder-transformer/commit/20aa7f35e13ad89e8a43fbbb743df73b0c103975)), closes [#3566](https://github.com/rudderlabs/rudder-transformer/issues/3566)
* update webhook destination to support all datatypes ([#3541](https://github.com/rudderlabs/rudder-transformer/issues/3541)) ([448f574](https://github.com/rudderlabs/rudder-transformer/commit/448f57484c57d4a55147e9566149c8b714a191c9))


### Bug Fixes

* add optional chaining to webengage page event ([#3570](https://github.com/rudderlabs/rudder-transformer/issues/3570)) ([20205d6](https://github.com/rudderlabs/rudder-transformer/commit/20205d66298f5633d3971888f0866db2c38a50e2))
* add validation for type in google pubsub ([#3578](https://github.com/rudderlabs/rudder-transformer/issues/3578)) ([1bef212](https://github.com/rudderlabs/rudder-transformer/commit/1bef2126a75324598c2af0ecaffcf582f038af11))
* adding readiness probe annotations for openfaas ([#3529](https://github.com/rudderlabs/rudder-transformer/issues/3529)) ([2eb92e3](https://github.com/rudderlabs/rudder-transformer/commit/2eb92e3332ef0e8b2f83621fe0130fbc1356fa91))
* **gainsight:** replace myAxios utility with handleHttpRequest utility ([#3241](https://github.com/rudderlabs/rudder-transformer/issues/3241)) ([04be1aa](https://github.com/rudderlabs/rudder-transformer/commit/04be1aaf438f824ddf61fc2f4d13eb7d8a223a9d))
* job ordering for hs ([#3319](https://github.com/rudderlabs/rudder-transformer/issues/3319)) ([f840d54](https://github.com/rudderlabs/rudder-transformer/commit/f840d54dcbdc011eeb716dce74f2ecb36e99d0e9))
* update authErrorCategory for 2 step verification issue for google ads destinations ([#3552](https://github.com/rudderlabs/rudder-transformer/issues/3552)) ([5a0392e](https://github.com/rudderlabs/rudder-transformer/commit/5a0392ee24301486b7973531be28f8178ef03eab))
* update python transformation fn ([#3491](https://github.com/rudderlabs/rudder-transformer/issues/3491)) ([f363f35](https://github.com/rudderlabs/rudder-transformer/commit/f363f3512f690e0745165f46587efdbe88f48683))

### [1.71.3](https://github.com/rudderlabs/rudder-transformer/compare/v1.71.2...v1.71.3) (2024-07-15)


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.71.3",
"version": "1.72.3",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
15 changes: 11 additions & 4 deletions src/cdk/v2/destinations/cordial/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,28 @@ steps:
template: |
$.context.messageType = .message.type.toLowerCase();
- name: validateInput
- name: validateConfig
template: |
$.assertConfig(.destination.Config.apiKey, "API Key is not present. Aborting");
$.assertConfig(.destination.Config.apiBaseUrl, "API Base URl is not present. Aborting");
- name: validateMessageType
template: |
let messageType = $.context.messageType;
$.assert(messageType, "message Type is not present. Aborting");
$.assert(messageType in {{$.EventType.([.TRACK, .IDENTIFY])}}, "message type " + messageType + " is not supported");
$.assertConfig(.destination.Config.apiKey, "API Key is not present. Aborting");
$.assertConfig(.destination.Config.apiBaseUrl, "API Base URl is not present. Aborting");
- name: getContactId
template: |
$.getDestinationExternalID(.message,'cordialContactId');
- name: getContactEmail
template: |
.message.().({{{{$.getGenericPaths("email")}}}};);
.message.().({{{{$.getGenericPaths("emailOnly")}}}});
- name: validateEventPayload
template: |
$.assert($.outputs.getContactId || $.outputs.getContactEmail, "Either one of cordial contact id or email is required. Aborting");
- name: buildIdentifyPayload
condition: $.context.messageType in [{{$.EventType.IDENTIFY}}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const createJob = async ({ endpoint, headers, payload, metadata }) => {
const { response, status } = createJobResponse;
if (!isHttpStatusSuccess(status)) {
throw new AbortedError(
`[Google Ads Offline Conversions]:: ${response?.error?.message} during google_ads_offline_store_conversions Job Creation`,
`[Google Ads Offline Conversions]:: ${response?.error?.message || response?.[0]?.error?.message} during google_ads_offline_store_conversions Job Creation`,
status,
response,
getAuthErrCategory(createJobResponse),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const {
getFieldValueFromMessage,
isDefinedAndNotNullAndNotEmpty,
isDefinedAndNotNull,
getAuthErrCategoryFromStCode,
getAccessToken,
getIntegrationsObj,
} = require('../../util');
Expand All @@ -34,7 +33,7 @@ const {
const { processAxiosResponse } = require('../../../adapters/utils/networkUtils');
const Cache = require('../../util/cache');
const helper = require('./helper');
const { finaliseConsent } = require('../../util/googleUtils');
const { finaliseConsent, getAuthErrCategory } = require('../../util/googleUtils');

const conversionActionIdCache = new Cache(CONVERSION_ACTION_ID_CACHE_TTL);

Expand Down Expand Up @@ -86,7 +85,7 @@ const getConversionActionId = async ({ headers, params, metadata }) => {
)} during google_ads_offline_conversions response transformation`,
status,
response,
getAuthErrCategoryFromStCode(get(searchStreamResponse, 'status')),
getAuthErrCategory(searchStreamResponse),
);
}
const conversionAction = get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const gaAudienceRespHandler = (destResponse, stageMsg) => {
[tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status),
},
response,
getAuthErrCategory(status),
getAuthErrCategory(destResponse),
);
};

Expand Down
4 changes: 2 additions & 2 deletions src/v0/destinations/klaviyo/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {
batchSubscribeEvents,
getIdFromNewOrExistingProfile,
profileUpdateResponseBuilder,
addSubcribeFlagToTraits,
addSubscribeFlagToTraits,
} = require('./util');
const {
defaultRequestConfig,
Expand Down Expand Up @@ -63,7 +63,7 @@ const identifyRequestHandler = async (
if (mappedToDestination) {
addExternalIdToTraits(message);
adduserIdFromExternalId(message);
traitsInfo = addSubcribeFlagToTraits(traitsInfo);
traitsInfo = addSubscribeFlagToTraits(traitsInfo);
}

let propertyPayload = constructPayload(message, MAPPING_CONFIG[category.name]);
Expand Down
11 changes: 7 additions & 4 deletions src/v0/util/googleUtils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,14 @@ const finaliseAnalyticsConsents = (consentConfigMap, eventLevelConsent = {}) =>

const getAuthErrCategory = ({ response, status }) => {
if (status === 401) {
const authenticationError = get(
response,
'error.details.0.errors.0.errorCode.authenticationError',
let respArr = response;
if (!Array.isArray(response)) {
respArr = [response];
}
const authenticationError = respArr.map((resp) =>
get(resp, 'error.details.0.errors.0.errorCode.authenticationError'),
);
if (authenticationError === 'TWO_STEP_VERIFICATION_NOT_ENROLLED') {
if (authenticationError.includes('TWO_STEP_VERIFICATION_NOT_ENROLLED')) {
// https://developers.google.com/google-ads/api/docs/oauth/2sv
return AUTH_STATUS_INACTIVE;
}
Expand Down
43 changes: 42 additions & 1 deletion test/integrations/destinations/cordial/processor/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,47 @@ import { generateMetadata } from '../../../testUtils';
import { destType, destination, processorInstrumentationErrorStatTags } from '../common';

export const validation: ProcessorTestData[] = [
{
id: 'cordial-validation-test-1',
name: destType,
description: 'All of the required fields — cordial contact id, email — are missing.',
scenario: 'Framework',
successCriteria: 'Instrumentation Error',
feature: 'processor',
module: 'destination',
version: 'v0',
input: {
request: {
body: [
{
destination,
message: {
type: 'identify',
integrations: {
All: true,
},
originalTimestamp: '2024-03-04T15:32:56.409Z',
},
metadata: generateMetadata(1),
},
],
},
},
output: {
response: {
status: 200,
body: [
{
error:
'Either one of cordial contact id or email is required. Aborting: Workflow: procWorkflow, Step: validateEventPayload, ChildStep: undefined, OriginalError: Either one of cordial contact id or email is required. Aborting',
metadata: generateMetadata(1),
statTags: processorInstrumentationErrorStatTags,
statusCode: 400,
},
],
},
},
},
{
id: 'cordial-validation-test-2',
name: destType,
Expand Down Expand Up @@ -38,7 +79,7 @@ export const validation: ProcessorTestData[] = [
body: [
{
error:
'message type group is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type group is not supported',
'message type group is not supported: Workflow: procWorkflow, Step: validateMessageType, ChildStep: undefined, OriginalError: message type group is not supported',
metadata: generateMetadata(1),
statTags: processorInstrumentationErrorStatTags,
statusCode: 400,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,76 @@ export const v1oauthScenarios = [
},
},
},
{
id: 'gaoc_v1_oauth_scenario_4',
name: 'google_adwords_offline_conversions',
description:
"[Proxy v1 API] :: Oauth when the user doesn't enabled 2 factor authentication but the google ads account has it enabled for not store sales conversion",
successCriteria: 'The proxy should return 401 with authErrorCategory as AUTH_STATUS_INACTIVE',
scenario: 'Oauth',
feature: 'dataDelivery',
module: 'destination',
version: 'v1',
input: {
request: {
body: generateProxyV1Payload(
{
...{ ...commonRequestParameters, JSON: { isStoreConversion: false } },
headers: {
Authorization: 'Bearer invalidabcd1234',
'Content-Type': 'application/json',
'developer-token': 'ijkl91011',
'login-customer-id': 'logincustomerid',
},
endpoint:
'https://googleads.googleapis.com/v16/customers/customerid/offlineUserDataJobs',
},
metadataArray,
),
method: 'POST',
},
},
output: {
response: {
status: 401,
body: {
output: {
authErrorCategory: 'AUTH_STATUS_INACTIVE',
message:
'[Google Ads Offline Conversions]:: [{"error":{"code":401,"details":[{"@type":"type.googleapis.com/google.ads.googleads.v16.errors.GoogleAdsFailure","errors":[{"errorCode":{"authenticationError":"TWO_STEP_VERIFICATION_NOT_ENROLLED"},"message":"An account administrator changed this account\'s authentication settings. To access this Google Ads account, enable 2-Step Verification in your Google account at https://www.google.com/landing/2step."}],"requestId":"wy4ZYbsjWcgh6uC2Ruc_Zg"}],"message":"Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status":"UNAUTHENTICATED"}}] during google_ads_offline_conversions response transformation',
response: [
{
error:
'[Google Ads Offline Conversions]:: [{"error":{"code":401,"details":[{"@type":"type.googleapis.com/google.ads.googleads.v16.errors.GoogleAdsFailure","errors":[{"errorCode":{"authenticationError":"TWO_STEP_VERIFICATION_NOT_ENROLLED"},"message":"An account administrator changed this account\'s authentication settings. To access this Google Ads account, enable 2-Step Verification in your Google account at https://www.google.com/landing/2step."}],"requestId":"wy4ZYbsjWcgh6uC2Ruc_Zg"}],"message":"Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status":"UNAUTHENTICATED"}}] during google_ads_offline_conversions response transformation',
metadata: {
attemptNum: 1,
destinationId: 'default-destinationId',
dontBatch: false,
jobId: 1,
secret: {
accessToken: 'default-accessToken',
},
sourceId: 'default-sourceId',
userId: 'default-userId',
workspaceId: 'default-workspaceId',
},
statusCode: 401,
},
],
statTags: {
destType: 'GOOGLE_ADWORDS_OFFLINE_CONVERSIONS',
destinationId: 'default-destinationId',
errorCategory: 'network',
errorType: 'aborted',
feature: 'dataDelivery',
implementation: 'native',
module: 'destination',
workspaceId: 'default-workspaceId',
},
status: 401,
},
},
},
},
},
];
Loading

0 comments on commit c48f775

Please sign in to comment.