<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/kafka-python.git, branch docstring-pep8-cleanup</title>
<subtitle>github.com: mumrah/kafka-python.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/'/>
<entry>
<title>Various docstring / pep8 / code hygiene cleanups</title>
<updated>2018-11-18T08:53:16+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T12:11:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=a1420389f2b3e44f42de165d569667ea4dfbf4fe'/>
<id>a1420389f2b3e44f42de165d569667ea4dfbf4fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Set a clear default value for `validate_only`/`include_synonyms`</title>
<updated>2018-11-18T08:52:22+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T11:19:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=e1a59e6da72e11c71cd00da3e76c7f5b25be9710'/>
<id>e1a59e6da72e11c71cd00da3e76c7f5b25be9710</id>
<content type='text'>
The code was previously sending a `False` so this just makes it more
explicit and reduces ambiguity.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code was previously sending a `False` so this just makes it more
explicit and reduces ambiguity.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add list_consumer_group_offsets()</title>
<updated>2018-11-18T08:52:22+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T10:53:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=1f1fb9e2095cb14bf8c7cb3a3a068fa6e96a7c69'/>
<id>1f1fb9e2095cb14bf8c7cb3a3a068fa6e96a7c69</id>
<content type='text'>
Support fetching the offsets of a consumer group.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support fetching the offsets of a consumer group.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix describe_groups</title>
<updated>2018-11-18T08:52:22+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T10:46:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=438d12b4b2bf32f3f4acfc4aaf361e9d12f26dbc'/>
<id>438d12b4b2bf32f3f4acfc4aaf361e9d12f26dbc</id>
<content type='text'>
This was completely broken previously because it didn't lookup the group
coordinator of the consumer group. Also added basic error
handling/raising.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was completely broken previously because it didn't lookup the group
coordinator of the consumer group. Also added basic error
handling/raising.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add group coordinator lookup</title>
<updated>2018-11-18T08:52:22+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T10:24:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=0d7ff45710aebf1bd25d051d5ffe2f6dcdada1ac'/>
<id>0d7ff45710aebf1bd25d051d5ffe2f6dcdada1ac</id>
<content type='text'>
We need a way to send a request to the group coordinator.

I spent a day and a half trying to implement a `_send_request_to_group_coordinator()`
that included:
1. caching the value of the group coordinator so that it wouldn't have
to be repeatedly looked up on every call. This is particularly important
because the `list_consumer_groups()`, `list_consumer_group_offsets()`,
and `describe_consumer_groups()` will frequently be used by monitoring
scripts. I know across the production clusters that I support, using a
cached value will save ~1M calls per day.
2. clean and consistent error handling. This is difficult because the
responses are inconsistent about error codes. Some have a top-level
error code, some bury it within the description of the actual item.
3. Avoiding tight coupling between this method and the request/response
classes... the custom parsing logic for errors etc, given that it's
non-standard, should live in the callers, not here.

So finally I gave up and just went with this simpler solution and made
it so the callers can optionally bypass this if they somehow already
know the group coordinator.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need a way to send a request to the group coordinator.

I spent a day and a half trying to implement a `_send_request_to_group_coordinator()`
that included:
1. caching the value of the group coordinator so that it wouldn't have
to be repeatedly looked up on every call. This is particularly important
because the `list_consumer_groups()`, `list_consumer_group_offsets()`,
and `describe_consumer_groups()` will frequently be used by monitoring
scripts. I know across the production clusters that I support, using a
cached value will save ~1M calls per day.
2. clean and consistent error handling. This is difficult because the
responses are inconsistent about error codes. Some have a top-level
error code, some bury it within the description of the actual item.
3. Avoiding tight coupling between this method and the request/response
classes... the custom parsing logic for errors etc, given that it's
non-standard, should live in the callers, not here.

So finally I gave up and just went with this simpler solution and made
it so the callers can optionally bypass this if they somehow already
know the group coordinator.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix list_consumer_groups() to query all brokers</title>
<updated>2018-11-18T08:52:22+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-13T21:10:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=93effbfd1a8d68ae1c470ecc25d87acce74ea231'/>
<id>93effbfd1a8d68ae1c470ecc25d87acce74ea231</id>
<content type='text'>
Previously, this only queried the controller. In actuality, the Kafka
protocol requires that the client query all brokers in order to get the
full list of consumer groups.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, this only queried the controller. In actuality, the Kafka
protocol requires that the client query all brokers in order to get the
full list of consumer groups.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix send to controller</title>
<updated>2018-11-18T08:52:22+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T10:04:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=c7a21ea93c1ac09ab0e22ce4bf80165075a8c78e'/>
<id>c7a21ea93c1ac09ab0e22ce4bf80165075a8c78e</id>
<content type='text'>
The controller send error handling was completely broken.
It also pinned the metadata version unnecessarily.

Additionally, several of the methods were sending to the controller
but either that was unnecessary, or just plain wrong. So updated
following the pattern of the Java Admin client.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The controller send error handling was completely broken.
It also pinned the metadata version unnecessarily.

Additionally, several of the methods were sending to the controller
but either that was unnecessary, or just plain wrong. So updated
following the pattern of the Java Admin client.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove support for api versions as strings from KafkaAdmin</title>
<updated>2018-11-18T08:22:52+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T10:56:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=d67157cb9a032a6f0493cea128bbcd0528f3e640'/>
<id>d67157cb9a032a6f0493cea128bbcd0528f3e640</id>
<content type='text'>
This is a new class, so let's not support the old version strings and
saddle ourselves with tech debt right from the get-go.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a new class, so let's not support the old version strings and
saddle ourselves with tech debt right from the get-go.
</pre>
</div>
</content>
</entry>
<entry>
<title>Be explicit with tuples for %s formatting</title>
<updated>2018-11-18T08:21:18+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-13T19:57:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=1d443638e22c2d360086b8d7cee8b5d930741d12'/>
<id>1d443638e22c2d360086b8d7cee8b5d930741d12</id>
<content type='text'>
Fix #1633
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix #1633
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop using broker-errors for client-side problems</title>
<updated>2018-11-18T08:20:55+00:00</updated>
<author>
<name>Jeff Widman</name>
<email>jeff@jeffwidman.com</email>
</author>
<published>2018-11-17T09:37:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/kafka-python.git/commit/?id=f3105a434f3bd2fb3f8899e4861e187e786b03da'/>
<id>f3105a434f3bd2fb3f8899e4861e187e786b03da</id>
<content type='text'>
`UnsupportedVersionError` is intended to indicate a server-side error:
https://github.com/dpkp/kafka-python/blob/ba7372e44ffa1ee49fb4d5efbd67534393e944db/kafka/errors.py#L375-L378

So we should not be raising it for client-side errors. I realize that
semantically this seems like the appropriate error to raise. However,
this is confusing when debugging... for a real-life example, see
https://github.com/Parsely/pykafka/issues/697. So I strongly feel that
server-side errors should be kept separate from client-side errors,
even if all the client is doing is proactively protecting against
hitting a situation where the broker would return this error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`UnsupportedVersionError` is intended to indicate a server-side error:
https://github.com/dpkp/kafka-python/blob/ba7372e44ffa1ee49fb4d5efbd67534393e944db/kafka/errors.py#L375-L378

So we should not be raising it for client-side errors. I realize that
semantically this seems like the appropriate error to raise. However,
this is confusing when debugging... for a real-life example, see
https://github.com/Parsely/pykafka/issues/697. So I strongly feel that
server-side errors should be kept separate from client-side errors,
even if all the client is doing is proactively protecting against
hitting a situation where the broker would return this error.
</pre>
</div>
</content>
</entry>
</feed>
