Skip to content

Commit

Permalink
Merge branch 'develop' into feat.hs-batching
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-4116 authored Jan 31, 2024
2 parents c56fa16 + 64ab555 commit 7ef304e
Show file tree
Hide file tree
Showing 14 changed files with 460 additions and 150 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.54.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.54.1...v1.54.2) (2024-01-25)


### Bug Fixes

* deleting access token cache for marketo bulk upload destination ([#3029](https://github.com/rudderlabs/rudder-transformer/issues/3029)) ([78b75bf](https://github.com/rudderlabs/rudder-transformer/commit/78b75bf4d9114209b3e89489fb43228dc9a70e5f))

### [1.54.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.54.0...v1.54.1) (2024-01-24)


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.54.1",
"version": "1.54.2",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
19 changes: 19 additions & 0 deletions src/v0/destinations/marketo_bulk_upload/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ const FETCH_FAILURE_JOB_STATUS_ERR_MSG = 'Could not fetch failure job status';
const FETCH_WARNING_JOB_STATUS_ERR_MSG = 'Could not fetch warning job status';
const ACCESS_TOKEN_FETCH_ERR_MSG = 'Error during fetching access token';

const SCHEMA_DATA_TYPE_MAP = {
string: 'string',
number: 'number',
boolean: 'boolean',
undefined: 'undefined',
float: 'number',
text: 'string',
currency: 'string',
integer: 'number',
reference: 'string',
datetime: 'string',
date: 'string',
email: 'string',
phone: 'string',
url: 'string',
object: 'object',
};

module.exports = {
ABORTABLE_CODES,
RETRYABLE_CODES,
Expand All @@ -33,4 +51,5 @@ module.exports = {
FETCH_FAILURE_JOB_STATUS_ERR_MSG,
FETCH_WARNING_JOB_STATUS_ERR_MSG,
ACCESS_TOKEN_FETCH_ERR_MSG,
SCHEMA_DATA_TYPE_MAP,
};
5 changes: 2 additions & 3 deletions src/v0/destinations/marketo_bulk_upload/fileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ const getImportID = async (input, config, accessToken, csvHeader) => {
stats.counter('marketo_bulk_upload_upload_file_unsuccJobs', unsuccessfulJobs.length);
if (!isHttpStatusSuccess(resp.status)) {
throw new NetworkError(
`Unable to upload file due to error : ${resp.response}`,
`Unable to upload file due to error : ${JSON.stringify(resp.response)}`,
hydrateStatusForServer(resp.status, 'During uploading file'),
);
}
return handleFileUploadResponse(resp, successfulJobs, unsuccessfulJobs, requestTime, config);
return handleFileUploadResponse(resp, successfulJobs, unsuccessfulJobs, requestTime);
}
return { importId: null, successfulJobs, unsuccessfulJobs };
};
Expand Down Expand Up @@ -242,7 +242,6 @@ const responseHandler = async (input, config) => {
accessToken,
headerForCsv,
);

// if upload is successful
if (importId) {
const csvHeader = headerForCsv.toString();
Expand Down
Loading

0 comments on commit 7ef304e

Please sign in to comment.