aws-sdk-go-v2 icon indicating copy to clipboard operation
aws-sdk-go-v2 copied to clipboard

EKS DescribeClusterVersions status type mismatch

Open hjoshi123 opened this issue 11 months ago • 3 comments

Acknowledgements

  • [X] I have searched (https://github.com/aws/aws-sdk/issues?q=is%3Aissue) for past instances of this issue
  • [X] 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

When a call to DescribeClusterVersions API is made it returns the following both from the CLI and SDK

 {
            "clusterVersion": "1.28",
            "clusterType": "eks",
            "defaultPlatformVersion": "eks.33",
            "defaultVersion": false,
            "releaseDate": "2023-09-25T18:00:00-06:00",
            "endOfStandardSupportDate": "2024-11-25T17:00:00-07:00",
            "endOfExtendedSupportDate": "2025-11-25T17:00:00-07:00",
            "status": "EXTENDED_SUPPORT",
            "kubernetesPatchVersion": "1.28.15"
        },

However, the enum values in the code refers to different types of values as shown below:

const (
	ClusterVersionStatusUnsupported     ClusterVersionStatus = "unsupported"
	ClusterVersionStatusStandardSupport ClusterVersionStatus = "standard-support"
	ClusterVersionStatusExtendedSupport ClusterVersionStatus = "extended-support"
)

Regression Issue

  • [ ] Select this option if this issue appears to be a regression.

Expected Behavior

The enum type values should match the value returned by the API and CLI.

Current Behavior

The enum values are not matching.

Reproduction Steps

aws eks describe-cluster-versions --region us-west-2

Note the status field on the output.

Possible Solution

No response

Additional Information/Context

This is causing the following PR https://github.com/hashicorp/terraform-provider-aws/pull/40741 to break since the status type is of the ClusterVersionStatus.

AWS Go SDK V2 Module Versions Used

github.com/aws/aws-sdk-go-v2/service/eks v1.56.0

Compiler and Version used

go version go1.23.4 darwin/arm64

Operating System and version

MacOS 15.3

hjoshi123 avatar Jan 06 '25 00:01 hjoshi123

Hello @hjoshi123, thanks for reaching out and finding out the issue. The issue is that there is a discrepancy between the Service Response and the Service Model. I have reached out to the EKS Service team for fix and will provide an update. If you have any other questions, please let me know. Thanks.

adev-code avatar Jan 08 '25 19:01 adev-code

Thank you @adev-code for looking into the issue. Let me know if I can contribute somehow.

hjoshi123 avatar Jan 08 '25 20:01 hjoshi123

Welcome @hjoshi123 , just providing an internal ticket here for reference: P186768396. In the meantime, you could have a string literal or an enum (let's say for comparison). If you have any further questions, please let me know. Thanks

adev-code avatar Jan 08 '25 21:01 adev-code