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

feat: Remove force replacement from gcfs_config #11553

Conversation

dominykasn
Copy link
Contributor

@dominykasn dominykasn commented Aug 27, 2024

Gcfsconfig changes do not require to re-create node pools hence there is no point to ForceNew on each gcfsconfig change, gcfs can be enabled and disabled via GUI or gcloud CLI without recreating node pools, examples:
https://cloud.google.com/kubernetes-engine/docs/how-to/image-streaming#disable

https://cloud.google.com/kubernetes-engine/docs/how-to/image-streaming#enable_on_node_pools

Also, same issue noted here hashicorp/terraform-provider-google#18417

Release Note Template for Downstream PRs (will be copied)

container: removed unnecessary force replacement in `gcfs_config`

@github-actions github-actions bot requested a review from hao-nan-li August 27, 2024 08:22
Copy link

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

@hao-nan-li, 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 need reviewer's approval to run presubmit tests label Aug 27, 2024
Copy link
Contributor

@hao-nan-li hao-nan-li left a comment

Choose a reason for hiding this comment

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

I don't think contributor-membership-checker (graphite-docker-images) is part of the CI nowadays, could you rebase on main and re-commit?

@dominykasn dominykasn force-pushed the feat/remove_force_replacement_from_gcfs_config branch from 2d01b21 to ca83c4b Compare August 28, 2024 07:15
@github-actions github-actions bot requested a review from hao-nan-li August 28, 2024 07:16
@dominykasn
Copy link
Contributor Author

Rebased and re-commited from main branch, however, I see other branches also have the same checks

@modular-magician modular-magician added service/container and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Aug 28, 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 ( 2 files changed, 43 insertions(+), 29 deletions(-))
google-beta provider: Diff ( 2 files changed, 43 insertions(+), 29 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    gcfs_config {
      enabled = # value needed
    }
  }
  node_pool {
    node_config {
      gcfs_config {
        enabled = # value needed
      }
    }
  }
}

@hao-nan-li
Copy link
Contributor

Rebased and re-commited from main branch, however, I see other branches also have the same checks

Thanks for the rebase, thanks for correcting, contributor-membership-checker is indeed part of the check, just that it no longer requires manual approval.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 200
Passed tests: 186
Skipped tests: 13
Affected tests: 1

