Skip to content

Conversation

dhasani23
Copy link
Contributor

@dhasani23 dhasani23 commented May 22, 2025

Types of changes

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

Description

Add back retries for /transform since they were being overridden to 0.

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 a review from a team as a code owner May 22, 2025 07:22
@dhasani23 dhasani23 requested a review from a team as a code owner May 22, 2025 07:26
private const val INITIAL_DELAY = 100L
private const val MAX_BACKOFF = 10000L
private const val MAX_RETRY_ATTEMPTS = 3
private const val MAX_ATTEMPTS = 4
Copy link
Contributor Author

@dhasani23 dhasani23 May 22, 2025

Choose a reason for hiding this comment

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

I'm guessing the intention was to do 3 retries (after the initial attempt), meaning this should technically be set to 4, and naming it MAX_ATTEMPTS is more accurate.

is TimeoutException,
is SocketTimeoutException,
-> true
else -> false
Copy link
Contributor Author

@dhasani23 dhasani23 May 22, 2025

Choose a reason for hiding this comment

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

Following the same retry strategy from:

isRetryable = { e ->
when (e) {
is ValidationException,
is ThrottlingException,
is SdkException,
is TimeoutException,
-> true
else -> false

in the ExportResultArchive (download) API

and added SocketTimeoutException (which is not a type of TimeoutException, so it needs to be explicitly listed here)

return@waitUntil state
} catch (e: InvalidGrantException) {
CodeTransformMessageListener.instance.onCheckAuth()
CodeTransformMessageListener.instance.onReauthStarted()
Copy link
Contributor Author

@dhasani23 dhasani23 May 22, 2025

Choose a reason for hiding this comment

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

This onCheckAuth was disposing of our codeTransformationSessionContext which doesn't make sense to do. Better to just initiate the onReauthStarted flow which does:


instead of waiting/hoping for the user to click on the Re-authenticate button in the notification.

@dhasani23 dhasani23 requested a review from a team as a code owner May 22, 2025 10:38
@rli rli merged commit 25f28ad into aws:main May 27, 2025
11 of 12 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