- Support py37
- Remove inject feature of cassette
- Support opentracing 2
- Python 3.4 support
- Fixed a bug which caused servers to send requests to peers that sent requests to them.
- Added OpenTracing client interceptor support for outbound requests.
- Hook methods can now be implemented as coroutines.
- Added a new event (before_serialize_request_headers) that can be hooked. This is intended to allow application headers to be modified before requests are sent.
- Added messages with ttl, service, and hostport information to TimeoutErrors
- Fixed a race condition where the on_close callback for tchannel connections would not be called if the connection was already closed.
- Fixed a bug where the reference to the next node would not be cleared when nodes were pulled from message queues (Introducing a potential memory leak).
- Add str functions to Peer and PeerClientOperation for easier debugging in exc_info
- Updated internal APIs to no longer depend on the PeerGroup add function and to use the get function for creating new peers instead.
- Fixed a bug where choosing a hostport directly for a downstream call would add that peer to the "core" peers which are used for regular calls. Now choosing the hostport directly will create a peer but will exclude it from selection.
- Committing to existing API. We're calling this a 1.0.
- Fixed a bug which would cause handshake timeouts to bubble up to the caller rather than retry a different peer.
- Fixed a bug which would cause assertion errors if a connection to a peer disconnected shortly after a handshake.
- Time out handshake attempts for outgoing connections after 5 seconds.
- Fixed a regression where large requests would block small requests until they were completely written to the wire.
- Propagate message sending errors up to the caller. This should greatly reduce
the number of
TimeoutError: None
issues seen by users and show the root cause instead. - Fail
TChannel
instantiation if the service name is empty or None.
- Revert 0.30.2. The previous release may have introduced a memory leak.
- Propagate message sending errors up to the caller. This should greatly reduce
the number of
TimeoutError: None
issues seen by users and show the root cause instead. - Fail
TChannel
instantiation if the service name is empty or None.
- Relax opentracing upper bound to next major.
- Never send requests to ephemeral peers.
- Pass span.kind tag when calling start_span(), not after the span was started.
- Add jitter argument to advertise().
- Never send requests to ephemeral peers.
- Relax opentracing upper bound to next major.
- Change default setting for tracing to be enabled.
- You can now specify an override for a request's
cn
transport header using thecaller_name
argument of thecall()
,json()
,raw()
, andthrift()
methods ofTChannel
.
- Never send requests to ephemeral peers.
- Relax opentracing upper bound to next major.
- Bug fix: Tracing headers will no longer be added for raw requests if the headers are unparsed.
- Ignore tracing fields with empty/zero trace ID.
- Don't send more Hyperbahn advertise requests if an existing request is ongoing.
- Add jitter between Hyperbahn consecutive advertise requests.
- If the initial advertise request fails, propagate the original error instead of a timeout error.
- Never send requests to ephemeral peers.
- Relax opentracing upper bound to next major.
- Ignore tracing fields with empty/zero trace ID.
- VCR should ignore tracing headers when matching requests. This will allow replaying requests with or without tracing regardless of whether the original request was recorded with it.
- Bug fix: set Trace.parent_id to 0 if it's None
- Native integration with OpenTracing (for real this time)
- Replace tcollector and explicit trace reporting with OpenTracing
- Never send requests to ephemeral peers.
- VCR:
use_cassette
now uses cached copies of cassettes if their contents have not changed. This should improve performance for large cassette files.
- Never send requests to ephemeral peers.
- Fixed a bug where the application error status code was not being copied into Response objects.
- Support for OpenTracing.
- Never send requests to ephemeral peers.
- Added
TChannel.host
andTChannel.port
. - Added
TChannel.close()
andTChannel.is_closed()
.
- Never send requests to ephemeral peers.
- Fixed tornado version constraint causing
reuse_port
to be missing, updated constraint totornado>=4.3,<5
. - Only pass
reuse_port
tobind_sockets
if it's set to True.
- Added an opt-in feature to use the
SO_REUSEPORT
socket option for TChannel servers. Usereuse_port=True
when instantiating aTChannel
.
- Never send requests to ephemeral peers.
- Fixed a bug where type mismatch for timeouts could cause a crash.
- VCR now respects the timeout specified on the original request. Timeouts in
making the requests while recording now propagate as
TimeoutError
exceptions rather thanRemoteServiceError
. - Reduced a warning for unconsumed error messages to info.
- Made UnexpectedError's message a little more debuggable.
- Added a timeout to the VCR proxy call.
- Fixed a bug where tests would time out if the VCR server failed to start. The VCR server failure is now propagated to the caller.
- Peer selection is now constant time instead of linear time. This should significantly reduce CPU load per request.
- Fixed a bug where certain errors while reading requests would propagate as TimeoutErrors.
- Attempting to register endpoints against a synchronous TChannel now logs an INFO level message.
- Reduced default advertisement interval to 3 minutes.
- Zipkin traces now include a server-side 'cn' annotation to identify callers.
- Reduced "unconsumed message" warnings to INFO. These are typically generated when Hyperbahn garbage collects your process due to a timed-out advertisement.
- Handshake timeouts were incorrectly being surfaced as StreamClosedError but are now raised as NetworkError.
- Reduced default tracing sample rate from 100% to 1%.
- Fixed a bug that caused silent failures when a write attempt was made to a closed connection.
- Reduce
StreamClosedError
log noisiness for certain scenarios. - Make
TChannel.advertise
idempotent and thread-safe.
- Reduce read errors due to clients disconnecting to INFO from ERROR.
- Fixed an unhelpful stack trace on failed reads.
- Fixed a logging error on failed reads.
- Tornado 4.2 was listed as a requirement but this was corrected to be 4.3 which introduced the locks module.
- Fixed in issue where clients could incorrectly time out when reading large response bodies. This was due to response fragments being dropped due to out-of-order writes; writes are now serialized on a per-connection basis.
- Fixed noisy logging of late responses for requests that timed out locally.
- Attempting to register endpoints against a synchronous TChannel is now a no-op instead of a crash.
- The synchronous client will no longer start a thread when the
TChannel
instance is initialized. This resolves an issue where an application could hang indefinitely if it instantiated a synchronousTChannel
at import time.
- Fixed a bug in Zipkin instrumentation that would cause CPU spikes due to an infinite loop during downstream requests.
- Add support for zipkin trace sampling.
tchannel.TChannel.FALLBACK
may now be used to register fallback endpoints which are called for requests with unrecognized endpoints. For more information, see :ref:`fallback-endpoint`- Expose
timeout
andservice
attributes onRequest
objects inside endpoint handlers. - Disable the retry for all zipkin trace submit.
- Fix Thrift service inheritance bug which caused parent methods to not be propagated to child services.
- VCR recording should not fail if the destination directory for the cassette does not exist.
- Fix bug which incorrectly encoded JSON arg scheme headers in the incorrect format.
- Add support for
rd
transport header. - BREAKING - Support unit testing endpoints by calling the handler
functions directly. This is enabled by changing
tchannel.thrift.register
to return the registered function unmodified. See Upgrade Guide for more details.
- Lower the log level for Hyperbahn advertisement failures that can be retried.
- Include the full stack trace when Hyperbahn advertisement failures are logged.
- Include the error message for unexpected server side failures in the error returned to the client.
- Fix bug which prevented requests from being retried if the candidate connection was previously terminated.
- Support thriftrw 1.0.
- Drop explicit dependency on the
futures
library.
- Add tchannel version & language information into init message header when initialize connections between TChannel instances.
- Reduced Hyperbahn advertisement per-request timeout to 2 seconds.
- Removed an unncessary exception log for connection failures.
- Reduced Hyperbahn advertisement failures to warnings.
- Improved performance of peer selection logic.
- Fixed a bug which caused the message ID and tracing for incoming error frames to be ignored.
- Prefer using incoming connections on peers instead of outgoing connections.
- Deprecated warnings will now sound for
tchannel.thrift.client_for
,tchannel.thrift_request_builder
, andtchannel.tornado.TChannel
- these APIs will be removed soon - be sure to move totchannel.thrift.load
in conjunction withtchannel.TChannel
. - Added singleton facility for maintaining a single TChannel instance per thread.
See
tchannel.singleton.TChannel
,tchannel.sync.singleton.TChannel
, or check the guide for an example how of how to use. Note this feature is optional. - Added Thrift support to
tcurl.py
and re-worked the script's arguments. - Specify which request components to match on with VCR, for example, 'header',
'body', etc. See
tchannel.testing.vcr.use_cassette
. - Removed
tchannel.testing.data
module. - Changed minimum required version of Tornado to 4.2.
tchannel.tornado.TChannel.close
is no longer a coroutine.- BREAKING - headers for JSON handlers are not longer JSON blobs but are instead maps of strings to strings. This mirrors behavior for Thrift handlers.
- Fixed bug that caused server to continue listening for incoming connections despite closing the channel.
- Explicit destinations for
ThriftArgScheme
may now be specified on a per-request basis by using thehostport
keyword argument. - Only listen on IPv4, until official IPv6 support arrives.
- Fix a bug that caused
after_send_error
event to never be fired. - Request tracing information is now propagated to error responses.
- Support thriftrw 0.5.
- Fix default timeout incorrectly set to 16 minutes, now 30 seconds.
- Revert timeout changes from 0.17.6 due to client incompatibilities.
- Network failures while connecting to randomly selected hosts should be retried with other hosts.
- Fixed an issue where timeouts were being incorrectly converted to seconds.
- Set default checksum to
CRC32C
.
- Updated
vcr
to usethriftrw
-generated code. This should resolve some unicode errors during testing withvcr
.
- Fixed uses of
add_done_callback
that should have beenadd_future
. This was preventing propper request/response interleaving. - Added support for
thriftrw
0.4.
- VCR no longer matches on hostport to better support ephemeral ports.
- Fixed a bug with thriftrw where registering an endpoint twice could fail.
- Made "service" optional for
thrift.load()
. The first argument should be a path, but backwards compatibility is provided for 0.17.0.
- It is now possible to load Thrift IDL files directly with
tchannel.thrift.load
. This means that the code generation step using the Apache Thrift compiler can be skipped entirely. Check the API documentation for more details. - Accept host file in advertise:
TChannel.advertise()
now accepts a parameter,router_file
that contains a JSON stringified format of the router list. - Add
TChannel.is_listening
method to return whether the tchannel instance is listening or not.
- Fix default timeout incorrectly set to 16 minutes, now 30 seconds.
- Network failures while connecting to randomly selected hosts should be retried with other hosts.
- Revert timeout changes from 0.16.7 due to client incompatibilities.
- Fixed an issue where timeouts were being incorrectly converted to seconds.
- Fixed a bug where Zipkin traces were not being propagated correctly in
services using the
tchannel.TChannel
API.
- Actually fix status code being unset in responses when using the Thrift scheme.
- Fix request TTLs not being propagated over the wire.
- Fix bug where status code was not being set correctly on call responses for application errors when using the Thrift scheme.
- Make
TChannel.listen
thread-safe and idempotent.
- Fix retry_limit in TChannel.call not allowing 0 retries.
- Fixed a bug where the 'not found' handler would incorrectly return serialization mismatch errors..
- Fixed a bug which prevented VCR support from working with the sync client.
- Fixed a bug in VCR that prevented it from recording requests made by the sync
client, and requests made with
hostport=None
. - Made
client_for
compatible withtchannel.TChannel
. - Brought back
tchannel.sync.client_for
for backwards compatibility.
- Introduced new server API through methods
tchannel.TChannel.thrift.register
,tchannel.TChannel.json.register
, andtchannel.TChannel.raw.register
- when these methods are used, endpoints are passed atchannel.Request
object, and are expected to return atchannel.Response
object or just a response body. The deprecatedtchannel.tornado.TChannel.register
continues to function how it did before. Note the breaking change to the top-level TChannel on the next line. - Fixed a crash that would occur when forking with an unitialized
TChannel
instance. - Add
hooks
property in thetchannel.TChannel
class. - BREAKING -
tchannel.TChannel.register
no longer has the same functionality astchannel.tornado.TChannel.register
, instead it exposes the new server API. See the upgrade guide for details. - BREAKING - remove
retry_delay
option in thetchannel.tornado.send
method. - BREAKING - error types have been reworked significantly. In particular,
the all-encompassing
ProtocolError
has been replaced with more granualar/actionable exceptions. See the upgrade guide for more info. - BREAKING - Remove third
proxy
argument from the server handler interface. - BREAKING -
ZipkinTraceHook
is not longer registered by default. - BREAKING -
tchannel.sync.client.TChannelSyncClient
replaced withtchannel.sync.TChannel
.
- Raise informative and obvious
ValueError
when anything but a map[string]string is passed as headers to theTChannel.thrift
method. - First param, request, in
tchannel.thrift
method is required.
- Raise
tchannel.errors.ValueExpectedError
when calling a non-void Thrift procedure that returns no value.
- Introduced new top level
tchannel.TChannel
object, with new request methodscall
,raw
,json
, andthrift
. This will eventually replace the akwardrequest
/send
calling pattern. - Introduced
tchannel.thrift_request_builder
function for creating a request builder to be used with thetchannel.TChannel.thrift
function. - Introduced new simplified examples under the
examples/simple
directory, moved the Guide's examples toexamples/guide
, and deleted the remaining examples. - Added ThriftTest.thrift and generated Thrift code to
tchannel.testing.data
for use with examples and playing around with TChannel. - Fix JSON arg2 (headers) being returned a string instead of a dict.
- Implement VCR functionality for outgoing requests. Check the documentation
for
tchannel.testing.vcr
for details. - Add support for specifying fallback handlers via
TChannel.register
by specifyingTChannel.fallback
as the endpoint. - Fix bug in
Response
wherecode
expected an object instead of an integer. - Fix bug in
Peer.close
where a future was expected instead ofNone
.
- Add support for specifying transport headers for Thrift clients.
- Always pass
shardKey
for TCollector tracing calls. This fixes Zipkin tracing for Thrift clients.
- Add
TChannel.is_listening()
to determine iflisten
has been called. - Calling
TChannel.listen()
more than once raises atchannel.errors.AlreadyListeningError
. TChannel.advertise()
will now automatically start listening for connections iflisten()
has not already been called.- Use
threadloop==0.4
. - Removed
print_arg
.
- Fix sync client's advertise - needed to call listen in thread.
- Fix sync client using
0.0.0.0
host which gets rejected by Hyperbahn during advertise.
- Added advertise support to sync client in
tchannel.sync.TChannelSyncClient.advertise
. - BREAKING - renamed
router
argument torouters
intchannel.tornado.TChannel.advertise
.
- Support PyPy 2.
- Fix bugs in
TChannel.advertise
.
- Made
TChannel.advertise
retry on all exceptions.
- Previous release was broken with older versions of pip.
- Add exponential backoff to
TChannel.advertise
. - Make transport metadata available under
request.transport
on the server-side.
- Use threadloop 0.3.* to fix main thread not exiting when
tchannel.sync.TChannelSyncClient
is used.
- Allow custom handlers for unrecognized endpoints.
- Released
tchannel.sync.TChannelSyncClient
andtchannel.sync.thrift.client_for
.
- Add port parameter for
TChannel.listen
.
- Fix bug where False and False-like values were being treated as None in Thrift servers.
- Add
as
attribute to the response header.
- Fix callable
traceflag
being propagated to the serializer. - Fix circular imports.
- Fix
TimeoutError
retry logic.
- Initial release.