aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

Cloud Control ResourceRequestSuccess waiter should succeed when OperationStatus == 'CANCEL_COMPLETE` #1987

Closed tim-finnigan closed 3 months ago

tim-finnigan commented 3 months ago

Name of the resource

Other

Resource Name

Cloud Control

Issue Description

Original issue: https://github.com/boto/botocore/issues/2710

Because service teams own their waiter implementations in SDKs, I am redirecting this issue here. If there is a better place to open it, please let me know.

Expected Behavior


Describe the bug

ResourceRequestSuccess waiter should also succeed when ProgressEvent.OperationStatus reaches CANCEL_COMPLETE (see https://github.com/boto/botocore/blob/develop/botocore/data/cloudcontrol/2021-09-30/waiters-2.json for details).

Expected Behavior

The waiter resource_request_success should wait until the requests reaches CANCEL_COMPLETE and does not throw any error.

Current Behavior

botocore.exceptions.WaiterError: Waiter ResourceRequestSuccess failed: Waiter encountered a terminal failure state: For expression "ProgressEvent.OperationStatus" we matched expected path: “CANCEL_COMPLETE"

Reproduction Steps

Suppose we want to cancel an IN_PROGRESS and PENDING resource request using cancel_resource_request(). After we'd like to use the waiter

            self.client.get_waiter("resource_request_success").wait( ...)

to wait until the request reaches CANCEL_COMPLETE state - meaning that the request has been successfully cancelled.

Possible Solution

...      
}, {
        "matcher" : "path",
        "argument" : "ProgressEvent.OperationStatus",
        "state" : "success",
        "expected" : "CANCEL_COMPLETE"
      } ]
}

Observed Behavior

-

Test Cases

Other Details

No response

tim-finnigan commented 3 months ago

Closing to track internally.