azure-sdk-for-go icon indicating copy to clipboard operation
azure-sdk-for-go copied to clipboard

Azure reservations are missing fields in the reservations.Response

Open ianeal opened this issue 3 years ago • 9 comments

Import path of package in question: "github.com/Azure/azure-sdk-for-go/services/preview/reservations/mgmt/2020-10-25/reservations"

SDK version: 54.0.0 go.mod file shows this information: github.com/Azure/azure-sdk-for-go v54.0.0+incompatible

Output of go version go version go1.16 linux/amd64

What happened?

We are converting from an existing implementation which uses straight HTTP requests to use the go SDK and observed that certain fields are missing from the reservations.Response properties when listing the reservations (ie we are using the List function)

The data is in the HTTP response body so it should be straight forward to add the new fields to the struct.

The missing fields are

archived (a boolean) capabilties (a string) swapProperties (a struct, which usually seems to have swapSource and swapDestination, uncertain about any other possible values)

ianeal avatar May 05 '21 17:05 ianeal

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

Issue Details

Import path of package in question: "github.com/Azure/azure-sdk-for-go/services/preview/reservations/mgmt/2020-10-25/reservations"

SDK version: 54.0.0 go.mod file shows this information: github.com/Azure/azure-sdk-for-go v54.0.0+incompatible

Output of go version go version go1.16 linux/amd64

What happened?

We are converting from an existing implementation which uses straight HTTP requests to use the go SDK and observed that certain fields are missing from the reservations.Response properties when listing the reservations (ie we are using the List function)

The data is in the HTTP response body so it should be straight forward to add the new fields to the struct.

The missing fields are

archived (a boolean) capabilties (a string) swapProperties (a struct, which usually seems to have swapSource and swapDestination, uncertain about any other possible values)

Author: ianeal
Assignees: -
Labels:

Reservations, Service Attention, customer-reported, needs-triage, question

Milestone: -

msftbot[bot] avatar May 10 '21 07:05 msftbot[bot]

Hi @ianeal thanks for opening this issue!

Those properties are missing because we are also missing those in the swagger from which this SDK is generated.

We need the corresponding service team to add these properties so that we could have those in our next round of generation. I have added the tags, so that the corresponding service team could take this a look.

ArcturusZhang avatar May 10 '21 07:05 ArcturusZhang

Hi, I was wondering if there are any updates on this one?
Is any additional information required?

ianeal avatar May 19 '21 20:05 ianeal

Hi @ianeal sorry for the inconvenience but we are now waiting for the corresponding service team to response on this issue and they should either update the swagger accordingly so that we could regenerate our SDK, or they could provide some justification for not doing so.

ArcturusZhang avatar May 20 '21 02:05 ArcturusZhang

Thanks for bringing this up we are actively working on pushing the new swagger out

rkapso avatar Jun 02 '21 16:06 rkapso

Updated to the latest Azure SDK (ie v66.0.0) and changed my go dependencies

from "github.com/Azure/azure-sdk-for-go/services/preview/reservations/mgmt/2020-10-25/reservations" to "github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2022-03-01/reservations

I compared the models and I agree that for archived and capabilities the properties are there.

However, I still do not see Properties.SwapProperties.SwapSource nor Properties.SwapProperties.SwapDestination?

I'd like to update to using the 2022-03-01/reservations but without this data, I need to keep using my autorest implementation to retrieve the raw JSON response using 2019-04-01 API endpoint

Any idea why swap properties was not added as well?

Has it been renamed to something else or made unsupported or deprecated?

ianeal avatar Jul 14 '22 20:07 ianeal

Swap source and swap destination are shown in the following microsoft documentation so I'd expect it to be reflected in the SDK

https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/reservation/list?tabs=HTTP

ianeal avatar Jul 14 '22 21:07 ianeal

@ArcturusZhang @rkapso Swap source and swap destination are shown in the following microsoft documentation so I'd expect it to be reflected in the SDK

https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/reservation/list?tabs=HTTP

ianeal avatar Jul 15 '22 19:07 ianeal

Any update on why swap properties was not included in the fix for this ticket?

ianeal avatar Aug 02 '22 16:08 ianeal

@ArcturusZhang With regard to the missing swap properties which I noted above. I can see now that the swagger API for this was updated to include swap properties on Oct 4, 2022.

Is it known when the SDK will be regenerated?

Also will the newer github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/reservations/armreservations API be updated as well?

ianeal avatar Nov 02 '22 21:11 ianeal