-
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
feat(amazonq): add retries around APIs #4256
Conversation
|
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.
Everything deleted here was an unused string
codemodernizer.notification.info.modernize_partial_complete.title=Transformation partially successful! | ||
codemodernizer.notification.info.submitted_project.content=Your project has been submitted for transformation. The code transformation process may take 10-30 mins depending on the size of your project. | ||
codemodernizer.notification.info.submitted_project.title=Submitted Project | ||
codemodernizer.notification.info.modernize_partial_complete.content=Transformation completed, but with build errors. The new code is not fully Java {0} compatible yet. You will need to fix changes yourself. You can view the changes by clicking View Diff below. |
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.
Already reviewed with PM, he wants this change to say "...but with build errors" instead of "partially completed"
@@ -254,7 +255,7 @@ class CodeModernizerSession( | |||
throw AlreadyDisposedException("Disposed when about to create upload URL") | |||
} | |||
val clientAdaptor = GumbyClient.getInstance(sessionContext.project) | |||
val createUploadUrlResponse = clientAdaptor.createGumbyUploadUrl(sha256checksum) | |||
var createUploadUrlResponse = clientAdaptor.createGumbyUploadUrl(sha256checksum) |
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.
Should we move this into the try catch block?
for (attempt in 0..MAX_API_RETRIES) {
try {
var createUploadUrlResponse = clientAdaptor.createGumbyUploadUrl(sha256checksum)
clientAdaptor.uploadArtifactToS3(...)
} catch (e) {
...
}
}
Can you not use the SDK's builtin retry mechanism?
I would expect that to be explained in the PR description / commit message. |
Types of changes
Description
If an API fails, retry it once before notifying the user that it failed.
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.