Skip to content

Conversation

@rayokota
Copy link
Member

@rayokota rayokota commented Nov 5, 2025

What

  • Handle evolution during field transformation
  • Also change Accept-Version to Confluent-Accept-Unknown-Properties

Checklist

  • [Y] Contains customer facing changes? Including API/behavior changes
  • [Y] Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA:

Test & Review

Open questions / Follow-ups

Copilot AI review requested due to automatic review settings November 5, 2025 18:50
@rayokota rayokota requested review from a team and MSeal as code owners November 5, 2025 18:50
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

Copilot AI left a 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.

@sonarqube-confluent
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
1 New issue

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@rayokota rayokota merged commit 46f24ce into master Nov 6, 2025
2 of 3 checks passed
@rayokota rayokota deleted the DGS-22077 branch November 6, 2025 01:42
airlock-confluentinc bot pushed a commit that referenced this pull request Nov 6, 2025
* DGS-22077 Handle evolution during field transformation

* Minor fix

* Minor cleanup

* Add new header
airlock-confluentinc bot pushed a commit that referenced this pull request Nov 6, 2025
* DGS-22077 Handle evolution during field transformation

* Minor fix

* Minor cleanup

* Add new header
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

Successfully merging this pull request may close these issues.

3 participants