Skip to content
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(clients): adding throwable waiters WaitUntil[operationState] #2302

Merged
merged 6 commits into from
May 7, 2021

Conversation

alexforsyth
Copy link
Contributor

Issue

#1917
Issue number, if available, prefixed with "#"

Description

  1. Adds another method: WaitUntilBlahBlah that throws when a waiter enters a non-success state
  2. Adds a deprecation flag to WaitForBlahBlah since it doesn't throw.
  3. Adds an optional reason type to the waiterResultObject. This gives clues as to why a waiter entered a particular state.

What does this implement/fix? Explain your changes.

Testing

How was this change tested?

Additional context

Add any other context about the PR here.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@48ab750). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2302   +/-   ##
=======================================
  Coverage        ?   60.02%           
=======================================
  Files           ?      472           
  Lines           ?    24847           
  Branches        ?     5885           
=======================================
  Hits            ?    14915           
  Misses          ?     9932           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48ab750...8cb0932. Read the comment docs.

@AllanZhengYP
Copy link
Contributor

This PR needs rebase @alexforsyth

@alexforsyth alexforsyth reopened this Apr 30, 2021
@AllanZhengYP
Copy link
Contributor

All the SDK related interfaces should be exported from @aws-sdk/types package, including waiters interface. It will help users as well as documentation. You need to export them from @aws-sdk/types and reexport them in @aws-sdk/util-waiter to avoid breaking change.

Comment on lines +14 to +17
/**
* @deprecated Use abortSignal
* Abort controller. Used for ending the waiter early.
*/
Copy link
Member

Choose a reason for hiding this comment

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

Remove documentation, as we're now recommending customers to use abortSignal.

Suggested change
/**
* @deprecated Use abortSignal
* Abort controller. Used for ending the waiter early.
*/
/**
* @deprecated Use `abortSignal` instead.
*/

packages/util-waiter/src/waiter.ts Outdated Show resolved Hide resolved
@alexforsyth alexforsyth merged commit f01d5ae into aws:main May 7, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants