Support future reservation in name check validator#5252
Conversation
Summary of ChangesHello @saara-tyagi27, 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 enhances the reservation validation logic within the Highlights
Changelog
Activity
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 adds support for 'future reservations' to the reservation validation logic, which is a great enhancement. The changes correctly add checks for future reservations in both findReservationInOtherZones and TestReservationExists.
I've identified a couple of areas for improvement in the error handling logic:
- In
findReservationInOtherZones, when both API calls fail, only the last error is returned, potentially losing important information from the first error. - In
TestReservationExists, the soft warning check is only performed on the error from the standard reservation API call, which could lead to incorrect hard failures if the future reservation call fails due to permissions.
I've left specific comments with code suggestions to address these points. Additionally, as per the repository's style guide, it would be helpful to update the pull request description to explain the purpose of the change and how it was tested.
3b074ff to
78d36d9
Compare
b132954 to
a089a5a
Compare
3473503 to
63703ef
Compare
Neelabh94
left a comment
There was a problem hiding this comment.
LGTM.
nit comment can be taken up as a follow-up.
|
All failing tests also pass the create step where the changes could have failed, so those tests are not failing as per these changes. |
df5f30f
into
GoogleCloudPlatform:develop
Summary
This pr adds support for future reservation checking in test_reservation_exists validator by making an api call to future reservation.