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

add support for min_num_instances in google_dataproc_cluster #9150

Merged
merged 7 commits into from
Oct 13, 2023

Conversation

sunchengxuanivy
Copy link
Contributor

@sunchengxuanivy sunchengxuanivy commented Oct 3, 2023

Release Note Template for Downstream PRs (will be copied)

dataproc: added `min_num_instances` field to `google_dataproc_cluster` resource

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will require approval to run.

@rileykarson, 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 needs reviewer's approval to run presubmit tests label Oct 3, 2023
@@ -2557,6 +2589,9 @@ func flattenInstanceGroupConfig(d *schema.ResourceData, icg *dataproc.InstanceGr
data["num_instances"] = icg.NumInstances
data["machine_type"] = tpgresource.GetResourceNameFromSelfLink(icg.MachineTypeUri)
data["min_cpu_platform"] = icg.MinCpuPlatform
if icg.MinNumInstances != 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Rather than just guard on the value being nonzero, we should pass through the type of config we're checking and write the value conditionally. If the API began to allow a minimum number of primary instances and started passing through a value to a user (a backwards compatible change), the user would get an error on their next Terraform run as we tried to write to a value that didn't exist.

region = "us-central1"

cluster_config {
master_config{
Copy link
Member

Choose a reason for hiding this comment

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

nit: Do you mind spacing these lines as two spaces rather than tabs, for consistency within the config?

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Oct 4, 2023
@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.

Terraform GA: Diff ( 3 files changed, 84 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 3 files changed, 84 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3120
Passed tests 2798
Skipped tests: 315
Affected tests: 7

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
TestAccContainerCluster_withAddons|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig|TestAccDataprocCluster_withMinNumInstances|TestAccDataSourceGoogleServiceAccountAccessToken_basic|TestAccDataSourceGoogleServiceAccountIdToken_impersonation|TestAccWorkstationsWorkstationConfig_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataSourceGoogleServiceAccountAccessToken_basic[Debug log]
TestAccWorkstationsWorkstationConfig_update[Debug log]

Rerun these tests in REPLAYING mode to catch issues

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerCluster_withAddons[Error message] [Debug log]
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccDataprocCluster_withMinNumInstances[Error message] [Debug log]
TestAccDataSourceGoogleServiceAccountIdToken_impersonation[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these 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 Oct 11, 2023
@rileykarson
Copy link
Member

Generating to run tests- will make a full review pass tomorrow.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Oct 13, 2023
@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.

Terraform GA: Diff ( 4 files changed, 734 insertions(+), 140 deletions(-))
Terraform Beta: Diff ( 4 files changed, 734 insertions(+), 140 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3147
Passed tests 2827
Skipped tests: 316
Affected tests: 4

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAlloydbCluster_secondaryClusterMandatoryFields|TestAccAlloydbBackup_alloydbBackupFullExample|TestAccBigQueryDataTable_bigtable|TestAccDataprocCluster_withMinNumInstances

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigQueryDataTable_bigtable[Debug log]
TestAccDataprocCluster_withMinNumInstances[Debug log]

Rerun these tests in REPLAYING mode to catch issues

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbCluster_secondaryClusterMandatoryFields[Error message] [Debug log]
TestAccAlloydbBackup_alloydbBackupFullExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Especially for going ahead and splitting those out 🎉

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

Successfully merging this pull request may close these issues.

4 participants