Click here to see the affected service packages
  • container

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
  • TestAccContainerNodePool_gcfsConfig

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@dominykasn dominykasn force-pushed the feat/remove_force_replacement_from_gcfs_config branch from ca83c4b to 14a8bd0 Compare August 29, 2024 07:05
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 29, 2024
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 29, 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 ( 2 files changed, 44 insertions(+), 30 deletions(-))
google-beta provider: Diff ( 2 files changed, 44 insertions(+), 30 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    gcfs_config {
      enabled = # value needed
    }
  }
  node_pool {
    node_config {
      gcfs_config {
        enabled = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 203
Passed tests: 189
Skipped tests: 13
Affected tests: 1

Click here to see the affected service packages
  • container

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
  • TestAccContainerNodePool_gcfsConfig

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@wyardley
Copy link
Contributor

Similar note to: #11541 (review) - it may be worth adding the suggested test of this parameter when it's used in resource "google_container_cluster", and specifically testing updates as well. It's a known issue that many of these parameters don't actually support updating when called this way.

@dominykasn
Copy link
Contributor Author

Sure, will check, however, is there a possibility to check why my tests are failing?

@dominykasn
Copy link
Contributor Author

Also, please correct me if I'm wrong but there are already tests written here for cluster and gcfs config changes?

Copy link

github-actions bot commented Sep 2, 2024

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

@wyardley
Copy link
Contributor

wyardley commented Sep 2, 2024

Oh yeah, looks like it!

@dominykasn
Copy link
Contributor Author

What do I need to do more in this case for this to get approved? 🤔

@hao-nan-li
Copy link
Contributor

What do I need to do more in this case for this to get approved? 🤔

I think the VCR test needs to be fixed. resource_container_node_pool_test.go:1707: Step 3/4 error: Check failed: Check 1/1 error: google_container_node_pool.np: Attribute 'node_config.0.gcfs_config.0.enabled' expected "false", got "true"

@dominykasn dominykasn force-pushed the feat/remove_force_replacement_from_gcfs_config branch from 14a8bd0 to 3e0b2fa Compare September 3, 2024 16:20
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Sep 3, 2024
@dominykasn dominykasn force-pushed the feat/remove_force_replacement_from_gcfs_config branch from 3e0b2fa to 7520262 Compare September 3, 2024 17:08
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Sep 3, 2024
@wyardley
Copy link
Contributor

wyardley commented Sep 3, 2024

Also, please correct me if I'm wrong but there are already tests written here for cluster and gcfs config changes?

[Just to be clear, I'm not a Google employee, and am not reviewing this PR, just was commenting in case it's helpful since I did some work around similar changes recently.]

Reading those a bit more carefully, from what I can see, that's only testing the setting within node_pool_defaults.node_config_defaults, which influence the default behavior of newly created node pools. This only requires a cluster update to be performed.
The comment is also requesting a test for node_config.gcfs_config (this is the config for default-pool if created implicitly when created directly within the google_container_cluster resource), which I don't think is tested anywhere.

My prediction is that if you add or extend the test to test node_config.gcfs_config, it will fail, because I don't think there's anything related to gcfs_config here.

That is more complicated to update, and as yet only implemented for one or two parameters. See hashicorp/terraform-provider-google#19225 for a high level description of the issue, and some of the comments in #11272 for more context

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Sep 3, 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 ( 2 files changed, 46 insertions(+), 32 deletions(-))
google-beta provider: Diff ( 3 files changed, 47 insertions(+), 33 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    gcfs_config {
      enabled = # value needed
    }
  }
  node_pool {
    node_config {
      gcfs_config {
        enabled = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 204
Passed tests: 190
Skipped tests: 13
Affected tests: 1

Click here to see the affected service packages
  • container

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
  • TestAccContainerNodePool_gcfsConfig

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@dominykasn dominykasn force-pushed the feat/remove_force_replacement_from_gcfs_config branch from 7520262 to 22ea497 Compare September 4, 2024 06:59
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Sep 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

@GoogleCloudPlatform/terraform-team @hao-nan-li This PR has been waiting for review for 1 week. 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 need reviewer's approval to run presubmit tests label Sep 4, 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 ( 2 files changed, 34 insertions(+), 32 deletions(-))
google-beta provider: Diff ( 3 files changed, 35 insertions(+), 33 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    gcfs_config {
      enabled = # value needed
    }
  }
  node_pool {
    node_config {
      gcfs_config {
        enabled = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 204
Passed tests: 191
Skipped tests: 13
Affected tests: 0

Click here to see the affected service packages
  • container

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

@hao-nan-li hao-nan-li merged commit b3e10c0 into GoogleCloudPlatform:main Sep 4, 2024
12 checks passed
iyabchen pushed a commit to iyabchen/magic-modules that referenced this pull request Sep 14, 2024
wyardley added a commit to wyardley/magic-modules that referenced this pull request Sep 14, 2024
- Handle updates properly for `node_config.gcfs_config`
- Make `node_config.gcfs_config.enabled` optional and computed vs.
  required
- Add tests to make sure we test the case where it's defined in
  `google_container_cluster.node_config`, as well as testing updates for
  both that and the `google_container_node_pool` resource.

Fixes #19482
Follow up to GoogleCloudPlatform#11553
wyardley added a commit to wyardley/magic-modules that referenced this pull request Sep 14, 2024
- Handle updates properly for `node_config.gcfs_config`
- Make `node_config.gcfs_config.enabled` optional and computed vs.
  required
- Add tests to make sure we test the case where it's defined in
  `google_container_cluster.node_config`, as well as testing updates for
  both that and the `google_container_node_pool` resource.

Fixes #19482
Follow up to GoogleCloudPlatform#11553
wyardley added a commit to wyardley/magic-modules that referenced this pull request Sep 14, 2024
- Handle updates properly for `node_config.gcfs_config`
- Make `node_config.gcfs_config.enabled` optional and computed vs.
  required
- Add tests to make sure we test the case where it's defined in
  `google_container_cluster.node_config`, as well as testing updates for
  both that and the `google_container_node_pool` resource.

Fixes hashicorp/terraform-provider-google#19482
Follow up to GoogleCloudPlatform#11553
wyardley added a commit to wyardley/magic-modules that referenced this pull request Sep 14, 2024
- Handle updates properly for `node_config.gcfs_config`
- Make `node_config.gcfs_config.enabled` optional and computed vs.
  required
- Add tests to make sure we test the case where it's defined in
  `google_container_cluster.node_config`, as well as testing updates for
  both that and the `google_container_node_pool` resource.

Fixes hashicorp/terraform-provider-google#19482
Follow up to GoogleCloudPlatform#11553
wyardley added a commit to wyardley/magic-modules that referenced this pull request Sep 14, 2024
- Handle updates properly for `node_config.gcfs_config`
- Make `node_config.gcfs_config.enabled` optional and computed vs.
  required
- Add tests to make sure we test the case where it's defined in
  `google_container_cluster.node_config`, as well as testing updates for
  both that and the `google_container_node_pool` resource.

Fixes hashicorp/terraform-provider-google#19482
Follow up to GoogleCloudPlatform#11553
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Oct 7, 2024
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.

4 participants