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

Not exactly a bug, but to be safe, better to check the job status directly as being COMPLETED before showing users the option to download results, which is consistent with how we handle the cases of PARTIALLY_COMPLETED, FAILED, etc.

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 January 18, 2025 07:27
result.succeeded -> CodeModernizerJobCompletedResult.JobCompletedSuccessfully(jobId)
result.state == TransformationStatus.COMPLETED -> {
CodeModernizerJobCompletedResult.JobCompletedSuccessfully(jobId)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These in theory should be doing the same thing, but again, for consistency it makes more sense to check the final job status directly rather than this internal succeeded field.

verify(tablePanelMock, times(1)).setDefaultUI()
verify(tablePanelMock, times(1)).updateTableData(testData)
assertThat(tablePanelMock.headerLabel.text).isEqualTo("Job status")
assertThat(tablePanelMock.headerLabel.text).isEqualTo("Transformation status")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use codemodernizer.toolwindow.job_status.header here instead of hardcoding the string?

@dhasani23 dhasani23 enabled auto-merge (squash) January 21, 2025 19:34
@dhasani23 dhasani23 merged commit e9e2d8b into aws:main Jan 22, 2025
11 checks passed
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.

3 participants