-
Notifications
You must be signed in to change notification settings - Fork 933
DGS-22077 Handle evolution during field transformation #2121
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
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses handling of schema evolution when fields are missing during field transformation in Avro serialization/deserialization. The changes ensure that field transformations can proceed even when optional fields with defaults are not present in the message.
Key Changes:
- Modified field transformation logic to skip fields that are not present in the message
- Updated HTTP headers to accept unknown properties from the schema registry
- Added test coverage for transformation of messages with missing optional fields
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/confluent_kafka/schema_registry/common/avro.py | Added check to skip transformation for fields not present in message |
| src/confluent_kafka/schema_registry/_sync/schema_registry_client.py | Changed HTTP header from Accept-Version to Confluent-Accept-Unknown-Properties |
| src/confluent_kafka/schema_registry/_async/schema_registry_client.py | Changed HTTP header from Accept-Version to Confluent-Accept-Unknown-Properties |
| tests/schema_registry/_sync/test_avro_serdes.py | Added test case for field transformation with missing optional field |
| tests/schema_registry/_async/test_avro_serdes.py | Added test case for field transformation with missing optional field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/confluent_kafka/schema_registry/_async/schema_registry_client.py
Outdated
Show resolved
Hide resolved
3e3f1f2 to
0e4c02c
Compare
|




What
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups