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 behavioral changes to instance, instance template's max_run_duration feature on Beta #10683

Merged
merged 12 commits into from
May 20, 2024

Conversation

arungantasala
Copy link
Contributor

@arungantasala arungantasala commented May 13, 2024

Max run duration(MRD) feature support in terraform was added in #6812. There are behavioral changes in the feature which needs further changes.

  1. max_run_duration is not a one time intent
  2. Add STOP instance termination action with MRD
  3. Support MRD on instances with attached local SSDs.

See SchedulingOnInstanceStopAction section in https://pkg.go.dev/google.golang.org/api/compute/v0.beta.

Fix for hashicorp/terraform-provider-google#13005

Closes hashicorp/terraform-provider-google#13671

Release Note Template for Downstream PRs (will be copied)

compute: added `on_instance_stop_action` field to `google_compute_instance`, `google_compute_instance_template`, and `google_compute_instance_from_machine_image ` resources (beta)

@github-actions github-actions bot requested a review from SarahFrench May 13, 2024 17:53
Copy link

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.

@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(+), 24 deletions(-))
google-beta provider: Diff ( 6 files changed, 412 insertions(+), 41 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 39 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (5 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" {
  scheduling {
    instance_termination_action = # value needed
    maintenance_interval        = # value needed
    min_node_cpus               = # value needed
    on_host_maintenance         = # value needed
    on_instance_stop_action {
      discard_local_ssd = # value needed
    }
    preemptible        = # value needed
    provisioning_model = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    instance_termination_action = # value needed
    maintenance_interval        = # value needed
    min_node_cpus               = # value needed
    on_host_maintenance         = # value needed
    on_instance_stop_action {
      discard_local_ssd = # value needed
    }
    preemptible        = # value needed
    provisioning_model = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 923
Passed tests: 844
Skipped tests: 72
Affected tests: 7

Click here to see the affected service packages
  • compute

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccComputeInstanceTemplate_spot_maxRunDuration_deleteTerminationAction|TestAccComputeInstanceTemplate_spot_maxRunDuration_stopTerminationAction|TestAccComputeInstance_localSsdVM_maxRunDuration_stopTerminationAction|TestAccComputeInstance_maxRunDuration_update|TestAccComputeInstance_spotVM_maxRunDuration_deleteTerminationAction|TestAccComputeInstance_standardVM_maxRunDuration_deleteTerminationAction|TestAccComputeInstance_standardVM_maxRunDuration_stopTerminationAction

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeInstanceTemplate_spot_maxRunDuration_deleteTerminationAction[Debug log]
TestAccComputeInstanceTemplate_spot_maxRunDuration_stopTerminationAction[Debug log]
TestAccComputeInstance_localSsdVM_maxRunDuration_stopTerminationAction[Debug log]
TestAccComputeInstance_maxRunDuration_update[Debug log]
TestAccComputeInstance_spotVM_maxRunDuration_deleteTerminationAction[Debug log]
TestAccComputeInstance_standardVM_maxRunDuration_deleteTerminationAction[Debug log]
TestAccComputeInstance_standardVM_maxRunDuration_stopTerminationAction[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Collaborator

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

Thanks for your PR - the new tests look good and are passing but I want to make sure this message about missing test coverage is acknowledged.

That message shows that the new on_instance_stop_action field is also being added to the google_compute_instance_from_machine_image resource. This is because schemas are re-used in the provider (see here for google_compute_instance_from_machine_image).

Firstly, could you please update the documentation for google_compute_instance_from_machine_image to include the new field?

And then, could you please add a basic acceptance test that tests the new field/behaviour you've added to google_compute_instance_from_machine_image?

I'm happy for us to ignore the message's warnings about lack of test coverage on fields that your PR isn't adding.

@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 ( 7 files changed, 234 insertions(+), 25 deletions(-))
google-beta provider: Diff ( 10 files changed, 721 insertions(+), 42 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 54 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    instance_termination_action = # value needed
    maintenance_interval        = # value needed
    min_node_cpus               = # value needed
    on_host_maintenance         = # value needed
    on_instance_stop_action {
      discard_local_ssd = # value needed
    }
    preemptible        = # value needed
    provisioning_model = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 46
Passed tests: 9
Skipped tests: 37
Affected tests: 0

Click here to see the affected service packages
  • compute

Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccComputeInstanceFromMachineImage_maxRunDuration
  • TestAccComputeInstanceTemplate_maxRunDuration_onInstanceStopAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_localSsdVM_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_maxRunDuration_update
  • TestAccComputeInstance_spotVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_stopTerminationAction
  • TestAccComputeRegionInstanceTemplate_maxRunDuration_onInstanceStopAction

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$
View the build log

@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 ( 7 files changed, 234 insertions(+), 25 deletions(-))
google-beta provider: Diff ( 11 files changed, 853 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 54 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 46
Passed tests: 9
Skipped tests: 37
Affected tests: 0

Click here to see the affected service packages
  • compute

Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccComputeInstanceFromMachineImage_maxRunDuration
  • TestAccComputeInstanceFromTemplate_maxRunDuration_onInstanceStopAction
  • TestAccComputeInstanceTemplate_maxRunDuration_onInstanceStopAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_localSsdVM_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_maxRunDuration_update
  • TestAccComputeInstance_spotVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_stopTerminationAction
  • TestAccComputeRegionInstanceTemplate_maxRunDuration_onInstanceStopAction

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$
View the build log

@arungantasala
Copy link
Contributor Author

/gcbrun

@arungantasala
Copy link
Contributor Author

arungantasala commented May 16, 2024

  1. google_compute_instance_from_machine_image resource's documentation mentions "In addition to these, most* arguments from google_compute_instance are supported as a way to override the properties in the machine image." This includes the new argument on_instance_stop_action
  2. Added acceptance tests for the new field at all the relavant places

Copy link
Collaborator

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

The problem reported here is a panic that occurs when running the TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/access_config_update_access_config acceptance test:

panic: interface conversion: interface {} is []interface {}, not map[string]interface {}

goroutine 68179 [running]:
github.com/hashicorp/terraform-provider-google-beta/google-beta/services/compute.hasMaxRunDurationChanged(...)
	/go/src/github.com/modular-magician/terraform-provider-google-beta/google-beta/services/compute/compute_instance_helpers.go:705
github.com/hashicorp/terraform-provider-google-beta/google-beta/services/compute.schedulingHasChangeRequiringReboot(0xc001302ca8?)
	/go/src/github.com/modular-magician/terraform-provider-google-beta/google-beta/services/compute/compute_instance_helpers.go:658 +0x3ce
github.com/hashicorp/terraform-provider-google-beta/google-beta/services/compute.resourceComputeInstanceUpdate(0xc001f3f680, {0x4613dc0?, 0xc000161000?})
	/go/src/github.com/modular-magician/terraform-provider-google-beta/google-beta/services/compute/resource_compute_instance.go:1890 +0x1437

The line compute_instance_helpers.go:705 in the generated provider is the beginning of hasMaxRunDurationChanged function where empty interfaces are converted to maps

@github-actions github-actions bot requested a review from SarahFrench May 16, 2024 17:35
Copy link
Collaborator

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

Please address the panic described in #10683 (review)

@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 ( 7 files changed, 234 insertions(+), 25 deletions(-))
google-beta provider: Diff ( 11 files changed, 853 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 54 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

@github-actions github-actions bot requested a review from SarahFrench May 16, 2024 17:46
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 46
Passed tests: 9
Skipped tests: 37
Affected tests: 0

Click here to see the affected service packages
  • compute

Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccComputeInstanceFromMachineImage_maxRunDuration
  • TestAccComputeInstanceFromTemplate_maxRunDuration_onInstanceStopAction
  • TestAccComputeInstanceTemplate_maxRunDuration_onInstanceStopAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_localSsdVM_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_maxRunDuration_update
  • TestAccComputeInstance_spotVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_stopTerminationAction
  • TestAccComputeRegionInstanceTemplate_maxRunDuration_onInstanceStopAction

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$
View the build log

@arungantasala
Copy link
Contributor Author

Thanks Sarah for pointing this out. I was not able to reproduce the issue locally by running the test you pointed out. It is somehow failing on its own due to an unrelated issue. But, i have pushed a change to fix this. I will take another look if the panic shows up again.

@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 ( 7 files changed, 234 insertions(+), 25 deletions(-))
google-beta provider: Diff ( 11 files changed, 853 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 54 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 46
Passed tests: 9
Skipped tests: 37
Affected tests: 0

Click here to see the affected service packages
  • compute

Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccComputeInstanceFromMachineImage_maxRunDuration
  • TestAccComputeInstanceFromTemplate_maxRunDuration_onInstanceStopAction
  • TestAccComputeInstanceTemplate_maxRunDuration_onInstanceStopAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstanceTemplate_spot_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_localSsdVM_maxRunDuration_stopTerminationAction
  • TestAccComputeInstance_maxRunDuration_update
  • TestAccComputeInstance_spotVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_deleteTerminationAction
  • TestAccComputeInstance_standardVM_maxRunDuration_stopTerminationAction
  • TestAccComputeRegionInstanceTemplate_maxRunDuration_onInstanceStopAction

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$
View the build log

Copy link

This PR has been waiting for review for 2 days. Please take a look! Use the label disable-review-reminders to disable these notifications.

@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 ( 7 files changed, 244 insertions(+), 25 deletions(-))
google-beta provider: Diff ( 11 files changed, 863 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 64 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 932
Passed tests: 860
Skipped tests: 72
Affected tests: 0

Click here to see the affected service packages
  • compute

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

SarahFrench
SarahFrench previously approved these changes May 20, 2024
Copy link
Collaborator

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

Looks good - the panic is addressed and there is test coverage for all the new fields added by this PR.

@SarahFrench SarahFrench dismissed their stale review May 20, 2024 10:13

Spotted a code change in GA when this PR is meant to be beta-only changes

Copy link
Collaborator

@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 approved but then from looking at your release note I remembered that this PR is meant to be causing changes in the beta provider only. I looked at the diffs that this PR will create in the GA provider and noticed that there are non-trivial changes being introduced by this PR in the GA provider. We want to get to a state where this PR only causes changes to documentation in the GA provider.

I've added a few suggestions in my review, but could you please also ensure that the changes to the _test.go files are also made only in the Beta provider? To achieve this you will need to convert any affected .go files into .go.erb files, as that'll allow the code to be templated in a conditional way based on the provider that's being generated.

When converting a .go file to a .go.erb file you just need to add the new extension to the filename and then add <% autogen_exception -%> as the first line of the file (example here).

@@ -656,7 +692,7 @@ func schedulingHasChangeRequiringReboot(d *schema.ResourceData) bool {
oScheduling := o.([]interface{})[0].(map[string]interface{})
newScheduling := n.([]interface{})[0].(map[string]interface{})

return hasNodeAffinitiesChanged(oScheduling, newScheduling)
return hasNodeAffinitiesChanged(oScheduling, newScheduling) || hasMaxRunDurationChanged(oScheduling, newScheduling)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This suggested change should mean that the changes only appear in the Beta provider

Suggested change
return hasNodeAffinitiesChanged(oScheduling, newScheduling) || hasMaxRunDurationChanged(oScheduling, newScheduling)
<% unless version == 'ga' -%>
return hasNodeAffinitiesChanged(oScheduling, newScheduling) || hasMaxRunDurationChanged(oScheduling, newScheduling)
<% else -%>
return hasNodeAffinitiesChanged(oScheduling, newScheduling)
<% end -%>

…compute_instance_helpers.go.erb

Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>
@github-actions github-actions bot requested a review from SarahFrench May 20, 2024 15:36
arungantasala and others added 2 commits May 20, 2024 08:36
…e/resource_compute_instance.go.erb

Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>
@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 ( 6 files changed, 219 insertions(+), 24 deletions(-))
google-beta provider: Diff ( 11 files changed, 862 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 63 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

Errors

google provider:

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

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 ( 6 files changed, 219 insertions(+), 24 deletions(-))
google-beta provider: Diff ( 11 files changed, 862 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 63 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

Errors

google provider:

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

@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 ( 5 files changed, 41 insertions(+), 25 deletions(-))
google-beta provider: Diff ( 11 files changed, 862 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 63 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

Errors

google provider:

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

@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, 40 insertions(+), 24 deletions(-))
google-beta provider: Diff ( 11 files changed, 863 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 64 insertions(+), 4 deletions(-))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  scheduling {
    maintenance_interval = # value needed
  }
}

Resource: google_compute_instance_from_machine_image (6 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" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  scheduling {
    maintenance_interval = # value needed
    min_node_cpus        = # value needed
    on_host_maintenance  = # value needed
    preemptible          = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 932
Passed tests: 860
Skipped tests: 72
Affected tests: 0

Click here to see the affected service packages
  • compute

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 932
Passed tests: 860
Skipped tests: 72
Affected tests: 0

Click here to see the affected service packages
  • compute

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 932
Passed tests: 860
Skipped tests: 72
Affected tests: 0

Click here to see the affected service packages
  • compute

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 932
Passed tests: 860
Skipped tests: 72
Affected tests: 0

Click here to see the affected service packages
  • compute

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@arungantasala
Copy link
Contributor Author

Thanks Sarah for catching this. I have made changes as you suggested.

Copy link
Collaborator

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

Thanks for addressing the GA/Beta issue! I can see that the diffs for the GA provider still show changes in functions like testAccComputeInstanceTemplate_spot_maxRunDuration, however those functions are unused in the GA code base so the code change isn't user-facing. Because Go tolerates unused functions and those functions were already present in the GA code before this PR, I'm happy to merge this PR

@SarahFrench SarahFrench merged commit 63bda5e into GoogleCloudPlatform:main May 20, 2024
12 checks passed
avijain25 pushed a commit to avijain25/magic-modules that referenced this pull request May 21, 2024
…uration feature on Beta (GoogleCloudPlatform#10683)

Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>
ma-g-22 pushed a commit to ma-g-22/magic-modules that referenced this pull request May 21, 2024
…uration feature on Beta (GoogleCloudPlatform#10683)

Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
…uration feature on Beta (GoogleCloudPlatform#10683)

Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants