From bcdabe2a9be41dd18881420a0012414acbad1715 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:20:46 +0530 Subject: [PATCH 1/8] chore(deps): bump axios from 1.6.5 to 1.7.3 (#3632) * chore(deps): bump axios from 1.6.5 to 1.7.3 Bumps [axios](https://github.com/axios/axios) from 1.6.5 to 1.7.3. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.6.5...v1.7.3) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: include package files to eslintignore * chore: include eslintignore file to prettierignore --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Co-authored-by: ItsSudip --- .eslintignore | 2 ++ .prettierignore | 1 + package-lock.json | 10 +++++----- package.json | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.eslintignore b/.eslintignore index ce54730f4b..abeac6b164 100644 --- a/.eslintignore +++ b/.eslintignore @@ -21,3 +21,5 @@ src/v0/destinations/personalize/scripts/ test/integrations/destinations/testTypes.d.ts *.config*.js scripts/skipPrepareScript.js +package-lock.json +package.json diff --git a/.prettierignore b/.prettierignore index 99747b29bb..10ea30580f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,3 +8,4 @@ test/**/*.js src/util/lodash-es-core.js src/util/url-search-params.min.js dist +.eslintignore \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8c7377da3e..c29db44559 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", - "axios": "^1.6.4", + "axios": "^1.7.3", "btoa": "^1.2.1", "component-each": "^0.2.6", "crypto-js": "^4.2.0", @@ -7244,11 +7244,11 @@ "integrity": "sha512-dihteGhwbJpT89kVbacWiyKeAZr+En0YGK6pAKQJLR0En9ZxSH2H4TTvfG4bBjzFq9gDAma4y9BrpDns6j5UiQ==" }, "node_modules/axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", + "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } diff --git a/package.json b/package.json index c14e6b9ef5..d13f7f14da 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", - "axios": "^1.6.4", + "axios": "^1.7.3", "btoa": "^1.2.1", "component-each": "^0.2.6", "crypto-js": "^4.2.0", From 78e7a95dd1fabdface2f14d402b2b63f0f47c082 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:52:22 +0530 Subject: [PATCH 2/8] chore(deps): bump docker/build-push-action from 6.5.0 to 6.7.0 (#3666) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.5.0 to 6.7.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.5.0...v6.7.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sankeerth --- .github/workflows/build-push-docker-image.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index 69f68c1676..cffb5f91da 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -107,7 +107,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PROD_TOKEN }} - name: Build Docker Image - uses: docker/build-push-action@v6.5.0 + uses: docker/build-push-action@v6.7.0 with: context: . file: ${{ inputs.dockerfile }} @@ -124,7 +124,7 @@ jobs: docker run ${{ inputs.build_tag }} npm run test:ts:ci - name: Build and Push Multi-platform Images - uses: docker/build-push-action@v6.5.0 + uses: docker/build-push-action@v6.7.0 with: context: . file: ${{ inputs.dockerfile }} @@ -160,7 +160,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PROD_TOKEN }} - name: Build Docker Image - uses: docker/build-push-action@v6.5.0 + uses: docker/build-push-action@v6.7.0 with: context: . file: ${{ inputs.dockerfile }} @@ -177,7 +177,7 @@ jobs: docker run ${{ inputs.build_tag }} npm run test:ts:ci - name: Build and Push Multi-platform Images - uses: docker/build-push-action@v6.5.0 + uses: docker/build-push-action@v6.7.0 with: context: . file: ${{ inputs.dockerfile }} From 2d8b315a5f2e681bc256128032e4ee066f9177fc Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:37:30 +0530 Subject: [PATCH 3/8] fix: handle trade desk null, undefined fields (#3661) --- .../the_trade_desk/transformRecord.js | 13 ++- .../the_trade_desk/router/data.ts | 84 ++++++++++++++++++- 2 files changed, 92 insertions(+), 5 deletions(-) diff --git a/src/cdk/v2/destinations/the_trade_desk/transformRecord.js b/src/cdk/v2/destinations/the_trade_desk/transformRecord.js index b452f8d7bc..42bbb0816d 100644 --- a/src/cdk/v2/destinations/the_trade_desk/transformRecord.js +++ b/src/cdk/v2/destinations/the_trade_desk/transformRecord.js @@ -40,6 +40,9 @@ const batchResponseBuilder = (items, config) => { return response; }; +const checkNullUndefinedEmptyFields = (fields) => + !!Object.entries(fields).some(([, value]) => !value); + const processRecordInputs = (inputs, destination) => { const { Config } = destination; const items = []; @@ -68,6 +71,11 @@ const processRecordInputs = (inputs, destination) => { return; } + if (checkNullUndefinedEmptyFields(fields)) { + errorResponseList.push(handleRtTfSingleEventError(input, emptyFieldsError, {})); + return; + } + successMetadata.push(input.metadata); const data = [ { @@ -78,10 +86,7 @@ const processRecordInputs = (inputs, destination) => { Object.keys(fields).forEach((id) => { const value = fields[id]; - if (value) { - // adding only non empty ID's - items.push({ [id]: value, Data: data }); - } + items.push({ [id]: value, Data: data }); }); }); diff --git a/test/integrations/destinations/the_trade_desk/router/data.ts b/test/integrations/destinations/the_trade_desk/router/data.ts index f095f561db..d2dbf9a7cc 100644 --- a/test/integrations/destinations/the_trade_desk/router/data.ts +++ b/test/integrations/destinations/the_trade_desk/router/data.ts @@ -45,7 +45,7 @@ export const data = [ action: 'insert', fields: { DAID: 'test-daid-2', - UID2: null, + UID2: 'test-uid2-2', }, channel: 'sources', context: sampleContext, @@ -117,6 +117,35 @@ export const data = [ }, files: {}, }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + UID2: 'test-uid2-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, ], metadata: [ { @@ -727,6 +756,8 @@ export const data = [ action: 'insert', fields: { DAID: 'test-daid-1', + UID2: 'test-uid2-1', + EUID: 'test-euid-1', }, channel: 'sources', context: sampleContext, @@ -737,6 +768,24 @@ export const data = [ jobId: 2, }, }, + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-2', + UID2: null, + EUID: null, + }, + channel: 'sources', + context: sampleContext, + recordId: '3', + }, + destination: sampleDestination, + metadata: { + jobId: 3, + }, + }, ], destType, }, @@ -771,6 +820,24 @@ export const data = [ }, ], }, + { + UID2: 'test-uid2-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + EUID: 'test-euid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, ], }, JSON_ARRAY: {}, @@ -804,6 +871,21 @@ export const data = [ }, destination: sampleDestination, }, + { + batched: false, + metadata: [{ jobId: 3 }], + statusCode: 400, + error: '`fields` cannot be empty', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, + destination: sampleDestination, + }, ], }, }, From fc6bcf7eda690d82cfe2d381753948058efbcd3d Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Mon, 26 Aug 2024 23:37:33 +0530 Subject: [PATCH 4/8] fix: login using docker creds on the node to allow to pull the desired image (#3682) * fix: login using docker creds on the node to allow to pull the desired image * fix: add steps to create regcred secret and then patch deployment with it * chore: fix the github action * chore: patch the service account in openfaas-fn ns to allow for pulling openfaas flask base images * chore: minor fixes --- .github/workflows/ut-tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ut-tests.yml b/.github/workflows/ut-tests.yml index 2f2f303219..b825bdb9d3 100644 --- a/.github/workflows/ut-tests.yml +++ b/.github/workflows/ut-tests.yml @@ -66,6 +66,18 @@ jobs: --set gateway.image=rudderlabs/rudder-openfaas-gateway:0.25.2 \ --set faasnetes.image=rudderlabs/rudder-openfaas-faas-netes:0.15.4 + - name: Create regcred secret in openfaas + run: kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=${{ secrets.DOCKERHUB_USERNAME }} --docker-password=${{ secrets.DOCKERHUB_TOKEN }} --docker-email=${{ secrets.DOCKERHUB_EMAIL }} -n openfaas + + - name: Create regcred secret in openfaas-fn + run: kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=${{ secrets.DOCKERHUB_USERNAME }} --docker-password=${{ secrets.DOCKERHUB_TOKEN }} --docker-email=${{ secrets.DOCKERHUB_EMAIL }} -n openfaas-fn + + - name: Patch default service account in openfaas-fn + run: 'kubectl patch serviceaccount default -n openfaas-fn -p ''{"imagePullSecrets": [{"name": "regcred"}]}''' + + - name: Patch deployment "gateway" + run: 'kubectl patch deployment gateway -n openfaas -p ''{"spec": {"template": {"spec": {"imagePullSecrets": [{"name": "regcred"}]}}}}''' + - name: Wait for deployment "gateway" rollout run: kubectl rollout status deploy/gateway --timeout 120s -n openfaas From f58d38642f723de28cfff590f34b14f72db78d69 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:22:41 +0530 Subject: [PATCH 5/8] chore: update api version of google ads for gaec to 17 from 15 (#3671) chore: update api version of google ads for gaec to 17 from 16 --- .../config.js | 5 ++++- .../dataDelivery/business.ts | 13 +++++-------- .../dataDelivery/oauth.ts | 14 +++++--------- .../network.ts | 19 ++++++++++--------- .../processor/data.ts | 13 +++++-------- .../router/data.ts | 5 +++-- 6 files changed, 32 insertions(+), 37 deletions(-) diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/config.js b/src/v0/destinations/google_adwords_enhanced_conversions/config.js index e8f486fb7a..8a3f8ab673 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/config.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/config.js @@ -1,6 +1,8 @@ const { getMappingConfig } = require('../../util'); -const BASE_ENDPOINT = 'https://googleads.googleapis.com/v15/customers'; +const API_VERSION = 'v17'; + +const BASE_ENDPOINT = 'https://googleads.googleapis.com/v17/customers'; const CONFIG_CATEGORIES = { TRACK_CONFIG: { type: 'track', name: 'trackConfig' }, @@ -17,4 +19,5 @@ module.exports = { hashAttributes, CONVERSION_ACTION_ID_CACHE_TTL, destType: 'google_adwords_enhanced_conversions', + API_VERSION, }; diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/business.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/business.ts index 0cee1418e1..a5bbaa05c5 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/business.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/business.ts @@ -4,6 +4,7 @@ import { generateProxyV1Payload, } from '../../../testUtils'; import { ProxyV1TestData } from '../../../testTypes'; +import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config'; const headers = { Authorization: 'Bearer abcd1234', @@ -82,8 +83,7 @@ export const testScenariosForV0API = [ request: { body: generateProxyV0Payload({ ...commonRequestParameters, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899:uploadConversionAdjustments`, }), method: 'POST', }, @@ -138,8 +138,7 @@ export const testScenariosForV0API = [ customerId: '1234567888', destination: 'google_adwords_enhanced_conversions', }, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567888:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888:uploadConversionAdjustments`, }), method: 'POST', }, @@ -203,8 +202,7 @@ export const testScenariosForV1API: ProxyV1TestData[] = [ body: generateProxyV1Payload( { ...commonRequestParameters, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899:uploadConversionAdjustments`, }, [generateMetadata(1)], ), @@ -251,8 +249,7 @@ export const testScenariosForV1API: ProxyV1TestData[] = [ customerId: '1234567888', destination: 'google_adwords_enhanced_conversions', }, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567888:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888:uploadConversionAdjustments`, }, [generateMetadata(1)], ), diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/oauth.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/oauth.ts index 70d9eeaf33..c6e29925dd 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/oauth.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/oauth.ts @@ -1,4 +1,4 @@ -import { ProxyV1TestData } from '../../../testTypes'; +import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config'; import { generateProxyV1Payload, generateProxyV0Payload, @@ -83,8 +83,7 @@ export const v0oauthScenarios = [ request: { body: generateProxyV0Payload({ ...commonRequestParameters, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`, }), method: 'POST', }, @@ -137,8 +136,7 @@ export const v0oauthScenarios = [ customerId: '1234567910', destination: 'google_adwords_enhanced_conversions', }, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567910/googleAds:searchStream', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567910/googleAds:searchStream`, }), method: 'POST', }, @@ -192,8 +190,7 @@ export const v1oauthScenarios = [ request: { body: generateProxyV1Payload({ ...commonRequestParameters, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`, }), method: 'POST', }, @@ -244,8 +241,7 @@ export const v1oauthScenarios = [ customerId: '1234567910', destination: 'google_adwords_enhanced_conversions', }, - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567910/googleAds:searchStream', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567910/googleAds:searchStream`, }), method: 'POST', }, diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts index 69b3a6103a..270ec2dc77 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts @@ -1,7 +1,8 @@ +import { API_VERSION } from '../../../../src/v0/destinations/google_adwords_enhanced_conversions/config'; export const networkCallsData = [ { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567890/googleAds:searchStream', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890/googleAds:searchStream`, data: { query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, }, @@ -29,7 +30,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567899/googleAds:searchStream', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899/googleAds:searchStream`, data: { query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, }, @@ -59,7 +60,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899:uploadConversionAdjustments`, data: { conversionAdjustments: [ { @@ -123,7 +124,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567891/googleAds:searchStream', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567891/googleAds:searchStream`, data: { query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, }, @@ -153,7 +154,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567891:uploadConversionAdjustments`, data: { conversionAdjustments: [ { @@ -214,7 +215,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadClickConversions', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567891:uploadClickConversions`, data: { conversionAdjustments: [ { @@ -275,7 +276,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567888/googleAds:searchStream', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888/googleAds:searchStream`, data: { query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, }, @@ -305,7 +306,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567888:uploadConversionAdjustments', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888:uploadConversionAdjustments`, data: { conversionAdjustments: [ { @@ -382,7 +383,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://googleads.googleapis.com/v15/customers/1234567910/googleAds:searchStream', + url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567910/googleAds:searchStream`, data: { query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, }, diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts index 13b2609bf8..40d8370fcb 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts @@ -1,3 +1,4 @@ +import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config'; export const data = [ { name: 'google_adwords_enhanced_conversions', @@ -128,8 +129,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`, headers: { Authorization: 'Bearer abcd1234', 'Content-Type': 'application/json', @@ -616,8 +616,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`, headers: { Authorization: 'Bearer abcd1234', 'Content-Type': 'application/json', @@ -1328,8 +1327,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`, headers: { Authorization: 'Bearer abcd1234', 'Content-Type': 'application/json', @@ -1519,8 +1517,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`, headers: { Authorization: 'Bearer abcd1234', 'Content-Type': 'application/json', diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts index dff0f772d3..1d77b5d774 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts @@ -1,3 +1,5 @@ +import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config'; + const events = [ { metadata: { @@ -357,8 +359,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`, headers: { Authorization: 'Bearer abcd1234', 'Content-Type': 'application/json', From 4cb27998f2c1e2a2a7b535666a54621fd1d43ef0 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:05:15 +0530 Subject: [PATCH 6/8] feat: add support for customerio source email subscribed event (#3679) --- src/v0/sources/customerio/config.js | 1 + test/integrations/sources/customerio/data.ts | 53 ++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/src/v0/sources/customerio/config.js b/src/v0/sources/customerio/config.js index f084f5e189..41257ed6de 100644 --- a/src/v0/sources/customerio/config.js +++ b/src/v0/sources/customerio/config.js @@ -8,6 +8,7 @@ const emailEventNameMap = { spammed: 'Email Marked as Spam', dropped: 'Email Dropped', bounced: 'Email Bounced', + subscribed: 'Email Subscribed', unsubscribed: 'Email Unsubscribed', converted: 'Email Converted', clicked: 'Email Link Clicked', diff --git a/test/integrations/sources/customerio/data.ts b/test/integrations/sources/customerio/data.ts index be2fc1a62e..b831b1d0b0 100644 --- a/test/integrations/sources/customerio/data.ts +++ b/test/integrations/sources/customerio/data.ts @@ -1431,6 +1431,59 @@ export const data = [ }, }, }, + { + name: 'customerio', + description: 'test-23: email subscribed', + module: 'source', + version: 'v0', + input: { + request: { + body: [ + { + data: { + customer_id: '0200102', + identifiers: { id: '0200102' }, + email_address: 'test@example.com', + }, + event_id: '01E4C4C6P79C12J5A6KPE6XNFD', + object_type: 'email', + metric: 'subscribed', + timestamp: 1585250179, + }, + ], + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + batch: [ + { + context: { + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'Customer.io' }, + traits: { email: 'test@example.com' }, + }, + integrations: { 'Customer.io': false }, + type: 'track', + event: 'Email Subscribed', + properties: { eventId: '01E4C4C6P79C12J5A6KPE6XNFD' }, + userId: '0200102', + originalTimestamp: '2020-03-26T19:16:19.000Z', + sentAt: '2020-03-26T19:16:19.000Z', + }, + ], + }, + }, + ], + }, + }, + }, ].map((tc) => ({ ...tc, mockFns: () => { From 35eee4c63f44334c14b31f36c37d7700b68a7ee9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:29:11 +0530 Subject: [PATCH 7/8] chore(deps): bump SonarSource/sonarcloud-github-action from 2.1.1 to 3.0.0 (#3680) chore(deps): bump SonarSource/sonarcloud-github-action Bumps [SonarSource/sonarcloud-github-action](https://github.com/sonarsource/sonarcloud-github-action) from 2.1.1 to 3.0.0. - [Release notes](https://github.com/sonarsource/sonarcloud-github-action/releases) - [Commits](https://github.com/sonarsource/sonarcloud-github-action/compare/v2.1.1...v3.0.0) --- updated-dependencies: - dependency-name: SonarSource/sonarcloud-github-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sai Sankeerth --- .github/workflows/dt-test-and-report-code-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dt-test-and-report-code-coverage.yml b/.github/workflows/dt-test-and-report-code-coverage.yml index b1da46898a..85625a1558 100644 --- a/.github/workflows/dt-test-and-report-code-coverage.yml +++ b/.github/workflows/dt-test-and-report-code-coverage.yml @@ -80,7 +80,7 @@ jobs: - name: SonarCloud Scan if: always() - uses: SonarSource/sonarcloud-github-action@v2.1.1 + uses: SonarSource/sonarcloud-github-action@v3.0.0 env: GITHUB_TOKEN: ${{ secrets.PAT }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 9fb463e7661c225077b11a0196b3190c15741058 Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Thu, 29 Aug 2024 14:23:19 +0530 Subject: [PATCH 8/8] fix: adding a new condition for retrying the function creation in python transformation (#3684) --- src/util/openfaas/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index b5021cf715..1f44df86bb 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -241,8 +241,9 @@ const deployFaasFunction = async ( // To handle concurrent create requests, // throw retry error if deployment or service already exists so that request can be retried if ( - (error.statusCode === 500 || error.statusCode === 400) && - error.message.includes('already exists') + ((error.statusCode === 500 || error.statusCode === 400) && + error.message.includes('already exists')) || + (error.statusCode === 409 && error.message.includes('Conflict change already made')) ) { setFunctionInCache(functionName); throw new RetryRequestError(`${functionName} already exists`);