Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Browse files Browse the repository at this point in the history
…to chore/update-component-test-suite
  • Loading branch information
Sai Sankeerth committed Oct 24, 2023
2 parents 49e21bc + 6b23a9b commit 852387b
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 5 deletions.
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.46.5](https://github.com/rudderlabs/rudder-transformer/compare/v1.46.4...v1.46.5) (2023-10-23)


### Bug Fixes

* **hubspot:** property mismatch ([5530031](https://github.com/rudderlabs/rudder-transformer/commit/553003192a1492220e3930c6b6f2dd11ebac1bcb))

### [1.46.4](https://github.com/rudderlabs/rudder-transformer/compare/v1.46.3...v1.46.4) (2023-10-20)


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.46.4",
"version": "1.46.5",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
8 changes: 8 additions & 0 deletions src/adapters/utils/networkUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ const nodeSysErrorToStatus = (code) => {
status: 500,
message: '[ETIMEDOUT] :: Operation timed out',
},
EAI_AGAIN: {
status: 500,
message: '[EAI_AGAIN] :: Temporary failure in name resolution',
},
ECONNABORTED: {
status: 500,
message: '[ECONNABORTED] :: Connection aborted',
},
};
return sysErrorToStatusMap[code] || { status: 400, message: `[${code}]` };
};
Expand Down
2 changes: 1 addition & 1 deletion src/v0/destinations/hs/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ const splitEventsForCreateUpdate = async (inputs, destination) => {
const { destinationExternalId } = getDestinationExternalIDInfoForRetl(message, DESTINATION);

const filteredInfo = updateHubspotIds.filter(
(update) => update.property.toString() === destinationExternalId.toString(),
(update) => update.property.toString().toLowerCase() === destinationExternalId.toString().toLowerCase(),
);

if (filteredInfo.length > 0) {
Expand Down
10 changes: 10 additions & 0 deletions test/__mocks__/data/salesforce/proxy_response.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/101": {
"message": "Connection Aborted",
"name": "Error",
"code": "ECONNABORTED"
},
"https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/102": {
"message": "DNS not found",
"name": "Error",
"code": "EAI_AGAIN"
},
"https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/1": {
"response": {
"data": {
Expand Down
66 changes: 66 additions & 0 deletions test/__tests__/data/salesforce_proxy_input.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,70 @@
[
{
"type": "REST",
"files": {},
"method": "POST",
"userId": "",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token"
},
"version": "1",
"endpoint": "https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/101",
"body": {
"XML": {},
"FORM": {},
"JSON": {
"Email": "[email protected]",
"Company": "sbermarket.ru",
"LastName": "Корнилов",
"FirstName": "Денис",
"LeadSource": "App Signup",
"account_type__c": "free_trial"
},
"JSON_ARRAY": {}
},
"metadata": {
"destInfo": {
"authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf"
}
},
"params": {
"destination": "salesforce"
}
},
{
"type": "REST",
"files": {},
"method": "POST",
"userId": "",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token"
},
"version": "1",
"endpoint": "https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/102",
"body": {
"XML": {},
"FORM": {},
"JSON": {
"Email": "[email protected]",
"Company": "sbermarket.ru",
"LastName": "Корнилов",
"FirstName": "Денис",
"LeadSource": "App Signup",
"account_type__c": "free_trial"
},
"JSON_ARRAY": {}
},
"metadata": {
"destInfo": {
"authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf"
}
},
"params": {
"destination": "salesforce"
}
},
{
"type": "REST",
"files": {},
Expand Down
52 changes: 51 additions & 1 deletion test/__tests__/data/salesforce_proxy_output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
[
{
"output": {
"status": 500,
"message": "Salesforce Request Failed - due to \"\"[ECONNABORTED] :: Connection aborted\"\", (Retryable) during Salesforce Response Handling",
"destinationResponse": {
"response": "[ECONNABORTED] :: Connection aborted",
"status": 500,
"rudderJobMetadata": {
"destInfo": {
"authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf"
}
}
},
"statTags": {
"destType": "SALESFORCE",
"errorCategory": "network",
"destinationId": "Non-determininable",
"workspaceId": "Non-determininable",
"errorType": "retryable",
"feature": "dataDelivery",
"implementation": "native",
"module": "destination"
}
}
},
{
"output": {
"status": 500,
"message": "Salesforce Request Failed - due to \"\"[EAI_AGAIN] :: Temporary failure in name resolution\"\", (Retryable) during Salesforce Response Handling",
"destinationResponse": {
"response": "[EAI_AGAIN] :: Temporary failure in name resolution",
"status": 500,
"rudderJobMetadata": {
"destInfo": {
"authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf"
}
}
},
"statTags": {
"destType": "SALESFORCE",
"errorCategory": "network",
"destinationId": "Non-determininable",
"workspaceId": "Non-determininable",
"errorType": "retryable",
"feature": "dataDelivery",
"implementation": "native",
"module": "destination"
}
}
},
{
"output": {
"status": 200,
Expand Down Expand Up @@ -207,4 +257,4 @@
}
}
}
]
]

0 comments on commit 852387b

Please sign in to comment.