Skip to content

Conversation

@hermanschaaf
Copy link
Member

This is a defensive change to ensure that we exit the loop regardless of whether the AWS SDK returns an empty string or a nil value for NextToken.

@cq-bot cq-bot added the aws label Apr 6, 2023
res <- describeContainerInstances.ContainerInstances

if listContainerInstances.NextToken == nil {
if aws.ToString(listContainerInstances.NextToken) == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think ECS supports a paginator for ListContainerInstances

res <- describeServicesOutput.Services

if listServicesOutput.NextToken == nil {
if aws.ToString(listServicesOutput.NextToken) == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe use the ECS ListServices paginator instead

@hermanschaaf hermanschaaf merged commit 7670494 into main Apr 6, 2023
@hermanschaaf hermanschaaf deleted the check-token-strings branch April 6, 2023 12:44
@hermanschaaf
Copy link
Member Author

Merging the change for now - I will follow up later with changes to use paginators. I think there will be more cases where we can use paginators than just the services touched in this PR

kodiakhq bot pushed a commit that referenced this pull request Apr 11, 2023
🤖 I have created a release *beep* *boop*
---


## [16.1.0](plugins-source-aws-v16.0.1...plugins-source-aws-v16.1.0) (2023-04-11)


### Features

* **aws-services:** Support newly added regions ([#9821](#9821)) ([4d7f388](4d7f388))
* **aws:** Parallelize resolution of  `aws_iot_billing_groups` ([#9809](#9809)) ([e759661](e759661))
* **aws:** Parallelize resolution of `aws_iot_ca_certificates` ([#9808](#9808)) ([d491460](d491460))
* **aws:** Parallelize resolution of `aws_iot_jobs` ([#9810](#9810)) ([9b85678](9b85678))
* **aws:** Parallelize resolution of `aws_iot_policies` ([#9806](#9806)) ([b9a9d06](b9a9d06))
* **aws:** Parallelize resolution of `aws_iot_security_profiles` ([#9807](#9807)) ([45705f1](45705f1))
* **aws:** Parallelize resolution of `aws_iot_streams` ([#9804](#9804)) ([9b622e0](9b622e0))
* **aws:** Parallelize resolution of `aws_iot_thing_groups` ([#9805](#9805)) ([f5047b9](f5047b9))
* **aws:** Parallelize resolution of `aws_iot_topic_rules` ([#9803](#9803)) ([d344815](d344815))


### Bug Fixes

* **aws-policies:** Update Query to properly handle a string and array ([#9815](#9815)) ([012347f](012347f)), closes [#9763](#9763)
* **aws:** Inspector Classic fetch details use proper limits ([#9816](#9816)) ([225a796](225a796))
* **aws:** Replace Manually paginated calls with paginator where available ([#9765](#9765)) ([b64d152](b64d152))
* **aws:** Replace more manual pagination with Paginator objects ([#9754](#9754)) ([1d27dca](1d27dca))
* **deps:** Update module github.com/aws/aws-sdk-go-v2 to v1.17.8 ([#9781](#9781)) ([69bb790](69bb790))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/config to v1.18.20 ([#9782](#9782)) ([1febd5b](1febd5b))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.61 ([#9791](#9791)) ([f9dcef8](f9dcef8))
* Fix case on arn attribute ([#9757](#9757)) ([0719095](0719095))
* Use aws.ToString(output.NextToken) when checking tokens ([#9750](#9750)) ([7670494](7670494))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.

5 participants