Skip to content

Commit eb39fc1

Browse files
author
David Hasani
committed
delete artifacts
1 parent 94eb819 commit eb39fc1

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

packages/core/src/codewhisperer/models/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ export const skipUnitTestsFormTitle = 'Choose to skip unit tests'
806806

807807
export const selectiveTransformationFormTitle = 'Choose how to receive proposed changes'
808808

809+
// TO-DO: get text from Allie for this
809810
export const skipUnitTestsFormMessage =
810811
'I will build your project using `mvn clean test` by default. If you would like me to build your project without running unit tests, I will use `mvn clean test-compile`.'
811812

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -828,17 +828,13 @@ export async function runClientSideBuild(projectCopyPath: string, clientInstruct
828828
},
829829
}
830830
getLogger().info(`CodeTransformation: uploading client build results at ${uploadZipPath} and resuming job now`)
831-
await uploadPayload(uploadZipPath, AuthUtil.instance.regionProfileManager.activeRegionProfile, uploadContext)
832-
await resumeTransformationJob(transformByQState.getJobId(), 'COMPLETED')
833831
try {
832+
await uploadPayload(uploadZipPath, AuthUtil.instance.regionProfileManager.activeRegionProfile, uploadContext)
833+
await resumeTransformationJob(transformByQState.getJobId(), 'COMPLETED')
834+
} finally {
834835
await fs.delete(projectCopyPath, { recursive: true })
835836
await fs.delete(uploadZipBaseDir, { recursive: true })
836-
// TODO: do we need to delete the downloaded client instructions and uploadZipPath?
837-
// Check with AppSec, but they can help in debugging
838-
} catch {
839-
getLogger().error(
840-
`CodeTransformation: failed to delete project copy and uploadZipBaseDir after client-side build`
841-
)
837+
getLogger().info(`CodeTransformation: Just deleted project copy and uploadZipBaseDir after client-side build`)
842838
}
843839
}
844840

0 commit comments

Comments
 (0)