Skip to content

DGS-23025 Add AssociatedNameStrategy#2194

Open
Robert Yokota (rayokota) wants to merge 10 commits intomasterfrom
assoc-strategy
Open

DGS-23025 Add AssociatedNameStrategy#2194
Robert Yokota (rayokota) wants to merge 10 commits intomasterfrom
assoc-strategy

Conversation

@rayokota
Copy link
Member

What

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 February 23, 2026 23:31
@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

Adds a new “ASSOCIATED” subject name strategy that resolves the subject via Schema Registry associations (with configurable fallback), and wires it into the existing Avro/JSON Schema/Protobuf serdes in both sync and async clients.

Changes:

  • Introduces SubjectNameStrategyType + STRATEGY_TYPE_MAP, and adds AssociatedNameStrategy / AsyncAssociatedNameStrategy with LRU caching and fallback behavior.
  • Adds Schema Registry client APIs + mock support for creating/querying/deleting associations.
  • Extends Avro/JSON Schema/Protobuf (sync + async) serdes to support subject.name.strategy.type and subject.name.strategy.conf, plus adds comprehensive tests.

Reviewed changes

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

Show a summary per file
File Description
tests/schema_registry/_sync/test_avro_serdes.py Adds sync tests covering ASSOCIATED strategy, fallbacks, errors, cluster namespace, and caching.
tests/schema_registry/_async/test_avro_serdes.py Adds async tests mirroring sync coverage for ASSOCIATED strategy behavior.
src/confluent_kafka/schema_registry/common/serde.py Adds SubjectNameStrategyType enum and a type→function strategy map.
src/confluent_kafka/schema_registry/common/schema_registry_client.py Adds association DTOs for association APIs (request/response models).
src/confluent_kafka/schema_registry/_sync/serde.py Implements AssociatedNameStrategy and configure_subject_name_strategy plumbing in sync serdes.
src/confluent_kafka/schema_registry/_async/serde.py Implements AsyncAssociatedNameStrategy and configure_subject_name_strategy plumbing in async serdes.
src/confluent_kafka/schema_registry/_sync/schema_registry_client.py Adds sync REST APIs for get/create/delete associations.
src/confluent_kafka/schema_registry/_async/schema_registry_client.py Adds async REST APIs for get/create/delete associations.
src/confluent_kafka/schema_registry/_sync/mock_schema_registry_client.py Adds association storage and endpoints to the sync mock client for tests.
src/confluent_kafka/schema_registry/_async/mock_schema_registry_client.py Adds association storage and endpoints to the async mock client for tests.
src/confluent_kafka/schema_registry/_sync/avro.py Adds subject.name.strategy.type/conf config support and passes client/conf to ASSOCIATED strategy.
src/confluent_kafka/schema_registry/_async/avro.py Same as sync Avro, for async serializer/deserializer.
src/confluent_kafka/schema_registry/_sync/json_schema.py Adds subject.name.strategy.type/conf config support and passes client/conf to ASSOCIATED strategy.
src/confluent_kafka/schema_registry/_async/json_schema.py Same as sync JSON Schema, for async serializer/deserializer.
src/confluent_kafka/schema_registry/_sync/protobuf.py Adds subject.name.strategy.type/conf config support and passes client/conf to ASSOCIATED strategy.
src/confluent_kafka/schema_registry/_async/protobuf.py Same as sync Protobuf, for async serializer/deserializer.

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

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

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


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

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

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


💡 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
50.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

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

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.


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

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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.


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

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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.


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

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.

2 participants