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

Support advanced_machine_features.performance_monitoring_unit for instance and templates #12281

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

Conversation

karolgorc
Copy link
Contributor

@karolgorc karolgorc commented Nov 8, 2024

related to b/319565227

  • added support for advanced_machine_features.performance_monitoring_unit to
    • google_compute_region_instance_template
    • google_compute_instance_template
    • google_compute_instance
  • added tests

There is a problem with the API on this field because it only works on C4 instances but the API errors are not reflecting that when the machine type is wrong. Pending to be fixed. Other than that this works and here is a terraform implementation

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

compute: `google_compute_instance`, `google_compute_instance_template` and `google_compute_region_instance_template` now support `advanced_machine_features.performance_monitoring_unit`

@github-actions github-actions bot requested a review from trodge November 8, 2024 10:12
Copy link

github-actions bot commented Nov 8, 2024

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

@trodge, 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 awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Nov 8, 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 ( 10 files changed, 290 insertions(+))
google-beta provider: Diff ( 10 files changed, 290 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 2 insertions(+))

Missing test report

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

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

resource "google_compute_instance_from_machine_image" "primary" {
  advanced_machine_features {
    enable_nested_virtualization = # value needed
    performance_monitoring_unit  = # value needed
    threads_per_core             = # value needed
    turbo_mode                   = # value needed
    visible_core_count           = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  advanced_machine_features {
    enable_nested_virtualization = # value needed
    performance_monitoring_unit  = # value needed
    threads_per_core             = # value needed
    turbo_mode                   = # value needed
    visible_core_count           = # value needed
  }
}

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

resource "google_compute_region_instance_template" "primary" {
  advanced_machine_features {
    performance_monitoring_unit = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1063
Passed tests: 987
Skipped tests: 73
Affected tests: 3

Click here to see the affected service packages
  • compute

Action taken

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeInstanceTemplate_performanceMonitoringUnit [Debug log]
TestAccComputeInstance_performanceMonitoringUnit [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


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

@trodge
Copy link
Contributor

trodge commented Nov 11, 2024

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Nov 11, 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 ( 10 files changed, 290 insertions(+))
google-beta provider: Diff ( 10 files changed, 290 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 2 insertions(+))

Missing test report

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

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

resource "google_compute_instance_from_machine_image" "primary" {
  advanced_machine_features {
    enable_nested_virtualization = # value needed
    performance_monitoring_unit  = # value needed
    threads_per_core             = # value needed
    turbo_mode                   = # value needed
    visible_core_count           = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  advanced_machine_features {
    enable_nested_virtualization = # value needed
    performance_monitoring_unit  = # value needed
    threads_per_core             = # value needed
    turbo_mode                   = # value needed
    visible_core_count           = # value needed
  }
}

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

resource "google_compute_region_instance_template" "primary" {
  advanced_machine_features {
    performance_monitoring_unit = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1063
Passed tests: 989
Skipped tests: 73
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
  • TestAccComputeRegionInstanceTemplate_performanceMonitoringUnit

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccComputeRegionInstanceTemplate_performanceMonitoringUnit [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 modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 12, 2024
Copy link

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

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 14, 2024
@trodge
Copy link
Contributor

trodge commented Nov 14, 2024

/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 ( 10 files changed, 290 insertions(+))
google-beta provider: Diff ( 10 files changed, 290 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 2 insertions(+))

Missing test report

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

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

resource "google_compute_instance_from_machine_image" "primary" {
  advanced_machine_features {
    enable_nested_virtualization = # value needed
    performance_monitoring_unit  = # value needed
    threads_per_core             = # value needed
    turbo_mode                   = # value needed
    visible_core_count           = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  advanced_machine_features {
    enable_nested_virtualization = # value needed
    performance_monitoring_unit  = # value needed
    threads_per_core             = # value needed
    turbo_mode                   = # value needed
    visible_core_count           = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1063
Passed tests: 989
Skipped tests: 73
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
  • TestAccComputeRegionInstanceTemplate_performanceMonitoringUnit

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeRegionInstanceTemplate_performanceMonitoringUnit [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

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