Skip to content

container: allow updating accelerators #13656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DrFaust92
Copy link
Contributor

Release Note Template for Downstream PRs (will be copied)

container: allow update in place for `guest_accelerator`

@github-actions github-actions bot requested a review from NickElliot April 12, 2025 20:28
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

@NickElliot, 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.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 12, 2025
Signed-off-by: drfaust92 <[email protected]>
Signed-off-by: drfaust92 <[email protected]>
@DrFaust92 DrFaust92 marked this pull request as draft April 13, 2025 23:59
Signed-off-by: drfaust92 <[email protected]>
@DrFaust92 DrFaust92 marked this pull request as ready for review April 14, 2025 02:51
Signed-off-by: drfaust92 <[email protected]>
@@ -148,21 +148,18 @@ func schemaNodeConfig() *schema.Schema {
"guest_accelerator": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will recreate when guest_accelerator is removed as there no method to remove via API (I tried thoroughly) but will allow updating if changes to nested args are made

@modular-magician modular-magician added service/container and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Apr 14, 2025
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 80 insertions(+), 43 deletions(-))
google-beta provider: Diff ( 2 files changed, 80 insertions(+), 43 deletions(-))

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field node_config.guest_accelerator transitioned from optional+computed to optional google_container_cluster - reference
  • Field node_config.guest_accelerator transitioned from optional+computed to optional google_container_node_pool - reference
  • Field node_pool.node_config.guest_accelerator transitioned from optional+computed to optional google_container_cluster - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_container_cluster (450 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_container_cluster" "primary" {
  node_config {
    guest_accelerator {
      count = # value needed
      gpu_driver_installation_config {
        gpu_driver_version = # value needed
      }
      gpu_partition_size = # value needed
      gpu_sharing_config {
        gpu_sharing_strategy       = # value needed
        max_shared_clients_per_gpu = # value needed
      }
      type = # value needed
    }
  }
  node_pool {
    node_config {
      guest_accelerator {
        count = # value needed
        gpu_driver_installation_config {
          gpu_driver_version = # value needed
        }
        gpu_partition_size = # value needed
        gpu_sharing_config {
          gpu_sharing_strategy       = # value needed
          max_shared_clients_per_gpu = # value needed
        }
        type = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 230
Passed tests: 217
Skipped tests: 11
Affected tests: 2

Click here to see the affected service packages
  • container

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContainerNodePool_EmptyGuestAccelerator
  • TestAccContainerNodePool_withGPU

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccContainerNodePool_withGPU [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccContainerNodePool_EmptyGuestAccelerator [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing computed status from the entire block is definitely a breaking change as it no longer is providing output, is it possible to keep guest_accelerator as O+C?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants