-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat.intercom
- Loading branch information
Showing
327 changed files
with
34,041 additions
and
115,784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Component Test Reporter | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
permissions: | ||
id-token: write # allows the JWT to be requested from GitHub's OIDC provider | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
test_and_upload: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/${{ secrets.AWS_DEV_S3_SYNC_ROLE }} | ||
aws-region: us-east-1 | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Run Tests and Generate Report | ||
run: | | ||
npm run test:ts -- component | ||
- name: Uplaod Report to S3 | ||
run: | | ||
aws s3 cp ./test_reports/ s3://test-integrations-dev/integrations-test-reports/rudder-transformer/${{ github.event.number }}/ --recursive | ||
- name: Comment on PR with S3 Object URL | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.PAT }} | ||
script: | | ||
const { owner, repo } = context.repo; | ||
// Get the pull request number | ||
const prNumber = context.payload.pull_request.number; | ||
const commentBody = `Test report for this run is available at: https://test-integrations-dev.s3.amazonaws.com/integrations-test-reports/rudder-transformer/${prNumber}/test-report.html`; | ||
// Comment on the pull request | ||
github.rest.issues.createComment({ | ||
owner, | ||
repo, | ||
issue_number: prNumber, | ||
body: commentBody | ||
}); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,7 @@ dist | |
**/.DS_Store | ||
|
||
|
||
.idea | ||
.idea | ||
|
||
# component test report | ||
test_reports/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,7 +153,7 @@ const getAccessToken = async (config) => | |
// sample response : {response: '[ENOTFOUND] :: DNS lookup failed', status: 400} | ||
if (!isHttpStatusSuccess(accessTokenResponse.status)) { | ||
throw new NetworkError( | ||
'Could not retrieve authorisation token', | ||
`Could not retrieve authorisation token due to error ${accessTokenResponse}`, | ||
hydrateStatusForServer(accessTokenResponse.status, FETCH_ACCESS_TOKEN), | ||
{ | ||
[tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(accessTokenResponse.status), | ||
|
@@ -172,7 +172,7 @@ const getAccessToken = async (config) => | |
|
||
// when access token is present | ||
if (accessTokenResponse.response.access_token) { | ||
/* This scenario will handle the case when we get the foloowing response | ||
/* This scenario will handle the case when we get the following response | ||
status: 200 | ||
respnse: {"access_token":"<dummy-access-token>","token_type":"bearer","expires_in":0,"scope":"[email protected]"} | ||
wherein "expires_in":0 denotes that we should refresh the accessToken but its not expired yet. | ||
|
@@ -185,7 +185,10 @@ const getAccessToken = async (config) => | |
} | ||
return accessTokenResponse.response.access_token; | ||
} | ||
throw new AbortedError('Could not retrieve authorisation token', 400); | ||
throw new AbortedError( | ||
`Could not retrieve authorisation token due to error ${accessTokenResponse}`, | ||
400, | ||
); | ||
}); | ||
|
||
/** | ||
|
@@ -254,14 +257,18 @@ const handleFetchJobStatusResponse = (resp, type) => { | |
if (!isHttpStatusSuccess(marketoReposnseStatus)) { | ||
logger.info('[Network Error]:Failed during fetching job status', { marketoResponse, type }); | ||
throw new NetworkError( | ||
'Unable to fetch job status', | ||
`Unable to fetch job status: due to error ${marketoResponse}`, | ||
hydrateStatusForServer(marketoReposnseStatus, 'During fetching job status'), | ||
); | ||
} | ||
|
||
if (marketoResponse?.success === false) { | ||
logger.info('[Application Error]Failed during fetching job status', { marketoResponse, type }); | ||
throw new RetryableError('Failure during fetching job status', 500, resp); | ||
throw new RetryableError( | ||
`Failure during fetching job status due to error : ${marketoResponse}`, | ||
500, | ||
resp, | ||
); | ||
} | ||
|
||
/* | ||
|
@@ -394,7 +401,11 @@ const getFieldSchemaMap = async (accessToken, munchkinId) => { | |
fieldMap[field?.name] = field?.dataType; | ||
}); | ||
} else { | ||
throw new RetryableError('Failed to fetch Marketo Field Schema', 500, fieldSchemaMapping); | ||
throw new RetryableError( | ||
`Failed to fetch Marketo Field Schema due to error ${fieldSchemaMapping}`, | ||
500, | ||
fieldSchemaMapping, | ||
); | ||
} | ||
return fieldMap; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.