Azure-sdk-for-go: HDInsight Location Client Fails to Deserialize VersionSpec Model

Created on 28 Jan 2021  路  11Comments  路  Source: Azure/azure-sdk-for-go

Bug Report

  • import path of package: github.com/Azure/azure-sdk-for-go/profiles/latest/hdinsight/mgmt/hdinsight
  • SDK version e.g. v50.0.2 ...but also all prior versions...I think it's been incorrect for 2+ years?
  • go.mod:
go 1.15

require (
    github.com/Azure/azure-sdk-for-go v50.2.0+incompatible
    github.com/Azure/go-autorest/autorest/azure/auth v0.5.6
    github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
    github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
)
  • output of go version : go version go1.15.7 darwin/amd64

hdinsight.LocationsClient#GetCapabilities: Failure responding to request: StatusCode=200 -- Original Error: Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal bool into Go struct field VersionSpec.versions.available.isDefault of type string'

I verified locally that altering the type of IsDefault to *bool instead of *string in the above model does solve the problem. Is a PR with the type change the right way to fix this, or is it more involved?

HDInsight bug customer-reported

Most helpful comment

The Go SDK team is working on releasing. Hi @ArcturusZhang could you please check the release request?

This will be released in next week's major version.

All 11 comments

Hi @jamisonhyatt thanks for this issue and sorry for the inconvenience!

We do know this issue, which comes from a swagger mistake. We just fixed this in the swagger 6 days ago (see this PR) but this fix causes breaking changes in this package, we have to release it in the next major version (end of this month). In the new version, this issue will be resolved.

Checking

As Arcturus said, this has been fixed from swagger spec side, we will update related sdk soon.

As Arcturus said, this has been fixed from swagger spec side, we will update related sdk soon.

I know that we have released a new version for hdinsight recently, but could you please make another release request to make sure that we would not miss this package in the next major version release?

As Arcturus said, this has been fixed from swagger spec side, we will update related sdk soon.

I know that we have released a new version for hdinsight recently, but could you please make another release request to make sure that we would not miss this package in the next major version release?

Now we need to hold on the release request. there are still some ongoning changes.

Still need to wait some days.

still need to wait, we will release it soon.

The Go SDK team is working on releasing. Hi @ArcturusZhang could you please check the release request?

The Go SDK team is working on releasing. Hi @ArcturusZhang could you please check the release request?

This will be released in next week's major version.

Hi @ArcturusZhang Is the Go SDK available now? Thanks~

We have released an update for hdinsight in v54.0.0, and this property has been changed to bool here: https://github.com/Azure/azure-sdk-for-go/blob/f531174e50dc985270a91713d205c6ddc449e378/services/hdinsight/mgmt/2018-06-01/hdinsight/models.go#L2777

I suppose this has been fixed, therefore I am going to close this issue, thank you @aim-for-better !
@jamisonhyatt could you please also have a test using the latest version of the SDK?

Was this page helpful?
0 / 5 - 0 ratings