Skip to content
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

s3control types.PublicAccessBlockConfiguration failing to serialize correctly when all (boolean) fields are false #2384

Closed
ewbankkit opened this issue Nov 21, 2023 · 4 comments · Fixed by #2385
Labels
bug This issue is a bug. service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@ewbankkit
Copy link

ewbankkit commented Nov 21, 2023

Describe the bug

The s3control service's types.PublicAccessBlockConfiguration structure fails to serialize correctly when all its (boolean) fields are false:

input := &s3control.PutPublicAccessBlockInput{
	AccountId: aws.String("123456789012"),
	PublicAccessBlockConfiguration: &types.PublicAccessBlockConfiguration{
		BlockPublicAcls:       false,
		BlockPublicPolicy:     false,
		IgnorePublicAcls:      false,
		RestrictPublicBuckets: false,
	},
}

HTTP request and response:

  http.request.body=
  | <PublicAccessBlockConfiguration xmlns="http://awss3control.amazonaws.com/doc/2018-08-20/"></PublicAccessBlockConfiguration>
  http.response.body=
  | <?xml version="1.0" encoding="UTF-8"?>
  | <ErrorResponse><Error><Code>InvalidRequest</Code><Message>Must specify at least one configuration.</Message></Error><RequestId>7ESN3M87GKFSGK0T</RequestId><HostId>XoGVKFltZ6t++IFu6TDSibAhtgLGAPC9xSUa/kv+UEm6lxmQNeurd3TWYgVPGaFj5pzjiXoIv/g=</HostId></ErrorResponse>

Expected Behavior

Expected no error (AWS SDK for Go v1 behavior).

Current Behavior

See above.

Reproduction Steps

See above.

Possible Solution

No response

Additional Information/Context

Relates #2162.

AWS Go SDK V2 Module Versions Used

% grep s3control go.mod
	github.com/aws/aws-sdk-go-v2/service/s3control v1.37.1

Compiler and Version used

go version go1.20.10 darwin/amd64

Operating System and version

macOS Ventura 13.6

@ewbankkit ewbankkit added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 21, 2023
@lucix-aws
Copy link
Contributor

It's unclear why this was missed in the bulk s3 update that just went out. I'll check with the smithy folks.

@lucix-aws lucix-aws added service-api This issue is due to a problem in a service API, not the SDK implementation. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 21, 2023
@lucix-aws
Copy link
Contributor

Sorry -- missed that it was s3control. The equivalent in the s3 namespace was updated on Friday.

This was a miss in the previous update that addressed s3control. The smithy team has opened ticket [internal tracking V1120201288] to address this in the s3control model.

@lucix-aws
Copy link
Contributor

@ewbankkit We've been advised to patch this locally to the SDK for now given the potential lead time on having it fixed upstream. I've done so in #2385.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants