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

test_read_write_serde_v2 fails (CRC do not match) #1049

Open
rominf opened this issue Oct 1, 2024 · 0 comments
Open

test_read_write_serde_v2 fails (CRC do not match) #1049

rominf opened this issue Oct 1, 2024 · 0 comments

Comments

@rominf
Copy link

rominf commented Oct 1, 2024

Describe the bug
test_read_write_serde_v2 fails because CRC do not match. See: https://koji.fedoraproject.org/koji/taskinfo?taskID=124232877 -> build.log or paste below:

        if crc is not None:
>           assert reader.crc == crc
E           assert 4072166236 == 1260758266
E            +  where 4072166236 = <aiokafka.record.default_records._DefaultRecordBatchPy object at 0x3ffa0ddfbb0>.crc
tests/record/test_default_records.py:68: AssertionError
=========================== short test summary info ============================
FAILED tests/record/test_default_records.py::test_read_write_serde_v2[lz4] - ...

Expected behaviour
As noted in https://src.fedoraproject.org/rpms/python-aiokafka/pull-request/2#comment-222352, paraphrasing: compatibility guarantees mean compatible APIs/ABIs and compressed data streams, not bit-identical results across versions and platforms, so it is not reliable to check CRCs.

Hence, I suggest replacing CRC in:

pytest.param(DefaultRecordBatch.CODEC_LZ4, 1260758266, id="lz4"),

with None to omit CRC comparison. I can implement this change if there is an agreement that it is the right way to solve this issue.

Environment (please complete the following information):

  • aiokafka version (python -c "import aiokafka; print(aiokafka.__version__)"): 0.11.0
  • Kafka Broker version (kafka-topics.sh --version): not applicable
  • Other information (Confluent Cloud version, etc.): arch s390x, cramjam: 2.8.3

Reproducible example
Run the mentioned test in the mentioned environment.

@rominf rominf changed the title test_read_write_serde_v2 fails on s390x test_read_write_serde_v2 fails with cramjam 2.8.3 Oct 1, 2024
@rominf rominf changed the title test_read_write_serde_v2 fails with cramjam 2.8.3 test_read_write_serde_v2 fails (CRC do not match) Oct 1, 2024
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

No branches or pull requests

1 participant