You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified all of my SDK modules are up-to-date (you can perform a bulk update with go get -u github.com/aws/aws-sdk-go-v2/...)
Describe the bug
Issue: When we make call to DescribeVpcEndpoints it returns this State field with value in all characters lower case (available) contrary to what the client State constant defines first character in upper case(Available).
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
I expect DescribeVpcEndpoints returns the State field with enum using the same casing as defined in the State.
For example the string value for State should be like Failed and not like failed .
Current Behavior
DescribeVpcEndpoints returns the State field string value in all lower case like failed.
Reproduction Steps
Here is the sample code to reproduce the issue.
Replace with real vpcEndpointId .
if the result says Expected Success then there is no issue and if it returns Manipulated Success then this bug exists.
package main
import (
"context"
"fmt"
"log"
"strings"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/aws/aws-sdk-go-v2/service/ec2/types"
)
func main() {
ctx := context.TODO()
cfg, err := config.LoadDefaultConfig(ctx)
if err != nil {
log.Fatal(err)
}
client := ec2.NewFromConfig(cfg)
input := &ec2.DescribeVpcEndpointsInput{
VpcEndpointIds: []string{"<vpc-endpoint-id>"},
}
vpcEndpointsOutput, err := client.DescribeVpcEndpoints(ctx, input)
if err != nil {
fmt.Println("failed", err)
}
state := vpcEndpointsOutput.VpcEndpoints[0].State
fmt.Println(state)
states := types.StatePending.Values()
for _, s := range states {
if strings.ToLower(string(s)) == strings.ToLower(string(state)) {
fmt.Println("checking the correct value")
fmt.Println(s)
if s == types.StateAvailable {
fmt.Println("Manipulated Success")
}
}
}
if state == types.StateAvailable {
fmt.Println("Expected Success")
}
}
Possible Solution
Not sure if this issue is related to deserialization of issue at the server and client values for State.
Additional Information/Context
NA
AWS Go SDK V2 Module Versions Used
This list is too big. The ticket creation failed so I omitted the information, I can provide the details in the comment later.
Compiler and Version used
go version go1.23.0 darwin/amd64
Operating System and version
macOS Sonoma Version 14.6.1
The text was updated successfully, but these errors were encountered:
I have reproduced and confirmed that this is an issue. This was also reported in the past and not yet fixed by the EC2 service team #2864 , and I am tracking internal ticket (#70319347). I will reach out to the service team once again to try and get them to fix it.
I'll be closing this issue in favor of tracking it in the original reported github issue
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.
Thanks @bhavya2109sharma for the updates!
Not sure if it would be a good idea to close this ticket but I would leave it up to you.
With this ticket being closed, someone else might create a new ticket for the same issue as folks mostly check the open tickets. The original ticket is open with older version of sdk which most of the folks won't check.
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
Issue: When we make call to
DescribeVpcEndpoints
it returns this State field with value in all characters lower case (available) contrary to what the client State constant defines first character in upper case(Available).Regression Issue
Expected Behavior
I expect
DescribeVpcEndpoints
returns theState
field with enum using the same casing as defined in the State.For example the string value for State should be like
Failed
and not likefailed
.Current Behavior
DescribeVpcEndpoints
returns theState
field string value in all lower case likefailed
.Reproduction Steps
Here is the sample code to reproduce the issue.
Replace with real
vpcEndpointId
.if the result says
Expected Success
then there is no issue and if it returnsManipulated Success
then this bug exists.Possible Solution
Not sure if this issue is related to deserialization of issue at the server and client values for State.
Additional Information/Context
NA
AWS Go SDK V2 Module Versions Used
This list is too big. The ticket creation failed so I omitted the information, I can provide the details in the comment later.
Compiler and Version used
go version go1.23.0 darwin/amd64
Operating System and version
macOS Sonoma Version 14.6.1
The text was updated successfully, but these errors were encountered: