Skip to content

Conversation

rayokota
Copy link
Member

@rayokota rayokota commented Sep 3, 2025

What

Add assertions to validate parsed schema cache keys

Checklist

Please answer the questions with Y, N or N/A if not applicable.

  • [N] Contains customer facing changes? Including API/behavior changes
  • [N/A] Is this change gated behind config(s)?
    • List the config(s) needed to be set to enable this change
  • [N/A] Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required
  • [N/A] Does this change require modifying existing system tests or adding new system tests?
    • If so, include tracking information for the system test changes
  • [N/A] Must this be released together with other change(s), either in this repo or another one?
    • If so, please include the link(s) to the changes that must be released together

References

JIRA:

Test & Review

Open questions / Follow-ups

@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 01:39
@rayokota rayokota requested a review from a team as a code owner September 3, 2025 01:39
@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.

@rayokota rayokota changed the title Add assertions to validate parsed schema cache keys MINOR: Add assertions to validate parsed schema cache keys Sep 3, 2025
Copy link

@Copilot 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

This PR adds assertion statements to validate that schema cache keys are properly formatted before being used in cache operations. The assertions ensure that schema objects used as cache keys have null version and ID fields, which is a requirement for proper cache key generation.

  • Added assertions to validate schema parameters in loadSchema, invalidateFromNewSchemaCache, and invalidateFromOldSchemaCache methods
  • Ensures schema cache keys are properly formatted with null version and ID fields
  • Prevents potential cache corruption or incorrect behavior due to improperly formatted schema keys

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sonarqube-confluent

This comment has been minimized.

@sonarqube-confluent

This comment has been minimized.

@sonarqube-confluent

This comment has been minimized.

1 similar comment
@sonarqube-confluent

This comment has been minimized.

@sonarqube-confluent

This comment has been minimized.

@sonarqube-confluent
Copy link

Passed

Analysis Details

1 Issue

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 1 Code Smell

Coverage and Duplications

  • Coverage 57.10% Coverage (71.50% Estimated after merge)
  • Duplications No duplication information (2.00% Estimated after merge)

Project ID: schema-registry

View in 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.

3 participants