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

Handle expected boolean values for waiter error matcher #8804

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

jonathan343
Copy link
Contributor

@jonathan343 jonathan343 commented Jul 17, 2024

AWS CLI v2 version of boto/botocore#3220

Summary

All services currently define waiter error acceptors that have expected string values that represent an AWS Error code like below:

{
  "expected":"ResourceNotFoundFault",
  "matcher":"error",
  "state":"success"
}

A waiter with this acceptor will continue to wait until an error the the code ResourceNotFoundFault is received or the max amount of attempts is reached.

However, it's possible for service teams to define a waiter error acceptor like below which has an expected boolean (true or false) value. The expected behavior is defined below:

  • true - Match an error code with any value.
  • false - Match if no errors were encountered

Example:

{
  "matcher" : "error",
  "expected" : false,
  "state" : "success"
}

A waiter with this acceptor will continue to wait until a response with no error is received or the max amount of attempts is reached.

This CR adds the ability for waiters to handle the acceptors described above.

@jonathan343 jonathan343 requested a review from a team July 17, 2024 22:06
@jonathan343 jonathan343 merged commit c304ce3 into aws:v2 Jul 18, 2024
35 of 36 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.

2 participants