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

Kusto: Wrong type of ReadWriteDatabaseProperties#isFollowed #9450

Closed
jrauschenbusch opened this issue May 13, 2020 · 10 comments · Fixed by #9500
Closed

Kusto: Wrong type of ReadWriteDatabaseProperties#isFollowed #9450

jrauschenbusch opened this issue May 13, 2020 · 10 comments · Fixed by #9500
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@jrauschenbusch
Copy link

ReadWriteDatabaseProperties#isFollowed must be of type bool, but is of type string.

https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json#L2879

This leads to a unmarshal error within the Go library.

Bug reference: Azure/azure-sdk-for-go#9339

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 13, 2020
@ghost ghost added the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label May 13, 2020
@PhoenixHe-NV
Copy link
Contributor

@ArcturusZhang Could you help on this go sdk issue?

@ArcturusZhang ArcturusZhang added customer-reported Issues that are reported by GitHub users external to the Azure organization. Kusto Service Attention Workflow: This issue is responsible by Azure service team. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 14, 2020
@ghost
Copy link

ghost commented May 14, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @radennis.

@jrauschenbusch
Copy link
Author

I think this should be a valid fix for the issue:

diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json
index 9f6452aaa..de503c5dc 100644
--- a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json
+++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2020-02-15/kusto.json
@@ -2877,7 +2877,7 @@
           "description": "The statistics of the database."
         },
         "isFollowed": {
-          "type": "string",
+          "type": "boolean",
           "readOnly": true,
           "description": "Indicates whether the database is followed."
         }
-- 

It seems that the real API returns a Boolean value, but the model indicates that it is a string.

@docohe
Copy link
Contributor

docohe commented May 18, 2020

Hi, I'm Dor for Kusto team.
@jrauschenbusch your fix should work. Do you need us to make the change or can you do it ?

@jrauschenbusch
Copy link
Author

jrauschenbusch commented May 18, 2020

I'll open an PR. The question would be, if this should also be applied to the API 2019-11-09, as the property was also already available there, but also of type string. I don't know if this was intended there, or if it's also a bug within the spec.

see https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2019-11-09/kusto.json#L2711

I also have to scan the Examples, if this property was used and also have to update it.

Some feedback would be really good.

@docohe
Copy link
Contributor

docohe commented May 18, 2020

Both versions need this fix. I've checked and we don't use this property in the examples.

@jrauschenbusch
Copy link
Author

PR is created. The rest is up to you now 😄

@docohe
Copy link
Contributor

docohe commented May 18, 2020

Sorry I mistakenly though you are a Microsoft employee, I will handle the PR.

@jrauschenbusch
Copy link
Author

Hey @docohe,

Sorry I mistakenly though you are a Microsoft employee

not yet ;-) alright, just ping back as soon as the fix is out.

Thanks

@docohe
Copy link
Contributor

docohe commented Jun 2, 2020

Hi @jrauschenbusch a new GO SDK version is now available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
4 participants