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 ephemeral_storage_local_ssd_config #7483

Merged
merged 6 commits into from
Mar 30, 2023

Conversation

dannawang0221
Copy link
Contributor

@dannawang0221 dannawang0221 commented Mar 17, 2023

Support for GKE ephemeral storage local ssd and local nvme ssd block
fix: hashicorp/terraform-provider-google#14021

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 support for `ephemeral_storage_local_ssd_config` to `google_container_cluster.node_config`, `google_container_cluster.node_pools.node_config`, `google_container_node_pool.node_config`

@dannawang0221 dannawang0221 requested a review from a team as a code owner March 17, 2023 00:59
@dannawang0221 dannawang0221 requested review from rileykarson and removed request for a team March 17, 2023 00:59
@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

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.

See hashicorp/terraform-provider-google#13829, hashicorp/terraform-provider-google#8461 - both of these are supported.

One of the two is only at beta though, so you may want to GA it if it's available in the GA API now.

@dannawang0221
Copy link
Contributor Author

dannawang0221 commented Mar 17, 2023

See hashicorp/terraform-provider-google#13829, hashicorp/terraform-provider-google#8461 - both of these are supported.

One of the two is only at beta though, so you may want to GA it if it's available in the GA API now.

ephemeral_storage_local_ssd_config is different from ephemeral_storage_config. I'll remove local_nvme_ssd_block_config, thanks for reminding.

@rileykarson
Copy link
Member

Hmm- I see in the docs that "This field is functionally equivalent to the ephemeralStorageConfig" on ephemeralStorageLocalSsdConfig. I'm not sure it makes sense to support both as the fields will likely fight over which controls the setting.

@dannawang0221
Copy link
Contributor Author

We won't graduate ephemeralStorageConfig from beta to GA. ephemeralStorageLocalSsdConfig is the GA version for the feature.

@dannawang0221 dannawang0221 changed the title Support ephemeral_storage_local_ssd_config and local_nvme_ssd_block_config Support ephemeral_storage_local_ssd_config Mar 17, 2023
@rileykarson
Copy link
Member

rileykarson commented Mar 17, 2023

Got it! We likely want to remap ephemeral_storage_config on to ephemeralStorageLocalSsdConfig given that- supporting both as separate fields will cause issues for users who use ephemeral_storage_config already, and require handling that'll degrade the behaviour of both fields. It's a strict requirement that the beta Terraform provider is a strict superset of the GA one, and both providers are stable.

@dannawang0221
Copy link
Contributor Author

ok, so I should replace ephemeralStorageConfig with ephemeralStorageLocalSsdConfig and graduate ephemeral_storage_config from beta to ga?

@rileykarson
Copy link
Member

rileykarson commented Mar 17, 2023

Ah! No, we'd keep the field name ephemeral_storage_config, and remap the implementation of the field to use the new API field. Then we'd promote that field to GA in Terraform.

@dannawang0221
Copy link
Contributor Author

dannawang0221 commented Mar 17, 2023

It will be a breaking change for the users who are using ephemeralStorageConfig currently? If they do a get, they won't be able to find the information since we don't have a backfill from ephemeralStorageConfig to ephemeralStorageLocalSsdConfig

Can we leave the ephemeral_storage_config as it is, and create a new ephemeral_storage_local_ssd_config for the new ephemeralStorageLocalSsdConfig proto? This is also what we did for the gcloud CLI.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@rileykarson
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 ( 4 files changed, 130 insertions(+), 28 deletions(-))
Terraform Beta: Diff ( 4 files changed, 132 insertions(+), 30 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2570
Passed tests 2293
Skipped tests: 267
Affected tests: 10

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccFrameworkProviderMeta_setModuleName|TestAccFrameworkProviderBasePath_setBasePath|TestAccContainerNodePool_ephemeralStorageLocalSsdConfig|TestAccDataSourceGoogleFirebaseAppleAppConfig|TestAccComputeInstanceFromRegionTemplate_basic|TestAccDataSourceDnsManagedZone_basic|TestAccDataSourceDNSKeys_noDnsSec|TestAccDataSourceDNSKeys_basic|TestAccDataSourceDnsRecordSet_basic|TestAccComposerEnvironment_withEncryptionConfigComposer2

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFrameworkProviderMeta_setModuleName[Debug log]
TestAccFrameworkProviderBasePath_setBasePath[Debug log]
TestAccContainerNodePool_ephemeralStorageLocalSsdConfig[Debug log]
TestAccDataSourceGoogleFirebaseAppleAppConfig[Debug log]
TestAccComputeInstanceFromRegionTemplate_basic[Debug log]
TestAccDataSourceDnsManagedZone_basic[Debug log]
TestAccDataSourceDNSKeys_noDnsSec[Debug log]
TestAccDataSourceDNSKeys_basic[Debug log]
TestAccDataSourceDnsRecordSet_basic[Debug log]
TestAccComposerEnvironment_withEncryptionConfigComposer2[Debug log]

All tests passed
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.

Discussed offline, the new field replaces the old beta-only one but they're incompatible w/ no backfill. Given that, we can't remap the field and introducing the new field is correct.

We may want to mark ephemeral_storage_config as deprecated to push users to use the new field instead. We'll need to outline how to migrate between them in the deprecation message- that's going to be recreating the affected resources, given both fields are immutable.

Terraform deprecations don't fall under GCP policies for this kind of stuff. The ecosystem expectation is that we document the path end users take to resolve the deprecation is all. In the next major release, deprecated fields can be removed.

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