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

Thrift clients #3695

Conversation

vytautas-karpavicius
Copy link
Contributor

What changed?

  • Explicitly listed Client interfaces instead of embedding thrift client interfaces.
  • Created thriftClient wrappers. Currently they only forward the request as is.

Why?
This is prep-work for introducing internal application types. For now this change simply adds no-op thrift wrappers. Later on they will become a place for internal types to thrift conversion. Explicitly listed Client interfaces will operate on on internal types and only at the thriftClient they will be converted to thrift counterparts.

How did you test it?

  • Existing tests unit tests.
  • Run canary locally.

Potential risks

@vytautas-karpavicius vytautas-karpavicius requested a review from a team October 27, 2020 13:09
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 59.254% when pulling fa4f11f on vytautas-karpavicius:thrift-clients into aff5afa on uber:master.


// Client is the interface exposed by admin service client
type Client interface {
adminserviceclient.Interface
AddSearchAttribute(context.Context, *admin.AddSearchAttributeRequest, ...yarpc.CallOption) error
Copy link
Contributor

Choose a reason for hiding this comment

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

qq: why we will not use the embedded thrift interface?

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 was changed on purpose so that we can change method signatures to accept and return internal types instead of thrift counterparts. Thrift types will be only be used in thrift clients and handlers. These changes will come with upcoming PRs.

@vytautas-karpavicius vytautas-karpavicius merged commit b9485f8 into cadence-workflow:master Oct 30, 2020
github-actions bot pushed a commit to vytautas-karpavicius/cadence that referenced this pull request Feb 4, 2021
This is prep-work for introducing internal application types. For now this change simply adds no-op thrift wrappers. Later on they will become a place for internal types to thrift conversion. Explicitly listed Client interfaces will operate on on internal types and only at the thriftClient they will be converted to thrift counterparts.
- Explicitly listed Client interfaces instead of embedding thrift client interfaces.
- Created thriftClient wrappers. Currently they only forward the request as is.
yux0 pushed a commit to yux0/cadence that referenced this pull request May 4, 2021
This is prep-work for introducing internal application types. For now this change simply adds no-op thrift wrappers. Later on they will become a place for internal types to thrift conversion. Explicitly listed Client interfaces will operate on on internal types and only at the thriftClient they will be converted to thrift counterparts.
- Explicitly listed Client interfaces instead of embedding thrift client interfaces.
- Created thriftClient wrappers. Currently they only forward the request as is.
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.

3 participants