Skip to content

Add CBOR Protocol Support for Request Marshalling and Response Unmarshalling #3942

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

Draft
wants to merge 10 commits into
base: development
Choose a base branch
from

Conversation

muhammad-othman
Copy link
Member

Description

This PR is for CBOR protocol feature branch to development.

It includes the following PRs that were reviewed as part of this feature branch:

Motivation and Context

DOTNET-7384

Testing

  • Unit tests for AWSSDK.Extensions.CborProtocol project.
  • Protocol tests.
  • Manual testing of various CloudWatch and SecretsManager operations with CBOR.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@muhammad-othman muhammad-othman requested a review from normj August 1, 2025 20:04
Copy link
Member

@normj normj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing the generator change that when a service says they are going to use Cbor that the generated nuspec for that service includes a reference to the new AWSSDK.Extensions.CborProtocol extension package.

I modified SQS in my local workspace to use Cbor and confirmed the marshallers were using Cbor but the generated AWSSDK.SQS.nuspec only list AWSSDK.Core as a dependency.

@@ -67,6 +69,10 @@
{"<#=member.PropertyName#>", payload => new <#=member.DetermineType()#>Unmarshaller().Unmarshall(context);},
<#
}
else if (protocol == "Cbor")
{
// TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the generator fail if we go in here to avoid us accidently shipping a service update and thinking it was successful

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently working on event streaming and planning to add the code once a new PR is approved.

@@ -104,6 +110,10 @@
{ "<#=member.PropertyName#>", payload => new <#=this.Config.ClassName#>EventStreamException(Encoding.UTF8.GetString(payload.Payload), new <#=member.ModelShape#>Unmarshaller().Unmarshall(EventStreamUtils.ConvertMessageTo<#=protocol#>Context(payload))) },
<#
}
else if (protocol == "Cbor")
{
// TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the generator fail if we go in here to avoid us accidently shipping a service update and thinking it was successful

@muhammad-othman
Copy link
Member Author

@normj This is a huge miss, thank you for pointing it out , will work on updating nuspec generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants