aws-sdk-go-v2 icon indicating copy to clipboard operation
aws-sdk-go-v2 copied to clipboard

DescribeAvailablePatches SSM api - incorrect type for the field epoch

Open svagner opened this issue 4 years ago • 6 comments

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug

error while getting available patches","error":"SerializationError: failed decoding JSON RPC response\n\tstatus code: 200, request id: 5ff26977-ddee-4ddf-82cf-c88291a6cac0\ncaused by: unsupported value: <nil> (*int64)

Version of AWS SDK for Go?

v1.36.15

Version of Go (go version)?

go version go1.16.4 linux/amd64

To Reproduce (observed behavior)

	if err := DescribeAvailablePatchesPagesWithContext(ctx, &DescribeAvailablePatchesInput{
		Filters: []*PatchOrchestratorFilter{
			{
				Key: aws.String("PRODUCT"),
				Values: []*string{
					aws.String("AmazonLinux2.0"),
				},
			},
		},
		MaxResults: aws.Int64(50),
	}, func(result *DescribeAvailablePatchesOutput, lastPage bool) bool {
		res = append(res, result.Patches...)
		return !lastPage
	}); err != nil {
		return nil, err
	}

Expected behavior

The method should be finished without error

svagner avatar Aug 03 '21 09:08 svagner

Hi @svagner , Yea I am able ot reproduce this, thanks for bringing it up to us we'll review the PR.

KaibaLopez avatar Aug 05 '21 23:08 KaibaLopez

I updated, and had to close the PR because the SDK cannot take this change directly since these model files are copied into the SDK automatically. The copy would overwrite this change. In addition, this change breaks the SDK's public released type. Changing it from a int to string.

We'll need to forward this issue to the API team, to correct their API's behavior. This most likely is an issue with the service sending the wrong type in this specific case.

jasdel avatar Feb 16 '22 17:02 jasdel

V694669741

vudh1 avatar Aug 26 '22 19:08 vudh1

Unassigning.

Service team has auto closed this. This needs a re-triage. For whoever picks this up, if this cannot be reproduced with your SDK language, re-assign it to the Go SDK queue for follow up.

Thanks.

RanVaknin avatar Sep 25 '23 17:09 RanVaknin

Cannot be reproduced with AWS SDK for .NET using the code below:

using Amazon.SimpleSystemsManagement;
using Amazon.SimpleSystemsManagement.Model;

var response = await (new AmazonSimpleSystemsManagementClient()).DescribeAvailablePatchesAsync(newDescribeAvailablePatchesRequest()
{
     Filters = new List<PatchOrchestratorFilter>() {
        new PatchOrchestratorFilter() { Key="PRODUCT", Values = new List<string>(){ "AmazonLinux2.0" } }
     }
});

Console.WriteLine(response);

Transferring to AWS SDK for Go repo.

ashishdhingra avatar Mar 27 '24 18:03 ashishdhingra

Hi there,

I'm Not sure why @ashishdhingra is able to reproduce this with .NET. I tested this with the Go SDK and can see that the response field Epoch is set to return a value a string instead of a number as described in the API model.

I have created an internal ticket with the SSM service team ( P137583768) and will update you when we hear back from them. Sorry for the delay.

Ran~

RanVaknin avatar Jun 26 '24 22:06 RanVaknin

Hi,

The service had acknowledged this needs to get fixed. Since it is not actionable by the Go SDK team, Im going to go ahead and close this. Thanks, Ran~

RanVaknin avatar Jul 11 '24 20:07 RanVaknin

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Jul 11 '24 20:07 github-actions[bot]