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

kafka-python zstd compression #2015

Closed

Conversation

gabriel-tincu
Copy link
Contributor

@gabriel-tincu gabriel-tincu commented Mar 12, 2020

Update unit tests, add relevant functions in the codec

Fix #1791


This change is Reviewable

@gabriel-tincu gabriel-tincu changed the title kafka: python client zstd compression kafka-python zstd compression Mar 12, 2020
@gabriel-tincu gabriel-tincu reopened this Mar 12, 2020
@gabriel-tincu gabriel-tincu force-pushed the gabi-kafka-client-zstd-compression branch 2 times, most recently from 2b84da7 to bb20e65 Compare March 12, 2020 15:41
@gabriel-tincu gabriel-tincu force-pushed the gabi-kafka-client-zstd-compression branch 6 times, most recently from 7c9b4c3 to c7be6c0 Compare March 14, 2020 22:44
Copy link
Collaborator

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Thanks for all your hard work here! Two 👍 on most of what I saw and looking forward to merging this.

It actually looks to me like this might be better broken into multiple PR's:

  1. Add 2.1.0 to testing matrix
  2. Add log_start_offset to the RecordMetadata (This could potentially be included with above, but I suspect it's possible to separate them and might be easier to review/discuss that way)
  3. Add support for the additional Producer[Request/Response] classes including wiring them into the producer.
  4. Add zstd support.

Again, most of this looks like it's done and the general code implementation looked solid to me, it's just easier to review/discuss/tweak the PR's if the scope of each one is a bit more focused rather than trying to do everything in one big PR.

Your thoughts?

Lastly, looks like there's a consistent test failure with the Kafka 0.10.2.2 versions... not sure why, that's partially why I suggest breaking it up as it will quickly become apparent which set of changes is breaking this...

build_integration.sh Outdated Show resolved Hide resolved
kafka/producer/sender.py Outdated Show resolved Hide resolved
kafka/producer/sender.py Show resolved Hide resolved
kafka/producer/sender.py Show resolved Hide resolved
kafka/protocol/produce.py Outdated Show resolved Hide resolved
requirements-dev.txt Show resolved Hide resolved
test/test_producer.py Outdated Show resolved Hide resolved
@gabriel-tincu gabriel-tincu force-pushed the gabi-kafka-client-zstd-compression branch 7 times, most recently from 150c8b3 to cc3c3fd Compare March 19, 2020 15:32
…ependency file, readme and codec checks

add 2.1.0 to possible releases being tested / downloadable, skip zstd tests when version is too old
add zstd tests to producer tests, add zstandard to tox dep list
add New produce request/response classes to support up to V8 produce,(V7 is required for zstd compression)
add ProduceResponse fields in use after V5
force broker version onto producers on ver 2.4.0 in unittests, due to inconsitencies with the env var for it
produce response api V2 included in the same logic branch as 3 and 5
add proper docstrings to produce request / response classes
impose limit on decompress output size on a failed decompress attemtp
update producer tests to be more idiomatic with the testing framework
pass merged error message ahead, keep old api
@gabriel-tincu gabriel-tincu force-pushed the gabi-kafka-client-zstd-compression branch from cc3c3fd to d277280 Compare March 19, 2020 18:29
@gabriel-tincu gabriel-tincu force-pushed the gabi-kafka-client-zstd-compression branch from f628658 to 73197b2 Compare March 19, 2020 20:55
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.

Add support for zstd compression
2 participants