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-4215/4216 Make transport factories return errors #1285

Closed
wants to merge 1 commit into from

Conversation

dcelasun
Copy link
Member

@dcelasun dcelasun commented Jun 2, 2017

This commit changes the signature of TTransportFactory.GetTransport from

GetTransport(trans TTransport) TTransport

to

GetTransport(trans TTransport) (TTransport, error)

so the factory can pass any underlying error to the caller (previously such errors were ignored).

This is a backwards incompatible change for anyone implementing custom transports, but it shouldn't effect anyone using the ones in this library.

Fixes THRIFT-4215.

Fixes THRIFT-4216.

P.S: Some files have formatting-only changes due to gofmt.

This commit changes the signature of TTransportFactory.GetTransport
from

  GetTransport(trans TTransport) TTransport

to

  GetTransport(trans TTransport) (TTransport, error)

so the factory can pass any underlying error to the caller (previously
such errors were ignored).

This is a backwards incompatible change for anyone implementing custom
transports, but it shouldn't effect anyone using the ones in this
library.

Fixes THRIFT-4215.

Fixes THRIFT-4216.
@dcelasun dcelasun closed this Jun 2, 2017
@dcelasun
Copy link
Member Author

dcelasun commented Jun 2, 2017

Closing PR until all tests are fixed, I don't want to waste Apache's Travis capacity.

asfgit pushed a commit that referenced this pull request Jun 5, 2017
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes #1285
peterbourgon added a commit to go-kit/kit that referenced this pull request Jun 6, 2017
@peterbourgon
Copy link

For the record, this caused build failures in Go kit; I don't imagine my usage is particularly strange, but maybe it is. (Link.)

@dcelasun
Copy link
Member Author

dcelasun commented Jun 6, 2017

Yes sorry about that, this was an expected breakage as the interface has changed. I suggest using 0.10 instead of master, that way you won't get any surprises like this until 0.11 is released.

EDIT: Just realized this is for go-kit, so you can't really vendor thrift. Maybe a note in the README might be useful.

jeking3 pushed a commit to jeking3/thrift that referenced this pull request Aug 5, 2017
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes apache#1285
jeking3 pushed a commit to jeking3/thrift that referenced this pull request Nov 30, 2017
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes apache#1285
ridv pushed a commit to ridv/thrift that referenced this pull request Jun 27, 2018
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes apache#1285
ridv pushed a commit to ridv/thrift that referenced this pull request Jun 27, 2018
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes apache#1285
hsanjuan pushed a commit to gxed/thrift-go that referenced this pull request Jan 30, 2019
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes apache#1285
sagikazarmark pushed a commit to go-kit/examples that referenced this pull request Jun 4, 2021
muscliary pushed a commit to muscliary/kit that referenced this pull request Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants