Conversation
… listing Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
Summary of ChangesHello @havetisyan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue in the ZMS storage layer where domain lookup operations by product ID or cloud provider were only returning a single match, even if multiple domains shared the same identifier. The core change involves modifying these lookup methods to return a list of domains, thereby supporting scenarios where multiple domains can be linked to the same product ID or cloud provider attribute. This enhancement ensures more accurate and complete data retrieval for domain associations. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request modifies the storage layer to support multiple domains being associated with a single product ID. The lookupDomainByProductId and lookupDomainByCloudProvider methods in ObjectStoreConnection and its JDBCConnection implementation have been updated to return a List<String> instead of a single String.
The implementation in DBService has been updated to correctly handle the list of domains.
A good refactoring was done in JDBCConnection to introduce a uniquenessCheck helper method, which centralizes logic and reduces code duplication in various uniqueness verification methods.
The tests have been updated to reflect these changes, and a new integration test has been added to verify the support for multiple domains with the same product ID, which is great.
I've found one issue where a method returning a list can return null, which could lead to a NullPointerException. Please see my specific comment.
Also, please note that changing method signatures in the ObjectStoreConnection interface is a breaking change. While all internal implementations are updated, this could affect any external consumers of this interface.
...va/server_common/src/main/java/com/yahoo/athenz/common/server/store/impl/JDBCConnection.java
Show resolved
Hide resolved
Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
Description
addresses #3142
Contribution Checklist:
Attach Screenshots (Optional)