Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DGS-20678 Fix possible NPE in CSFLE executor #1980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
self.config = None
self.clock = clock

def configure(self, client_conf: dict, rule_conf: dict):

Check failure on line 63 in src/confluent_kafka/schema_registry/rules/encryption/encrypt_executor.py

View check run for this annotation

SonarQube-Confluent / confluent-kafka-python Sonarqube Results

src/confluent_kafka/schema_registry/rules/encryption/encrypt_executor.py#L63

Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.
if client_conf:
if self.client:
if self.client.config() != client_conf:
Expand All @@ -68,17 +68,17 @@
else:
self.client = DekRegistryClient.new_client(client_conf)

if rule_conf:
if self.config:
if self.config:
if rule_conf:
for key, value in rule_conf.items():
v = self.config.get(key)
if v is not None:
if v != value:
raise RuleError(f"rule config key already set: {key}")
else:
self.config[key] = value
else:
self.config = rule_conf
else:
self.config = rule_conf if rule_conf else {}

def type(self) -> str:
return "ENCRYPT"
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.