go version: 1.16.3Azure portal payload:
{"properties":
{"properties":
{"scaleSettings":
{"minNodeCount":2,
"maxNodeCount":3,
"nodeIdleTimeBeforeScaleDown":"PT900S"
}
}
}
}
Go SDK payload:
{"properties":
{"scaleSettings":
{"maxNodeCount":2,
"minNodeCount":1,
"nodeIdleTimeBeforeScaleDown":"PT60S"
}
}
}
Hi @gro1m thanks for opening this issue!
Unfortunately this schema error comes from the corresponding swagger here: https://github.com/Azure/azure-rest-api-specs/blob/03a759c3b3c86cecc1c6030cc5e4d6940437706a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-04-01/machineLearningServices.json#L3942
Please note this comes from the latest stable api-version 2021-04-01, which means releasing a new api-version cannot solve this.
Therefore I have tagged this issue so that the corresponding service team could take a look and fix their swagger or change their payload format so that the current swagger could work.
In the meantime, we must pause the release of a new api-version 2021-04-01 as requested in this issue
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.
Issue Details
go version: 1.16.3Azure portal payload:
{"properties":
{"properties":
{"scaleSettings":
{"minNodeCount":2,
"maxNodeCount":3,
"nodeIdleTimeBeforeScaleDown":"PT900S"
}
}
}
}
Go SDK payload:
{"properties":
{"scaleSettings":
{"maxNodeCount":2,
"minNodeCount":1,
"nodeIdleTimeBeforeScaleDown":"PT60S"
}
}
}
| Author: | gro1m |
|---|---|
| Assignees: | - |
| Labels: | `Machine Learning Compute`, `Service Attention`, `bug`, `customer-reported`, `needs-triage` |
| Milestone: | - |
@ArcturusZhang Hmm, the swagger does show double property level, that's the payload that actually works (i.e. the one portal sends in the issue). When I use REST API UI - that payload works with any API version. How come Go SDK marshals it incorrectly though?
@ArcturusZhang Hmm, the swagger does show double property level, that's the payload that actually works (i.e. the one portal sends in the issue). When I use REST API UI - that payload works with any API version. How come Go SDK marshals it incorrectly though?
The swagger does not have the double properties. Please see the comment below
"ClusterUpdateParameters": {
"properties": { # This `properties` is a keyword, indicating the following are a map of the properties.
"properties": { # This is the first property of ClusterUpdateParameters, it happens to have a name `properties`.
"x-ms-client-flatten": true,
"$ref": "#/definitions/ClusterUpdateProperties",
"description": "The properties of the amlCompute."
}
},
"description": "AmlCompute update parameters."
},
If we want something with double properties in the swagger, we will have to write this:
"ClusterUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ClusterUpdateParametersProperties",
"description": "The properties of the amlCompute."
}
},
"description": "AmlCompute update parameters."
},
"ClusterUpdateParametersProperties": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ClusterUpdateProperties",
"description": "The properties of the amlCompute."
}
},
"description": "AmlCompute update parameters."
},
Or if you find the name properties is confusing, you could try to write a swagger schema with two levels of something and it should looks like this:
"ClusterUpdateParameters": {
"properties": {
"something": {
"$ref": "#/definitions/ClusterUpdateParametersProperties",
"description": "The properties of the amlCompute."
}
},
"description": "AmlCompute update parameters."
},
"ClusterUpdateParametersProperties": {
"properties": {
"something": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ClusterUpdateProperties",
"description": "The properties of the amlCompute."
}
},
"description": "AmlCompute update parameters."
}
Oh nevermind, I should learn to read swagger in the morning. Yep, thank you very much for the detailed explanation. I indeed got confused by the "properties" keyword of swagger itself.
Oh nevermind, I should learn to read swagger in the morning. Yep, thank you very much for the detailed explanation. I indeed got confused by the "properties" keyword of swagger itself.
I have written some internal emails to inform the service team about this bug, waiting for their responses now.
Most helpful comment
I have written some internal emails to inform the service team about this bug, waiting for their responses now.