Repository navigation
Fix Encryption fails when referencing self defined types (#2254) - #2255
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes encryption failures that occur when an Avro schema references a self-defined named type. The schema is now expanded via fastavro.schema.expand_schema before being passed to the field transformer so referenced types are resolved and tagged fields can be discovered for encryption.
Changes:
- Call
expand_schemaon parsed/reader schemas before invokingtransformin both sync and async Avro serializer/deserializer field transformers. - Add a test case (
test_avro_encryption_complex_schema) in both the sync and async test suites covering encryption of a record that references a previously defined named type. - Update
CHANGELOG.mdwith a fix entry referencing issue #2254.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/confluent_kafka/schema_registry/_sync/avro.py | Imports expand_schema and wraps parsed_schema / reader_schema with it in the serializer and deserializer field transformers. |
| src/confluent_kafka/schema_registry/_async/avro.py | Same change as sync variant, applied to async serializer and deserializer. |
| tests/schema_registry/_sync/test_avro_serdes.py | Adds sync test verifying PII encryption works through a self-referenced record type. |
| tests/schema_registry/_async/test_avro_serdes.py | Adds matching async test (also imports deepcopy). |
| CHANGELOG.md | Adds bullet documenting the fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/sem-approve |
Done |
|
/sem-approve |
|
ChristophMajcenAtXxxlutz , the latest issue is: |
Fixed the mypi issue |
|
/sem-approve |
Robert Yokota (rayokota)
left a comment
There was a problem hiding this comment.
Thanks ChristophMajcenAtXxxlutz , LGTM
3fd7408
into
confluentinc:master
What
Fix Encryption fails when referencing self defined types (#2254)
Checklist
References
Github:
#2254
Test & Review
Tested by automated tests