DGS-23025 Add AssociatedNameStrategy#2577
DGS-23025 Add AssociatedNameStrategy#2577Robert Yokota (rayokota) wants to merge 16 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an “Associated” subject name strategy that resolves the Schema Registry subject for a topic via Schema Registry associations, and wires the serdes to use an async subject naming delegate to support this lookup.
Changes:
- Added
SubjectNameStrategy.Associatedplus an async subject-name strategy delegate pipeline (serdes now await subject resolution). - Added Schema Registry REST + client APIs for association CRUD / lookup, and corresponding data contracts.
- Added unit tests and mock support to validate associated subject resolution, fallback behavior, and kafka-cluster-namespace behavior.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Confluent.SchemaRegistry.Serdes.UnitTests/SerializeDeserialize.cs | Adds unit tests covering Associated strategy behavior and fallback. |
| test/Confluent.SchemaRegistry.Serdes.UnitTests/BaseSerializeDeserialize.cs | Extends mock Schema Registry client to support association lookups used by tests. |
| src/Confluent.SchemaRegistry/SubjectNameStrategy.cs | Adds async subject strategy delegate, Associated strategy implementation, and ToAsyncDelegate. |
| src/Confluent.SchemaRegistry/Rest/RestService.cs | Adds REST calls for association lookup/create/delete and a void-request helper. |
| src/Confluent.SchemaRegistry/Rest/IRestService.cs | Exposes association REST endpoints to the internal REST service interface. |
| src/Confluent.SchemaRegistry/Rest/DataContracts/Association.cs | New association DTO for REST responses. |
| src/Confluent.SchemaRegistry/Rest/DataContracts/AssociationInfo.cs | New association info DTO for create/update responses. |
| src/Confluent.SchemaRegistry/Rest/DataContracts/AssociationResponse.cs | New DTO for create/update association responses. |
| src/Confluent.SchemaRegistry/Rest/DataContracts/AssociationCreateOrUpdateRequest.cs | New DTO for create/update association requests. |
| src/Confluent.SchemaRegistry/Rest/DataContracts/AssociationCreateOrUpdateInfo.cs | New DTO for association create/update items. |
| src/Confluent.SchemaRegistry/ISchemaRegistryClient.cs | Adds association APIs to the public client interface. |
| src/Confluent.SchemaRegistry/CachedSchemaRegistryClient.cs | Implements the new association APIs via RestService. |
| src/Confluent.SchemaRegistry/AsyncSerde.cs | Switches serdes to use an async subject name delegate and await subject resolution. |
| src/Confluent.SchemaRegistry.Serdes.Protobuf/ProtobufSerializer.cs | Uses ToAsyncDelegate and allows strategy.* configs. |
| src/Confluent.SchemaRegistry.Serdes.Protobuf/ProtobufDeserializer.cs | Uses ToAsyncDelegate and allows strategy.* configs. |
| src/Confluent.SchemaRegistry.Serdes.Json/JsonSerializer.cs | Uses ToAsyncDelegate and allows strategy.* configs. |
| src/Confluent.SchemaRegistry.Serdes.Json/JsonDeserializer.cs | Uses ToAsyncDelegate and allows strategy.* configs. |
| src/Confluent.SchemaRegistry.Serdes.Avro/SpecificSerializerImpl.cs | Awaits async subject name resolution. |
| src/Confluent.SchemaRegistry.Serdes.Avro/SpecificDeserializerImpl.cs | Awaits async subject name resolution. |
| src/Confluent.SchemaRegistry.Serdes.Avro/GenericSerializerImpl.cs | Awaits async subject name resolution. |
| src/Confluent.SchemaRegistry.Serdes.Avro/GenericDeserializerImpl.cs | Awaits async subject name resolution. |
| src/Confluent.SchemaRegistry.Serdes.Avro/AvroSerializer.cs | Allows strategy.* configs (validation change). |
| src/Confluent.SchemaRegistry.Serdes.Avro/AvroDeserializer.cs | Allows strategy.* configs (validation change). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Confluent.SchemaRegistry/Rest/DataContracts/AssociationResponse.cs
Outdated
Show resolved
Hide resolved
src/Confluent.SchemaRegistry/Rest/DataContracts/AssociationCreateOrUpdateRequest.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/Confluent.SchemaRegistry.Serdes.UnitTests/BaseSerializeDeserialize.cs
Show resolved
Hide resolved
f9fab11 to
96f1d99
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|


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