Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 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
Expand Up @@ -41,7 +41,7 @@
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
},
"devDependencies": {
"@aws-toolkits/telemetry": "^1.0.311",
"@aws-toolkits/telemetry": "^1.0.312",
"@playwright/browser-chromium": "^1.43.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/he": "^1.2.3",
Expand Down

This file was deleted.

5 changes: 3 additions & 2 deletions packages/amazonq/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"tasks": [
{
"label": "watch",
"type": "npm",
"script": "watch",
"type": "shell",
"command": "npm",
"args": ["run", "watch"],
"problemMatcher": "$tsc-watch",
"isBackground": true,
"group": {
Expand Down
13 changes: 13 additions & 0 deletions packages/amazonq/test/e2e/amazonq/framework/jsdomInjector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,17 @@ export function injectJSDOM() {

// jsdom doesn't have support for structuredClone. See https://github.com/jsdom/jsdom/issues/3363
global.structuredClone = (val: any) => JSON.parse(JSON.stringify(val))

global.IntersectionObserver = class IntersectionObserver {
observe() {}
unobserve() {}
disconnect() {}
takeRecords() {
return []
}
// eslint-disable-next-line unicorn/no-null
root = null
rootMargin = ''
thresholds = []
}
}
2 changes: 1 addition & 1 deletion packages/amazonq/test/e2e/amazonq/transformByQ.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('Amazon Q Code Transformation', function () {
})

describe('Starting a transformation from chat', () => {
it('Can click through all user input forms for a Java upgrade', async () => {
it.skip('Can click through all user input forms for a Java upgrade', async () => {
sinon.stub(startTransformByQ, 'getValidSQLConversionCandidateProjects').resolves([])
sinon.stub(GumbyController.prototype, 'validateLanguageUpgradeProjects' as keyof GumbyController).resolves([
{
Expand Down
5 changes: 3 additions & 2 deletions packages/core/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
},
{
"label": "watch",
"type": "npm",
"script": "watch",
"type": "shell",
"command": "npm",
"args": ["run", "watch"],
"problemMatcher": "$tsc-watch",
"isBackground": true
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ export class Messenger {
message === CodeWhispererConstants.viewProposedChangesChatMessage
) {
// get permission to re-run job and view logs after partially successful job is downloaded
this.sendFeedbackFormMessage(tabID)
// TODO: uncomment this when feature is ready
// this.sendFeedbackFormMessage(tabID)
}

this.dispatcher.sendChatMessage(
Expand Down
26 changes: 20 additions & 6 deletions packages/core/src/codewhisperer/service/securityScanHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,20 +384,24 @@ export async function uploadArtifactToS3(
headersObj['x-amz-server-side-encryption-aws-kms-key-id'] = resp.kmsKeyArn
}

let requestId: string | undefined = undefined
let id2: string | undefined = undefined
let responseCode: string = ''

try {
const response = await request.fetch('PUT', resp.uploadUrl, {
body: readFileSync(fileName),
headers: resp?.requestHeaders ?? headersObj,
}).response
logger.debug(`StatusCode: ${response.status}, Text: ${response.statusText}`)
requestId = response.headers?.get('x-amz-request-id') ?? undefined
id2 = response.headers?.get('x-amz-id-2') ?? undefined
responseCode = response.status.toString()
} catch (error) {
if (span && error instanceof RequestError) {
const requestId = error.response.headers.get('x-amz-request-id') ?? undefined
span.record({
requestId: requestId,
requestServiceType: 's3',
httpStatusCode: error.code.toString(),
})
requestId = error.response.headers.get('x-amz-request-id') ?? undefined
id2 = error.response.headers.get('x-amz-id-2') ?? undefined
responseCode = error.code.toString()
}
let errorMessage = ''
const isCodeScan = featureUseCase === FeatureUseCase.CODE_SCAN
Expand All @@ -419,6 +423,16 @@ export async function uploadArtifactToS3(
ChatSessionManager.Instance.getSession().startTestGenerationRequestId = error.requestId
}
throw isCodeScan ? new UploadArtifactToS3Error(errorMessage) : new UploadTestArtifactToS3Error(errorMessage)
} finally {
getLogger().debug(`Upload to S3 response details: x-amz-request-id: ${requestId}, x-amz-id-2: ${id2}`)
if (span) {
span.record({
requestId: requestId,
requestId2: id2,
requestServiceType: 's3',
httpStatusCode: responseCode,
})
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions packages/toolkit/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
},
{
"label": "watch",
"type": "npm",
"script": "watch",
"type": "shell",
"command": "npm",
"args": ["run", "watch"],
"problemMatcher": "$tsc-watch",
"isBackground": true,
"group": {
Expand Down
Loading