-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(amazonq): check job status directly before completing #5281
Conversation
result.succeeded -> CodeModernizerJobCompletedResult.JobCompletedSuccessfully(jobId) | ||
result.state == TransformationStatus.COMPLETED -> { | ||
CodeModernizerJobCompletedResult.JobCompletedSuccessfully(jobId) | ||
} |
There was a problem hiding this comment.
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.
@@ -23,7 +23,7 @@ class CodeModernizerJobHistoryPanelTest { | |||
tablePanelMock.updateTableData(testData) | |||
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") |
There was a problem hiding this comment.
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?
Types of changes
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 ofPARTIALLY_COMPLETED
,FAILED
, etc.Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.