-
Notifications
You must be signed in to change notification settings - Fork 1.2k
DGS-22077 Fix IndexOutOfBoundsException when evolving Avro schema w/rules #3880
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 fixes an IndexOutOfBoundsException that occurs when evolving Avro schemas with rules by ensuring the correct schema is used during message transformation.
- Updates the
transformMessagemethod to use the schema from the message itself when available, enabling proper schema evolution - Adds comprehensive test coverage for specific Avro serialization scenarios with field transformations and schema evolution
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| client/src/main/java/io/confluent/kafka/schemaregistry/avro/AvroSchema.java | Fix schema evolution issue by using message's schema when available during transformation |
| schema-rules/src/test/java/io/confluent/kafka/schemaregistry/rules/cel/CelExecutorTest.java | Add test coverage for specific Avro serialization with field transformations and missing properties |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
schema-rules/src/test/java/io/confluent/kafka/schemaregistry/rules/cel/CelExecutorTest.java
Show resolved
Hide resolved
|
/sem-approve |
Claimundefine
left a comment
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.
LGTM
What
Fix IndexOutOfBoundsException when evolving Avro schema w/rules. Add code to ensure the schema of the message is used when transforming fields of the message.
Checklist
Please answer the questions with Y, N or N/A if not applicable.
References
JIRA:
Test & Review
Open questions / Follow-ups