Skip to content

Add enableAt to RuleSet#2218

Open
Robert Yokota (rayokota) wants to merge 2 commits intomasterfrom
enable-at
Open

Add enableAt to RuleSet#2218
Robert Yokota (rayokota) wants to merge 2 commits intomasterfrom
enable-at

Conversation

@rayokota
Copy link
Member

@rayokota Robert Yokota (rayokota) commented Mar 13, 2026

What

Add enableAt to RuleSet. Also update CHANGELOG

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 March 13, 2026 23:08
@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 support for environment-gated Schema Registry rule execution by introducing an enableAt attribute on RuleSet, propagating it through RuleContext, and using it to skip rule execution in both sync and async serdes.

Changes:

  • Add enable_at / enableAt to RuleSet (serialization, deserialization, hashing).
  • Extend RuleContext with enabled_env and pass it from schemas’ rule sets during rule execution.
  • Gate rule execution in _is_disabled() based on enableAt for both sync and async serdes.

Reviewed changes

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

File Description
src/confluent_kafka/schema_registry/common/serde.py Adds enabled_env to RuleContext to carry rule-set environment gating data.
src/confluent_kafka/schema_registry/common/schema_registry_client.py Adds enable_at to RuleSet and includes it in dict (de)serialization and hashing.
src/confluent_kafka/schema_registry/_sync/serde.py Propagates enable_at into RuleContext and skips rules based on environment gating.
src/confluent_kafka/schema_registry/_async/serde.py Async equivalent of sync gating and context propagation.

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

You can also share your feedback on Copilot code review. Take the survey.

@sonarqube-confluent
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

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