Skip to content
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

added provisioned_throughput to instance_template and region_instance_template #11901

Conversation

lnesteroff
Copy link
Contributor

@lnesteroff lnesteroff commented Oct 2, 2024

Added the option to configure provisioned_throughput for regional and global instance_templates similar to PR#8528. Both provisioned_iops and provisioned_throughput can be used to customise hyperdisks, so I also updated the wording of provisioned_iops so it isn't exclusively referring to PD extreme.

Release Note Template for Downstream PRs (will be copied)

compute: added `provisioned_throughput` field to `google_compute_instance_template` resource
compute: added `provisioned_throughput` field to `google_compute_region_instance_template` resource

Copy link

github-actions bot commented Oct 2, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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

@github-actions github-actions bot requested a review from SarahFrench October 2, 2024 23:52
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 2, 2024
@lnesteroff lnesteroff changed the title added provisioned_throughput to instance_template and regional_instance_template added provisioned_throughput to instance_template and region_instance_template Oct 2, 2024
@modular-magician modular-magician added service/compute-instances and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 3, 2024
@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 ( 4 files changed, 131 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 131 insertions(+), 3 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • compute
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccComputeInstanceTemplate_diskIopsThroughput
  • TestAccComputeRegionInstanceTemplate_diskIopsThroughput
    🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

👋 Hi!

I can see there's a build error currently:

Error: google/services/compute/resource_compute_instance_template.go:1474:6: dc.provisionedThroughput undefined (type diskCharacteristics has no field or method provisionedThroughput)

It looks like you'll need to update the diskCharacteristics struct defined in resource_compute_instance_template.go.tmpl to have a new field called provisionedThroughput. Given the diskCharacteristics structs returned from diskCharacteristicsFromMap are just used for comparisons I think that's the only change needed, but I've only taken a quick look.

@github-actions github-actions bot requested a review from SarahFrench October 4, 2024 05:59
@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 ( 4 files changed, 138 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 138 insertions(+), 9 deletions(-))

Missing test report

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

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

resource "google_compute_instance_template" "primary" {
  disk {
    provisioned_throughput = # value needed
  }
}

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

resource "google_compute_region_instance_template" "primary" {
  disk {
    provisioned_throughput = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1028
Passed tests: 952
Skipped tests: 74
Affected tests: 2

Click here to see the affected service packages
  • compute

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
  • TestAccComputeInstanceTemplate_diskIopsThroughput
  • TestAccComputeRegionInstanceTemplate_diskIopsThroughput

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccComputeInstanceTemplate_diskIopsThroughput[Error message] [Debug log]
TestAccComputeRegionInstanceTemplate_diskIopsThroughput[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

@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 ( 4 files changed, 136 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 136 insertions(+), 9 deletions(-))

Missing test report

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

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

resource "google_compute_instance_template" "primary" {
  disk {
    provisioned_throughput = # value needed
  }
}

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

resource "google_compute_region_instance_template" "primary" {
  disk {
    provisioned_throughput = # value needed
  }
}

1 similar comment
@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 ( 4 files changed, 136 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 136 insertions(+), 9 deletions(-))

Missing test report

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

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

resource "google_compute_instance_template" "primary" {
  disk {
    provisioned_throughput = # value needed
  }
}

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

resource "google_compute_region_instance_template" "primary" {
  disk {
    provisioned_throughput = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1028
Passed tests: 952
Skipped tests: 74
Affected tests: 2

Click here to see the affected service packages
  • compute

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
  • TestAccComputeInstanceTemplate_diskIopsThroughput
  • TestAccComputeRegionInstanceTemplate_diskIopsThroughput

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccComputeInstanceTemplate_diskIopsThroughput[Error message] [Debug log]
TestAccComputeRegionInstanceTemplate_diskIopsThroughput[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

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1028
Passed tests: 952
Skipped tests: 74
Affected tests: 2

Click here to see the affected service packages
  • compute

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
  • TestAccComputeInstanceTemplate_diskIopsThroughput
  • TestAccComputeRegionInstanceTemplate_diskIopsThroughput

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccComputeInstanceTemplate_diskIopsThroughput[Error message] [Debug log]
TestAccComputeRegionInstanceTemplate_diskIopsThroughput[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

@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 ( 4 files changed, 136 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 136 insertions(+), 9 deletions(-))

Missing test report

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

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

resource "google_compute_region_instance_template" "primary" {
  disk {
    provisioned_throughput = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1028
Passed tests: 952
Skipped tests: 74
Affected tests: 2

Click here to see the affected service packages
  • compute

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
  • TestAccComputeInstanceTemplate_diskIopsThroughput
  • TestAccComputeRegionInstanceTemplate_diskIopsThroughput

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccComputeRegionInstanceTemplate_diskIopsThroughput[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

@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 ( 4 files changed, 136 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 136 insertions(+), 9 deletions(-))

@lnesteroff
Copy link
Contributor Author

@SarahFrench Bunch of non-space characters somehow made their way in, but should be fine now :)

Copy link

github-actions bot commented Oct 8, 2024

@SarahFrench This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

I'm glad you were able to track down those non-space characters, how confusing! And using strings for comparing the value in diskCharacteristicsFromMap sounds like a good compromise.

Overall this looks good to approve, though I've suggested some additions to the field descriptions that come from the API docs. We could also add some validation to the fields in the schema, so Terraform gives users feedback if they try to set a bad value. This could be done using the validation.IntAtLeast helper function - what do you think?

lnesteroff and others added 2 commits October 8, 2024 20:52
…egion_instance_template.go.tmpl

Co-authored-by: Sarah French <[email protected]>
@github-actions github-actions bot requested a review from SarahFrench October 8, 2024 09:53
@lnesteroff
Copy link
Contributor Author

Thanks for the suggestion, looks good to me :)

@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 ( 4 files changed, 136 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 136 insertions(+), 9 deletions(-))

1 similar comment
@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 ( 4 files changed, 136 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 136 insertions(+), 9 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1028
Passed tests: 954
Skipped tests: 74
Affected tests: 0

Click here to see the affected service packages
  • compute

🟢 All tests passed!

View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1028
Passed tests: 954
Skipped tests: 74
Affected tests: 0

Click here to see the affected service packages
  • compute

🟢 All tests passed!

View the build log

@KipHamiltons
Copy link

@lnesteroff @SarahFrench All good to merge? Would love to see these changes in! 🤩

@SarahFrench
Copy link
Contributor

There's something wrong with the checks, I'll re-run and merge : /gcbrun

@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 ( 4 files changed, 136 insertions(+), 9 deletions(-))
google-beta provider: Diff ( 4 files changed, 136 insertions(+), 9 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1030
Passed tests: 955
Skipped tests: 74
Affected tests: 1

Click here to see the affected service packages
  • compute

Action taken

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link

This PR is approved and has been waiting for merge for 1 week. Is it ready to merge? Use the label disable-review-reminders to disable these notifications.

@KipHamiltons
Copy link

Send it!! 🎉

@SarahFrench SarahFrench merged commit 5e938c6 into GoogleCloudPlatform:main Oct 15, 2024
12 checks passed
gontech pushed a commit to gontech/magic-modules that referenced this pull request Oct 16, 2024
varshatumburu pushed a commit to varshatumburu/magic-modules that referenced this pull request Oct 19, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 23, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 24, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 5, 2024
akshat-jindal-nit pushed a commit to akshat-jindal-nit/magic-modules that referenced this pull request Nov 18, 2024
amanMahendroo pushed a commit to amanMahendroo/magic-modules that referenced this pull request Dec 17, 2024
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.

4 participants