Skip to content

Conversation

@dhasani23
Copy link
Contributor

Problem

Customers that experience transient network issues are unable to view their transformation results when the GetTransformation API fails after the default of 3 retries.

Solution

Increase retries to 8.


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.

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 December 12, 2024 07:34
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

): Promise<PromiseResult<CodeWhispererUserClient.GetTransformationResponse, AWSError>> {
return (await this.createUserSdkClient()).getTransformation(request).promise()
// instead of the default of 3 retries, use 8 retries for this API which is polled every 5 seconds
return (await this.createUserSdkClient(8)).getTransformation(request).promise()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The SDK uses 3 retries by default and 100 ms as the base delay during the exponential backoff retry strategy.

This means that if GetTransformation fails after only 0.1 + 0.2 + 0.4 = 0.7 seconds of delays, the transformation is marked as failed on the IDE and users are unable to view the transformation results. Increasing the retries to 8 means that GetTransformation now has a maximum of ~25 seconds of delays.

We have had customer cases where the polling fails, but the transformation eventually succeeds in our backend. This PR should increase the likelihood that those customers are able to view the transformation results.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

8 is admittedly arbitrary, and perhaps there's a better way to solve this problem, but I do think that permitting more than 0.7 seconds of delays is a good idea for this specific API. Open to other suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was going to ask why 8, but thank you for explaining that!

@dhasani23 dhasani23 marked this pull request as draft December 12, 2024 16:54
@dhasani23 dhasani23 marked this pull request as ready for review December 17, 2024 18:35
Copy link
Contributor

@justinmk3 justinmk3 left a comment

Choose a reason for hiding this comment

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

Needs a review by someone from your team

@justinmk3 justinmk3 merged commit ee2ac96 into aws:master Dec 17, 2024
26 of 27 checks passed
karanA-aws pushed a commit to karanA-aws/aws-toolkit-vscode that referenced this pull request Jan 17, 2025
## Problem
Customers that experience transient network issues are unable to view
their transformation results when the `GetTransformation` API fails
after the default of 3 retries.

## Solution
Increase retries to 8.
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