Skip to content

DGS-22734 Add Accept-Version header#2536

Merged
Robert Yokota (rayokota) merged 3 commits into
masterfrom
DGS-22734
Oct 31, 2025
Merged

DGS-22734 Add Accept-Version header#2536
Robert Yokota (rayokota) merged 3 commits into
masterfrom
DGS-22734

Conversation

@rayokota

@rayokota Robert Yokota (rayokota) commented Oct 30, 2025

Copy link
Copy Markdown
Member

What

  • Add Accept-Version header
  • Minor fix to AWS driver to account for web identity token file
  • User newer subject-based DEK creation API
  • Properly handle Avro bytes type

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • 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 October 30, 2025 20:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds an Accept-Version header to Schema Registry REST API calls and implements several enhancements including improved bytes type handling in Avro serialization/deserialization, DEK creation API improvements, and AWS credentials handling updates.

  • Adds Accept-Version: 8.0 header to all Schema Registry REST requests
  • Enhances Avro serialization to handle bytes type more efficiently with direct byte array operations
  • Updates DEK creation to try new API endpoint with subject in path, falling back to legacy endpoint

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Confluent.SchemaRegistry/Rest/RestService.cs Adds Accept-Version header constant and includes it in HTTP requests
src/Confluent.SchemaRegistry.Serdes.Avro/SpecificSerializerImpl.cs Adds direct bytes handling for Avro byte array serialization
src/Confluent.SchemaRegistry.Serdes.Avro/SpecificDeserializerImpl.cs Adds direct bytes handling for Avro byte array deserialization
src/Confluent.SchemaRegistry.Encryption/Rest/DekRestService.cs Updates DEK creation to use new API with fallback to legacy endpoint
src/Confluent.SchemaRegistry.Encryption.Aws/AwsKmsDriver.cs Adds support for AWS web identity token file authentication
test/Confluent.SchemaRegistry.Serdes.UnitTests/SerializeDeserialize.cs Adds assertion to verify bytes serialization format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Confluent.SchemaRegistry/Rest/RestService.cs
{
currentSchemaData.AvroWriter.Write(data, new BinaryEncoder(stream));
// If the writer schema is a simple bytes type, write bytes directly
if (currentSchemaData.WriterSchema.Tag == Avro.Schema.Type.Bytes && data is byte[] byteData)

Copilot AI Oct 30, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The condition combines schema type checking with runtime type checking. Consider extracting this logic into a separate method with a descriptive name like ShouldSerializeBytesDirectly for better readability.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rayokota Robert Yokota (rayokota) merged commit 6c0863b into master Oct 31, 2025
1 check passed
@rayokota Robert Yokota (rayokota) deleted the DGS-22734 branch October 31, 2025 16:16
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