Skip to content

Commit c509bb2

Browse files
authored
Merge pull request #8169 from maximrub/fix/bug-8168-alibaba-cloud-endpoint-reloving
fix bug 8168 GetEndpoint resolving fail
2 parents b167235 + e239358 commit c509bb2

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)