Skip to content

Commit

Permalink
Merge branch 'feat.salesforce-auth' of github.com:rudderlabs/rudder-t…
Browse files Browse the repository at this point in the history
…ransformer into feat.salesforce-auth
  • Loading branch information
shrouti1507 committed Nov 13, 2023
2 parents 932ee94 + b0b0de4 commit efa1117
Show file tree
Hide file tree
Showing 29 changed files with 14,993 additions and 4,862 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-hotfix-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

# Only allow these users to create new hotfix branch from 'main'
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab)
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab')
steps:
- name: Create Branch
uses: peterjgrainger/[email protected]
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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


### Bug Fixes

* update create-hotfix-branch.yml ([#2815](https://github.com/rudderlabs/rudder-transformer/issues/2815)) ([dd884dd](https://github.com/rudderlabs/rudder-transformer/commit/dd884ddc78898bd7de155ec4f05ce8fe6e2c4b80))

## [1.49.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.48.0...v1.49.0) (2023-11-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.49.0",
"version": "1.49.1",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
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
13 changes: 3 additions & 10 deletions src/v0/destinations/am/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ const handleTraits = (messageTrait, destination) => {

const getScreenevTypeAndUpdatedProperties = (message, CATEGORY_KEY) => {
const name = message.name || message.event || get(message, CATEGORY_KEY);
const updatedName = name ? `${name} ` : '';

return {
eventType: `Viewed ${updatedName}Screen`,
eventType: `Viewed ${message.name || message.event || get(message, CATEGORY_KEY) || ''} Screen`,
updatedProperties: {
...message.properties,
name,
Expand Down Expand Up @@ -578,8 +578,6 @@ const getGroupInfo = (destination, groupInfo, groupTraits) => {
}
return groupInfo;
};
const getUpdatedPageNameWithoutUserDefinedPageEventName = (name, message, CATEGORY_KEY) =>
name || get(message, CATEGORY_KEY) ? `${name || get(message, CATEGORY_KEY)} ` : undefined;

// Generic process function which invokes specific handler functions depending on message type
// and event type where applicable
Expand Down Expand Up @@ -615,12 +613,7 @@ const processSingleMessage = (message, destination) => {
.trim()
.replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath));
} else {
const updatedName = getUpdatedPageNameWithoutUserDefinedPageEventName(
name,
message,
CATEGORY_KEY,
);
evType = `Viewed ${updatedName || ''}Page`;
evType = `Viewed ${name || get(message, CATEGORY_KEY) || ''} Page`;
}
message.properties = {
...properties,
Expand Down
5 changes: 5 additions & 0 deletions src/v0/destinations/tiktok_ads/data/TikTokTrack.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"sourceKeys": ["properties.context.ad", "context.ad"],
"required": false
},
{
"destKey": "context.ad.callback",
"sourceKeys": "properties.clickId",
"required": false
},
{
"destKey": "context.page",
"sourceKeys": ["properties.context.page", "context.page"],
Expand Down
4 changes: 2 additions & 2 deletions test/__tests__/data/am_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -3944,7 +3944,7 @@
"id": "User Android",
"userId": "User Android"
},
"event_type": "Viewed Screen",
"event_type": "Viewed Screen",
"user_id": "User Android",
"device_brand": "Google",
"time": 1662393883250,
Expand Down Expand Up @@ -4276,7 +4276,7 @@
"app_name": "RudderLabs JavaScript SDK",
"app_version": "1.0.0",
"language": "en-US",
"event_type": "Viewed Page",
"event_type": "Viewed Page",
"event_properties": {
"path": "/destinations/amplitude",
"referrer": "",
Expand Down
3 changes: 2 additions & 1 deletion test/apitests/data_scenarios/cdk_v2/failure.json
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@
"statusCode": 400,
"error": "Action source must be one of app_android, app_ios, web, offline: Workflow: procWorkflow, Step: validateCommonFields, ChildStep: undefined, OriginalError: Action source must be one of app_android, app_ios, web, offline",
"statTags": {
"errorCategory": "platform",
"errorCategory": "dataValidation",
"errorType": "instrumentation",
"implementation": "cdkV2",
"destType": "PINTEREST_TAG",
"module": "destination",
Expand Down
Loading

0 comments on commit efa1117

Please sign in to comment.