Skip to content

Conversation

@vdombrovski
Copy link
Contributor

All "icon" fields are set to be of resourceiconresponse type, however that type is not defined anywhere, making the icon field resolving to a string.

This isn't correct as ACS returns the Icon as an object, which in term causes these types of error:

json: cannot unmarshal object into Go struct field VirtualMachinesMetric.virtualmachine.icon of type string

This change sets the type of resourceiconresponse type to be an empty interface{}, to guarantee some backward compatibility and ensure that the unmarshalling works as intended.

Tested againt ACS 4.17.1

@vdombrovski vdombrovski mentioned this pull request Jan 24, 2023
@rohityadavcloud
Copy link
Member

cc @davidjumani @shwstppr can you assist?

@vdombrovski
Copy link
Contributor Author

Btw I know this is out of scope as ACS 4.17 support is still drafted here #38, but some repos downstream depend on this change (in my case https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack)

@shwstppr
Copy link
Contributor

Merging based on approvals

@shwstppr shwstppr merged commit 0051876 into apache:main Mar 31, 2023
@yelbom
Copy link

yelbom commented Apr 30, 2023

🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants