Repository navigation
AVRO-3803: Python patched up ipc issues - #2319
asosnovsky wants to merge 8 commits into
Conversation
Co-authored-by: Michael A. Smith <michael@smith-li.com>
Co-authored-by: Michael A. Smith <michael@smith-li.com>
|
I think this is good, but can we attach it to any existing tickets? If not, I can open a new one. |
|
@kojiromike no I don't have a JIRA for this. Please open one :) thank you! |
|
@asosnovsky could I trouble you to check if this implementation resolves AVRO-1639? |
|
As far as resolving the conflicts: If you take your branch as-is and run |
|
@asosnovsky, thanks for this. I am closing it as superseded by #4079, which carries the two remaining fixes forward under AVRO-3803 and credits this PR. The branch has conflicts and no pushes since July 2023, so there is no need to rebase it. The bytes-vs-str compare in The restructured Two things in this PR are still real bugs on main and worth keeping. The outer |
This fixes the two avro.ipc and schema bugs from AVRO-3803 that are still on main. apache#2319 found them but has conflicts and has gone stale, and the bytes compare part already landed in apache#3710. This is based on apache#2319 by Ari Sosnovsky. In Responder.respond(), when an AvroException is raised after the handshake for an unreadable request, an unknown message, or a response that does not match its schema, the error was written to a throwaway BytesIO and the stale buffer returned, so the requestor got a decode error (InvalidAvroBinaryEncoding) instead of the server's error. Now it keeps the handshake response and replaces whatever followed it with the system error. Also, RecordSchema set the default namespace for nested types only when the type was "record", so types defined inside an "error" lost the error's namespace. The new tests are in-memory loopback requestor and responder tests for a full round trip including the first-contact handshake, for a system error reaching the requestor, and for a response that does not match its schema reaching the requestor as an error. They also include the empty-reader FramedReader test from apache#2319 and a schema test for error namespaces. The bug tests fail without the fix. Co-authored-by: Ari Sosnovsky <asosnovsky@users.noreply.github.com> Generated-by: Claude Code 2.1.314 (Claude Opus 5.5)
AVRO-3803
What is the purpose of the change
exceptwas pointing atschema.AvroExceptioninstead ofavro.errors.AvroExceptionVerifying this change
This change added tests and can be verified as follows:
Documentation