-
Notifications
You must be signed in to change notification settings - Fork 663
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
ListObjectVersions
and ListMultipartUploads
paginators send 0 for max items when input is nil
#2379
Comments
The handwritten paginator for
As an aside, the behavior of default value serialization in the SDK itself was not changed. The service model was updated in a way that causes us to instead generate the affected fields like this as |
Linked PR will correct this behavior. Note that explicit use of |
ListObjectVersions
API's MaxKeys
default value causes no object versions to be returnedListObjectVersions
and ListMultipartUploads
paginators send 0 for max items when input is nil
|
**Issue:** We realised that whilst bumping `aws-sdk-go-v2/services/s3` to version `1.44.0` we found a breaking change where a default value for `MaxKeys` in the `ListObjectVersionsInput` struct was being set to `0`, resulting in 0 versions being returned. It should have been `1 000`. ``` input := &s3.ListObjectVersionsInput{ Bucket: aws.String("tf-acc-test-7828939106372858870"), MaxKeys: aws.Int32(1000), } ``` More details: aws/aws-sdk-go-v2#2379 **Workaround:** We are explicitly setting the `MaxKeys` to `1_000` as it should be. [#186503787] Signed-off-by: Diego Lemos <[email protected]>
**Issue:** We realised that whilst bumping `aws-sdk-go-v2/services/s3` to version `1.44.0` we found a breaking change where a default value for `MaxKeys` in the `ListObjectVersionsInput` struct was being set to `0`, resulting in 0 versions being returned. It should have been `1 000`. ``` input := &s3.ListObjectVersionsInput{ Bucket: aws.String("tf-acc-test-7828939106372858870"), MaxKeys: aws.Int32(1000), } ``` More details: aws/aws-sdk-go-v2#2379 **Workaround:** We are explicitly setting the `MaxKeys` to `1_000` as it should be. [#186503787] Signed-off-by: Diego Lemos <[email protected]>
**Issue:** We realised that whilst bumping `aws-sdk-go-v2/services/s3` to version `1.44.0` we found a breaking change where a default value for `MaxKeys` in the `ListObjectVersionsInput` struct was being set to `0`, resulting in 0 versions being returned. It should have been `1 000`. ``` input := &s3.ListObjectVersionsInput{ Bucket: aws.String("tf-acc-test-7828939106372858870"), MaxKeys: aws.Int32(1000), } ``` More details: aws/aws-sdk-go-v2#2379 **Workaround:** We are explicitly setting the `MaxKeys` to `1_000` as it should be. [#186503787] Signed-off-by: Diego Lemos <[email protected]>
**Issue:** We realised that whilst bumping `aws-sdk-go-v2/services/s3` to version `1.44.0` we found a breaking change where a default value for `MaxKeys` in the `ListObjectVersionsInput` struct was being set to `0`, resulting in 0 versions being returned. It should have been `1 000`. ``` input := &s3.ListObjectVersionsInput{ Bucket: aws.String("tf-acc-test-7828939106372858870"), MaxKeys: aws.Int32(1000), } ``` More details: aws/aws-sdk-go-v2#2379 **Workaround:** We are explicitly setting the `MaxKeys` to `1_000` as it should be. [#186503787] Signed-off-by: Diego Lemos <[email protected]>
* Bump github.com/aws/aws-sdk-go-v2 in /src/s3-blobstore-backup-restore Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.22.2 to 1.23.0. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@v1.22.2...v1.23.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump github.com/aws/aws-sdk-go-v2/credentials Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.15.2 to 1.16.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.16.1/CHANGELOG.md) - [Commits](aws/aws-sdk-go-v2@config/v1.15.2...v1.16.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump github.com/aws/aws-sdk-go-v2/service/sts Bumps [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) from 1.25.1 to 1.25.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@config/v1.25.1...config/v1.25.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump github.com/aws/aws-sdk-go-v2/service/s3 Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.42.1 to 1.43.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@service/s3/v1.42.1...service/s3/v1.43.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Fix compilation issues * Fix version pagination by adding default batch size **Issue:** We realised that whilst bumping `aws-sdk-go-v2/services/s3` to version `1.44.0` we found a breaking change where a default value for `MaxKeys` in the `ListObjectVersionsInput` struct was being set to `0`, resulting in 0 versions being returned. It should have been `1 000`. ``` input := &s3.ListObjectVersionsInput{ Bucket: aws.String("tf-acc-test-7828939106372858870"), MaxKeys: aws.Int32(1000), } ``` More details: aws/aws-sdk-go-v2#2379 **Workaround:** We are explicitly setting the `MaxKeys` to `1_000` as it should be. [#186503787] Signed-off-by: Diego Lemos <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Diego Lemos <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Konstantin Semenov <[email protected]>
Describe the bug
My specific problem is to do with the S3 API's
ListObjectVersionsInput.MaxKeys
field, but the underlying cause may affect other APIs.The recent (https://github.com/aws/aws-sdk-go-v2/releases/tag/release-2023-11-17) change to default value serialization, #2162, has caused the S3
ListObjectVersions
API to return no object versions when no value (nownil
) is specified forListObjectVersionsInput.MaxKeys
.Previously (https://github.com/aws/aws-sdk-go-v2/releases/tag/release-2023-11-16) up to 1000 object versions were returned when no value was specified, as documented in the API Reference:
Sniffing the HTTP request I can now see an explicit
max-keys=0
URL query parameter added.Expected Behavior
If no value for
ListObjectVersionsInput.MaxKeys
is specified, up to 1000 object version should be returned.Current Behavior
See above.
Reproduction Steps
leads to
Possible Solution
No response
Additional Information/Context
Workaround is to add an explicit default value:
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.20.10 darwin/amd64
Operating System and version
macOS Ventura 13.6
The text was updated successfully, but these errors were encountered: