Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The property type of "Version" for Management Partner is inconsistent between azure client side and azure server side #8178

Closed
neil-yechenwei opened this issue Jan 17, 2020 · 3 comments
Assignees
Labels
Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@neil-yechenwei
Copy link

neil-yechenwei commented Jan 17, 2020

I tried to create association with azure go sdk (https://github.com/Azure/azure-sdk-for-go/tree/master/services/preview/managementpartner/mgmt/2018-02-01/managementpartner) but it failed and threw below error message. After investigated, the failure is caused by type conversion issue. The property type of “Version” in azure go sdk (https://github.com/Azure/azure-sdk-for-go/blob/fa96a3744b0e40e6e0d3ddf985f80cfe2d51d6d6/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/models.go#L258) and azure rest api spec (

) is “string”. However, the property type of “Version” in the response returned from azure side is number. As they are inconsistent, so it encountered type conversion issue. After updated the property type of “Version” from “string” to number type in my local azure go sdk package, then it can create assocation successfully. So could you help to have a look? If it’s a bug, could you help to fix it asap since we’re blocked on here. I also filed an issue on repo azure rest api spec (). Thanks.

Error message:
Error: Error creating Management Partner "xxxxxx": managementpartner.PartnerClient#Create: Failure responding to request: StatusCode=200 -- Original Error: Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal number into Go struct field PartnerProperties.version of type string' JSON = '{"id":"/providers/microsoft.managementpartner/partners/xxxxx","type":"Microsoft.ManagementPartner/partners","name":"xxxx","etag":19,"properties":{"partnerId":"xxxx","partnerName":"xxxxx","tenantId":"xxxxx","objectId":"xxxxxx","version":19,"updatedTime":"2020-01-17T03:53:37.7735538Z","createdTime":"2020-01-17T01:44:06.3772514Z","state":"Active"}}'

on main.tf line 1, in resource "azurerm_management_partner" "example":
1: resource "azurerm_management_partner" "example" {

@neil-yechenwei
Copy link
Author

@jeffrey-ace , could you help to have a look for this issue? If it's a bug, please help to fix it asap since we're blocked on it. Thanks so much.

@weidongxu-microsoft weidongxu-microsoft added the Service Attention Workflow: This issue is responsible by Azure service team. label Jan 18, 2020
@weidongxu-microsoft
Copy link
Member

Hello @jeffrey-ace, this appears to be an inconsistency between swagger spec and service implementation on managementpartner. Could you take a look?

@ArcturusZhang
Copy link
Member

This issue has been resolved in #8276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants