aws-sdk-go-v2 icon indicating copy to clipboard operation
aws-sdk-go-v2 copied to clipboard

service/cloudformation: Missing waiters that were in v1 SDK

Open saada opened this issue 3 years ago • 4 comments

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.

saada avatar Feb 04 '21 17:02 saada

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.

jasdel avatar Mar 03 '21 17:03 jasdel

What's the status on this? When can we expect these waiters to be ported?

talentedmrjones avatar Jun 08 '21 22:06 talentedmrjones

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 avatar Oct 21 '21 04:10 shairozan

@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
}

qhenkart avatar Oct 22 '21 09:10 qhenkart

All the waiters present in V1 SDK version of the CloudFormation client are now available in the V2 SDK version.

skmcgrail avatar Sep 28 '22 15:09 skmcgrail

⚠️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.

github-actions[bot] avatar Sep 28 '22 15:09 github-actions[bot]

udFormation client are now available in the V2 SDK version.

Hi, @skmcgrail , sorry where can I find the functions e.g. WaitUntilStackDeleteComplete?

yongzhang avatar Jul 17 '23 06:07 yongzhang

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.

yongzhang avatar Jul 17 '23 09:07 yongzhang