-
Notifications
You must be signed in to change notification settings - Fork 751
refactor(util): merge withRetries and waitUntil #6387
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
can this behavior be controlled by a flag on |
justinmk3
reviewed
Jan 17, 2025
84d9a91 to
978ed1a
Compare
jpinkney-aws
approved these changes
Jan 20, 2025
Problem: We had 2 different implementation of similar code, between withRetries and waitUntil. We couldn't easily merge them though since behavior was slightly different when it came to expected return types, and since one threw and the other did not. - waitUntil returns undefined if it never properly resolves - withRetries throws if it never properly resolves Solution: As a solution we keep both methods but they share the same underlying code. - waitUntil now has a backoff field to increase the delta between intervals - withRetries also has this - withRetries will retry even on a thrown exeception - on timeout it will throw the last exception it encountered Signed-off-by: nkomonen-amazon <[email protected]>
Signed-off-by: nkomonen-amazon <[email protected]>
7c01a51 to
7bee61e
Compare
Contributor
Author
|
/retryBuilds |
Signed-off-by: nkomonen-amazon <[email protected]>
Contributor
Author
|
/runIntegrationTests |
Signed-off-by: nkomonen-amazon <[email protected]>
justinmk3
approved these changes
Jan 23, 2025
kevluu-aws
pushed a commit
to kevluu-aws/aws-toolkit-vscode
that referenced
this pull request
Jan 23, 2025
## Problem:
`withRetries` and `waitUntil` are two different interfaces for very
similar concepts.
## Solution:
- Add `backoff` and `retryOnFail` flags to `waitUntil()`.
- `waitUntil(…, {retryOnFail:true})` returns `undefined` if it never
properly resolves.
- `waitUntil(…, {retryOnFail:false})` throws if it never properly
resolves.
- Delete `withRetries()`.
chungjac
pushed a commit
to chungjac/aws-toolkit-vscode
that referenced
this pull request
Jan 24, 2025
## Problem:
`withRetries` and `waitUntil` are two different interfaces for very
similar concepts.
## Solution:
- Add `backoff` and `retryOnFail` flags to `waitUntil()`.
- `waitUntil(…, {retryOnFail:true})` returns `undefined` if it never
properly resolves.
- `waitUntil(…, {retryOnFail:false})` throws if it never properly
resolves.
- Delete `withRetries()`.
s7ab059789
pushed a commit
to s7ab059789/aws-toolkit-vscode
that referenced
this pull request
Feb 19, 2025
## Problem:
`withRetries` and `waitUntil` are two different interfaces for very
similar concepts.
## Solution:
- Add `backoff` and `retryOnFail` flags to `waitUntil()`.
- `waitUntil(…, {retryOnFail:true})` returns `undefined` if it never
properly resolves.
- `waitUntil(…, {retryOnFail:false})` throws if it never properly
resolves.
- Delete `withRetries()`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
We had 2 different implementation of similar code, between withRetries and waitUntil.
We couldn't easily merge them though since behavior was slightly different when it came to expected return types, and since one threw and the other did not.
Solution:
As a solution we keep both methods but they share the same underlying code.
feature/xbranches will not be squash-merged at release time.