Skip to content

Conversation

@dhasani23
Copy link
Contributor

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

When users run consecutive transformations (ex. a Java upgrade with multiple diffs requested, then a SQL conversion), the summary/diff from the 1st transformation would show up when trying to view the summary/diff for the 2nd transformation, because we were re-using a temp directory to store all artifacts.

Solution is to create a new and unique temp directory to hold each transformation job's results.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dhasani23 dhasani23 requested review from a team as code owners November 26, 2024 19:21
* If anything goes wrong during this process an exception is thrown.
*/
fun create(zipPath: String): CodeModernizerArtifact {
tempDir = createTempDirectory("codeTransformArtifacts-", UUID.randomUUID().toString())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaking state through the companion object. please have backlog for better encapsulation

@dhasani23 dhasani23 enabled auto-merge (squash) November 26, 2024 20:19
@dhasani23 dhasani23 merged commit 32b4a8a into aws:main Nov 26, 2024
9 checks passed
karanA-aws pushed a commit to karanA-aws/aws-toolkit-jetbrains that referenced this pull request Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants