Skip to content

Commit adadd3d

Browse files
authored
Merge pull request #8432 from k8s-infra-cherrypick-robot/cherry-pick-8169-to-cluster-autoscaler-release-1.32
[cluster-autoscaler-release-1.32] fix bug 8168 GetEndpoint resolving fail
2 parents 5b14f11 + 13b656a commit adadd3d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cluster-autoscaler/cloudprovider/alicloud/alibaba-cloud-sdk-go/sdk/endpoints/location_resolver.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ func (resolver *LocationResolver) TryResolve(param *ResolveParam) (endpoint stri
8989
return
9090
}
9191

92-
err = json.Unmarshal([]byte(response.GetHttpContentString()), &getEndpointResponse)
92+
content := response.GetHttpContentString()
93+
err = json.Unmarshal([]byte(content), &getEndpointResponse)
9394
if err != nil {
94-
klog.Errorf("failed to unmarshal endpoint response, error: %v", err)
95+
klog.Errorf("failed to resolve endpoint, error: %v, response: %s", err, content)
9596
support = false
9697
return
9798
}
@@ -153,7 +154,7 @@ type EndpointsObj struct {
153154

154155
// EndpointObj wrapper endpoint
155156
type EndpointObj struct {
156-
Protocols map[string]string
157+
Protocols json.RawMessage
157158
Type string
158159
Namespace string
159160
Id string

0 commit comments

Comments
 (0)