aws / aws-sdk-go-v2

AWS SDK for the Go programming language.
https://aws.github.io/aws-sdk-go-v2/docs/
Apache License 2.0
2.68k stars 651 forks source link

MIGRATION ISSUE: EC2 AttachmentStatus has improper values #2675

Closed pavlo-strokov-scylladb closed 5 months ago

pavlo-strokov-scylladb commented 5 months ago

Pre-Migration Checklist

Go Version Used

Go 1.22

Describe the Migration Issue

I have replaced the old call DescribeInternetGatewaysWithContext with the new one DescribeInternetGateways. The upgraded version return DescribeInternetGatewaysOutput, it has InternetGateways []types.InternetGateway field. The type InternetGateway has field Attachments []InternetGatewayAttachment and type InternetGatewayAttachment has field State AttachmentStatus. The AttachmentStatus is enum type that has predefined values.
What I can see it doesn't have available value that we are using. Also, available is the only value mentioned in the EC2 cli documentation.

Code Comparison

No response

Observed Differences/Errors

SDK v2 provides wrong enum values.

Additional Context

No response

lucix-aws commented 5 months ago

Note not strictly a migration issue since the list of enum variants comes from the service model (i.e. it's the same wrong list in both v1 and v2).

lucix-aws commented 5 months ago

The modeling here definitely seems incorrect based on the documentation mentioning the nonexistent "available" state.

You can work around this with a typecast for the time being.

types.AttachmentStatus("available")

Upstreamed to ec2 @ V1414968710.

github-actions[bot] commented 5 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.