Compute: Add support for FLEX_START and RESERVATION_BOUND provisioning model#16750
Compute: Add support for FLEX_START and RESERVATION_BOUND provisioning model#16750ScottSuarez merged 5 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @ScottSuarez, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 1389 Click here to see the affected service packages
Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
ScottSuarez
left a comment
There was a problem hiding this comment.
Can you test what would happen if a user explicitly sets empty string. I think since w are migrating this from another type to essentially an enum we would need to support empty string in the permuations.
|
I expanded the scope to include RESERVATION_BOUND option too, implemented in same way the FLEX_START was. I needed them to connect to provision VMs through Coder. I will test empty string after I make sure RESERVATION_BOUND works through Coder |
|
Made "" pass validation too for backwards compatibility, GCP API will just treat it as standard same as before |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 1406 Click here to see the affected service packages
Action takenFound 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
|
@ScottSuarez This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
8e3f1ae
@ScottSuarez @MihajloLinic The failing tests are added in this PR and are now failing in VCR and nightly. Should we revert this PR or push an immediate fix? |
|
Its weird that tests for RESERVATION_BOUND are failing but not flex start ones because they are implemented exact same way plus im using the modified provider already in Coder setup and it was working I can take a look in couple of hours the fix is probably small |
Thanks @MihajloLinic! I’ll revert this for now. Please feel free to re-submit once the fix is ready. Thank you! |
This PR adds support for the
FLEX_STARTandRESERVATION_BOUNDprovisioning models togoogle_compute_instance,google_compute_instance_template, andgoogle_compute_region_instance_template.FLEX_STARTis a VM scheduling option in Google Cloud Compute Engine (part of the Dynamic Workload Scheduler) that allows flexible start times for VM instances, enabling cost optimization by letting Google schedule VM creation within a 24-hour time window. It is specifically designed for accelerator-optimized workloads (GPUs/TPUs).RESERVATION_BOUNDis a VM scheduling option that binds an instance to a specific reservation. When set, the instance will only consume capacity from the targeted reservation (configured viareservation_affinity). This is used with Calendar Reservations (Future Reservations) in the Dynamic Workload Scheduler, where GPU/TPU capacity is pre-booked for a specific time window and delivered as a standard reservation that instances can then target.Changes
FLEX_STARTandRESERVATION_BOUNDas valid values forprovisioning_modelin the scheduling block of instances and instance templates. Updated field descriptions and validation logic.FLEX_STARTandRESERVATION_BOUNDare correctly handled during resource conversion.FLEX_START(with its required companion fields likeinstance_termination_actionandmax_run_duration) andRESERVATION_BOUND(with its companionreservation_affinityblock).TestAccComputeInstance_flexStart,TestAccComputeInstanceTemplate_flexStart,TestAccComputeRegionInstanceTemplate_flexStartTestAccComputeInstance_reservationBound,TestAccComputeInstanceTemplate_reservationBound,TestAccComputeRegionInstanceTemplate_reservationBound