Skip to content
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

Make event encoding configurable over grpc #673

Merged
merged 1 commit into from
May 30, 2024

Conversation

peterargue
Copy link
Contributor

@peterargue peterargue commented May 30, 2024

Closes: #666

Description

Currently, event encoding is hard coded to use CCF. This was added to switch to the smaller size payloads. However, it does not support backwards compatibility mode needed by some clients during the Cadence 1.0 transition.

This PR updates the grpc client code to allow setting the event encoding for the client. During the transition, users can switch to use JSONCDC.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Copy link
Member

@nvdtf nvdtf left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -103,6 +113,11 @@ type Client struct {
grpc *BaseClient
}

// RPCClient returns the underlying gRPC client.
func (c *Client) RPCClient() RPCClient {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this isn't strictly needed here, but it provides some flexibility for users in the future to break out into a raw grpc request when the sdk doesn't expose some needed/new functionality

@peterargue peterargue merged commit bb9a5c3 into master May 30, 2024
1 check passed
@peterargue peterargue deleted the petera/make-eventencoding-configurable branch May 30, 2024 21:59
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice!

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

Successfully merging this pull request may close these issues.

Backwards Compatibility - Failed to get Transaction Result
3 participants