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

specs out the additional fields for nmve_ssd #7427

Merged

Conversation

geojaz
Copy link
Contributor

@geojaz geojaz commented Mar 9, 2023

Adds local_nvme_ssd_block to node_config block in the google_container_node_pool.

Also I needed to update the go.sum and go.mod and wasn't really clear on the right process.
Does this look right? Is there a "right" way to do it? Mine was really hacky :)

Closes hashicorp/terraform-provider-google#13829

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

container: added `local_nvme_ssd_block` to `node_config` block in the `google_container_node_pool`.

@geojaz geojaz requested a review from a team as a code owner March 9, 2023 03:37
@geojaz geojaz requested review from shuyama1 and removed request for a team March 9, 2023 03:37
@shuyama1
Copy link
Member

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

Terraform GA: Diff ( 3 files changed, 334 insertions(+), 84 deletions(-))
Terraform Beta: Diff ( 5 files changed, 444 insertions(+), 111 deletions(-))
TF Validator: Diff ( 2 files changed, 59 insertions(+), 49 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Errors occurred during REPLAYING mode. Please fix them to complete your PR
View the build log

@geojaz
Copy link
Contributor Author

geojaz commented Mar 11, 2023

I can't see the logs for the failures, but i think it might have something to do with updating the deps for google.golang.org/api v0.111.0.
I'll have to take a closer look to the tests on my side unless you can share some additional details- feel free to ping me on gchat @Ehole
(Just kidding, it was a bad test name)

@geojaz geojaz force-pushed the add_nvme_ssd_to_container_node_pool branch from 22211bd to ef70006 Compare March 13, 2023 06:06
@shuyama1
Copy link
Member

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

Terraform GA: Diff ( 3 files changed, 335 insertions(+), 85 deletions(-))
Terraform Beta: Diff ( 5 files changed, 445 insertions(+), 112 deletions(-))
TF Validator: Diff ( 2 files changed, 63 insertions(+), 53 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Errors occurred during REPLAYING mode. Please fix them to complete your PR
View the build log

@shuyama1
Copy link
Member

Tests failed due to:

go: bitbucket.org/creachadair/[email protected]: missing go.sum entry; to add it:
	go mod download bitbucket.org/creachadair/stringset
make: *** [vet] Error 1
GNUmakefile:26: recipe for target 'vet' failed
make: *** No rule to make target 'tools'.  Stop.
==> Checking that code complies with gofmt requirements...
go vet
go: bitbucket.org/creachadair/[email protected]: missing go.sum entry; to add it:
	go mod download bitbucket.org/creachadair/stringset
make: *** [vet] Error 1
GNUmakefile:26: recipe for target 'vet' failed
==> Checking that code complies with gofmt requirements...
go vet
go: bitbucket.org/creachadair/[email protected]: missing go.sum entry; to add it:
	go mod download bitbucket.org/creachadair/stringset
make: *** [vet] Error 1

@shuyama1
Copy link
Member

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

Terraform GA: Diff ( 3 files changed, 356 insertions(+), 35 deletions(-))
Terraform Beta: Diff ( 5 files changed, 466 insertions(+), 62 deletions(-))
TF Validator: Diff ( 2 files changed, 63 insertions(+), 53 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2497
Passed tests 2218
Skipped tests: 262
Affected tests: 17

Action taken

Found 17 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccPrivatecaCaPool_updateCaOption|TestAccPrivatecaCertificate_privatecaCertificateUpdate|TestAccPrivatecaCertificate_privatecaCertificateNoAuthorityExample|TestAccPrivatecaCertificate_privatecaCertificateCsrExample|TestAccPrivatecaCertificate_privatecaCertificateConfigExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityUpdate|TestAccPrivatecaCertificateAuthority_rootCaManageDesiredState|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityBasicExample|TestAccPrivatecaCertificate_privatecaCertificateWithTemplateExample|TestAccFirebaserulesRelease_BasicRelease|TestAccContainerNodePool_localNvmeSsdBlockConfig|TestAccComposerEnvironment_withEncryptionConfigComposer2|TestAccPrivatecaCaPool_privatecaCapoolEmptyBaseline|TestAccPrivatecaCaPool_privatecaCapoolUpdate|TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample|TestAccDataSourcePrivatecaCertificateAuthority_privatecaCertificateAuthorityBasicExample|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccPrivatecaCaPool_updateCaOption[Debug log]
TestAccPrivatecaCertificate_privatecaCertificateUpdate[Debug log]
TestAccPrivatecaCertificate_privatecaCertificateNoAuthorityExample[Debug log]
TestAccPrivatecaCertificate_privatecaCertificateCsrExample[Debug log]
TestAccPrivatecaCertificate_privatecaCertificateConfigExample[Debug log]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityUpdate[Debug log]
TestAccPrivatecaCertificateAuthority_rootCaManageDesiredState[Debug log]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityBasicExample[Debug log]
TestAccPrivatecaCertificate_privatecaCertificateWithTemplateExample[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComposerEnvironment_withEncryptionConfigComposer2[Debug log]
TestAccPrivatecaCaPool_privatecaCapoolEmptyBaseline[Debug log]
TestAccPrivatecaCaPool_privatecaCapoolUpdate[Debug log]
TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample[Debug log]
TestAccDataSourcePrivatecaCertificateAuthority_privatecaCertificateAuthorityBasicExample[Debug log]

Tests failed during RECORDING mode:
TestAccContainerNodePool_localNvmeSsdBlockConfig[Error message] [Debug log]
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@geojaz
Copy link
Contributor Author

geojaz commented Mar 13, 2023

/gcbrun

1 similar comment
@shuyama1
Copy link
Member

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

Terraform GA: Diff ( 3 files changed, 357 insertions(+), 35 deletions(-))
Terraform Beta: Diff ( 5 files changed, 475 insertions(+), 62 deletions(-))
TF Validator: Diff ( 2 files changed, 63 insertions(+), 53 deletions(-))

@geojaz geojaz force-pushed the add_nvme_ssd_to_container_node_pool branch from 96cf496 to 2c0afee Compare March 13, 2023 23:39
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2497
Passed tests 2231
Skipped tests: 262
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
TestAccComputeForwardingRule_update|TestAccFirebaserulesRelease_BasicRelease|TestAccContainerNodePool_localNvmeSsdBlockConfig|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeForwardingRule_update[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccContainerNodePool_localNvmeSsdBlockConfig[Error message] [Debug log]
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@geojaz geojaz force-pushed the add_nvme_ssd_to_container_node_pool branch from 2c0afee to f6eff4f Compare March 14, 2023 05:28
@shuyama1
Copy link
Member

/gcbrun

@geojaz geojaz force-pushed the add_nvme_ssd_to_container_node_pool branch from f6eff4f to 0015600 Compare March 14, 2023 06:14
@shuyama1
Copy link
Member

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

Terraform GA: Diff ( 3 files changed, 357 insertions(+), 35 deletions(-))
Terraform Beta: Diff ( 5 files changed, 474 insertions(+), 62 deletions(-))
TF Validator: Diff ( 2 files changed, 63 insertions(+), 53 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2497
Passed tests 2232
Skipped tests: 262
Affected tests: 3

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
TestAccFirebaserulesRelease_BasicRelease|TestAccContainerNodePool_localNvmeSsdBlockConfig|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccContainerNodePool_localNvmeSsdBlockConfig[Debug log]

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

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

LGTM! only some small comments. Plus, any reason we add in beta provider exclusively? I do see this field is supported in V1 API though.

Comment on lines 747 to 751
```hcl
local_nvme_ssd_block_config {
local_ssd_count = 2
}
```
Copy link
Member

Choose a reason for hiding this comment

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

We don't usually include inline example for fields. If you think the configuration example is needed for users, please add a full configuration example in the example usage section. However, for this feature, I think the usage is pretty straightforward, we can simply omit the code example.

@@ -878,6 +886,11 @@ linux_node_config {

* `local_ssd_count` (Required) - Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it means to disable using local SSDs as ephemeral storage.

<a name="nested_local_nvme_ssd_block_config"></a>The `local_nvme_ssd_block_config` block supports:

* `local_ssd_count` (Required) - Number of local NVMe SSDs attached to the instance. Each NVMe SSD is 375 GB in size.
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason that we don't align with the API doc here?

@geojaz
Copy link
Contributor Author

geojaz commented Mar 14, 2023

LGTM! only some small comments. Plus, any reason we add in beta provider exclusively? I do see this field is supported in V1 API though.
Good call- I'll push it to GA. I effectively just copied the implementation of ephemeral_storage_config- looks like this should also graduate... I won't include that here.

@geojaz
Copy link
Contributor Author

geojaz commented Mar 14, 2023

Pushed with your suggestions, I couldn't get the tests on generated GA provider to run on my system- there were lots of seemingly unrelated errors. Not sure what's up

@samos123
Copy link
Contributor

/gcbrun

1 similar comment
@shuyama1
Copy link
Member

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

Terraform GA: Diff ( 5 files changed, 460 insertions(+), 60 deletions(-))
Terraform Beta: Diff ( 5 files changed, 468 insertions(+), 62 deletions(-))
TF Validator: Diff ( 2 files changed, 63 insertions(+), 53 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2500
Passed tests 2233
Skipped tests: 262
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeForwardingRule_update|TestAccApigeeAddonsConfig_apigeeAddonsTestExample|TestAccDataSourceDnsManagedZone_basic|TestAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComputeForwardingRule_update[Debug log]
TestAccApigeeAddonsConfig_apigeeAddonsTestExample[Debug log]
TestAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample[Debug log]

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

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

GA test failed on TC: https://ci-oss.hashicorp.engineering/buildConfiguration/GoogleCloud_ProviderGoogleCloudMmUpstream/383054
It's probably due to one of the beta flags not removed

mmv1/third_party/terraform/utils/node_config.go.erb Outdated Show resolved Hide resolved
@shuyama1
Copy link
Member

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

Terraform GA: Diff ( 5 files changed, 467 insertions(+), 60 deletions(-))
Terraform Beta: Diff ( 5 files changed, 468 insertions(+), 62 deletions(-))
TF Validator: Diff ( 2 files changed, 63 insertions(+), 53 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2501
Passed tests 2237
Skipped tests: 263
Affected tests: 1

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
TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Please fix these to complete your PR
View the build log or the debug log for each test

@shuyama1
Copy link
Member

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@shuyama1 shuyama1 merged commit 768b706 into GoogleCloudPlatform:main Mar 15, 2023
dannawang0221 pushed a commit to dannawang0221/magic-modules that referenced this pull request Mar 24, 2023
dannawang0221 pushed a commit to dannawang0221/magic-modules that referenced this pull request Mar 24, 2023
dannawang0221 pushed a commit to dannawang0221/magic-modules that referenced this pull request Mar 29, 2023
ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
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.

container_node_pool add support for raw block local NVMe SSDs
4 participants