Ensure fully qualified URLs for reservation subblocks#5452
Conversation
Summary of ChangesHello, 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 resolves critical URI formatting issues within the 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. Footnotes
|
|
@jamOne- PTAL |
There was a problem hiding this comment.
Code Review
This pull request updates the reservation logic in the GKE node pool module to support fully qualified resource URLs. The review identified a critical issue where the use of a loop index for suffixes causes index out-of-range errors in multi-zonal deployments, and a high-severity issue where the use of try(var.zones[0], "") can result in invalid resource URIs. The reviewer provided specific code suggestions to resolve these issues by correctly mapping suffixes and ensuring valid zone references.
1a3f770 to
34d24a0
Compare
|
/gcbrun |
|
pre-commits are failing |
34d24a0 to
c03dc61
Compare
I did and it seems to be working. |
|
/gcbrun |
1 similar comment
|
/gcbrun |
SwarnaBharathiMantena
left a comment
There was a problem hiding this comment.
LGTM!
The failing tests are not related. Two of the failing tests are spot consumption tests which are not related. One of them is due to expired reservation and two others failed due to nodepool getting created in ERROR state.
c682840
into
GoogleCloudPlatform:develop
Fixes URI formatting when targeting reservation blocks/subblocks in the
gke-node-poolmodule.When users provide a suffix in the
specific_reservations[0].namefield (e.g.,my-res/reservationBlocks/my-block), the module previously dropped the suffix for inactive reservations, and failed to include the requiredzonein the URI for active ones.This PR updates
active_reservation_valuesanddefault_reservation_valuesto properly construct the fully qualifiedprojects/{project}/zones/{zone}/reservations/{name}/reservationBlocks/{block}URI whenever a suffix is detected.