aws-sdk-go-v2
aws-sdk-go-v2 copied to clipboard
service/cloudformation: Missing waiters that were in v1 SDK
- [x] I've gone though the API reference
- [x] I've checked AWS Forums and StackOverflow for answers
- [x] I've searched for previous similar issues and didn't find any solution
Describe the bug
The only waiter I was able to find under Cloudformation is TypeRegistrationCompleteWaiter
. In the v1 SDK we had access to WaitUntilChangeSetCreateComplete
and WaitUntilStackImportComplete
. Those appear to be missing in the new SDK.
Version of AWS SDK for Go? v1.1.0
- get SDK version by printing the output of
aws.SDKVersion
in your code after importing"github.com/aws/aws-sdk-go-v2/aws"
1.1.0 Version of Go (go version
)? go version go1.15 linux/amd64
To Reproduce (observed behavior) cloudformation.WaitUntilChangeSetCreateComplete() existed in SDK-v1 and no longer exists in the SDK-v2.
Expected behavior I expected corresponding waiters to exist to match the missing wait methods.
Thanks for reporting this issue @qhenkart. Similar to #1148, the v2 SDK did not pull over all modeled waiters from the v1 SDK. The Amazon CloudFormation waiters are an example of some of the waiters that have not been ported yet. These waiters were not ported due to a change in how the APIs model their features, and the feature set needed for matching CloudFormation waiter expressions have not be implemented.
We'll use this GitHub issue to track these missing waiters for CloudFormation.
What's the status on this? When can we expect these waiters to be ported?
Seconded on status. It's October and I don't see any movement here. Is there a workaround or plans to port the waiters?
@shairozan I ended up making the waiter myself which was pretty easy. In reference to #1148 you can see how the package was created in v1 https://github.com/aws/aws-sdk-go/blob/v1.37.15/service/route53/waiters.go#L28 and how in v2 they are made similarly https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.2.0/service/s3/api_op_HeadBucket.go#L240
I created it myself here https://github.com/ethereum/go-ethereum/blob/master/cmd/devp2p/dns_route53.go#L161-L181
for _, change := range changesToCheck {
log.Info(fmt.Sprintf("Waiting for change request %s", *change.ChangeInfo.Id))
wreq := &route53.GetChangeInput{Id: change.ChangeInfo.Id}
var count int
for {
wresp, err := c.api.GetChange(context.TODO(), wreq)
if err != nil {
return err
}
count++
if wresp.ChangeInfo.Status == types.ChangeStatusInsync || count >= maxRetryLimit {
break
}
time.Sleep(30 * time.Second)
}
}
return nil
}
All the waiters present in V1 SDK version of the CloudFormation client are now available in the V2 SDK version.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
udFormation client are now available in the V2 SDK version.
Hi, @skmcgrail , sorry where can I find the functions e.g. WaitUntilStackDeleteComplete
?
udFormation client are now available in the V2 SDK version.
Hi, @skmcgrail , sorry where can I find the functions e.g.
WaitUntilStackDeleteComplete
?
found it in DescribeStack with different functions.