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

Runtime patch #6137

Merged
merged 27 commits into from
Jul 15, 2022
Merged

Runtime patch #6137

merged 27 commits into from
Jul 15, 2022

Conversation

m-mayran
Copy link
Contributor

@m-mayran m-mayran commented Jun 16, 2022

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

  • [ x] 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).
  • [ x] Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • [ x] 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).
  • [x ] Ran relevant acceptance tests (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)

notebooks: added field `reserved_ip_range` to `google_notebooks_runtime`
notebooks: fixed a bug where`google_notebooks_runtime` can't be updated

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @shuyama1, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 188 insertions(+), 16 deletions(-))
Terraform Beta: Diff ( 3 files changed, 188 insertions(+), 16 deletions(-))
TF Validator: Diff ( 3 files changed, 14 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2054
Passed tests 1825
Skipped tests: 226
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests TestAccNotebooksRuntime_update|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withAddons

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccNotebooksRuntime_update[view]
TestAccContainerCluster_withAddons[view]
TestAccContainerCluster_withConfidentialNodes[view]

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

@shuyama1
Copy link
Member

@m-mayran Looks like the test failed. Let me know if you need help debugging! (failed tests TestAccContainerCluster_withAddons and TestAccContainerCluster_withConfidentialNodes are unrelated and can be ignored. Sorry for the noise)

@m-mayran
Copy link
Contributor Author

I am not sure if related but it seems that Terraform tries to update a value set automatically softwareConfig.enable_health_monitoring

error=
  | After applying this test step, the plan was not empty.
  | stdout:
  | 
  | 
  | An execution plan has been generated and is shown below.
  | Resource actions are indicated with the following symbols:
  |   ~ update in-place
  | 
  | Terraform will perform the following actions:
  | 
  |   # google_notebooks_runtime.runtime will be updated in-place
  |   ~ resource "google_notebooks_runtime" "runtime" {
  |         id       = "projects/mam-nooage/locations/us-central1/runtimes/tf-test-notebooks-runtimed2hddnz9w2"
  |         location = "us-central1"
  |         metrics  = []
  |         name     = "tf-test-notebooks-runtimed2hddnz9w2"
  |         project  = "mam-nooage"
  |         state    = "PROVISIONING"
  | 
  |         access_config {
  |             access_type   = "SINGLE_USER"
  |             proxy_uri     = "364d6d1039a5d875-dot-us-central1.notebooks.googleusercontent.com"
  |             runtime_owner = "[email protected]"
  |         }
  | 
  |       ~ software_config {
  |           ~ enable_health_monitoring = false -> true
  |             idle_shutdown            = true
  |             idle_shutdown_timeout    = 80
  |             install_gpu_driver       = false
  |         }
  | 
  |         virtual_machine {
  |             virtual_machine_config {
  |                 guest_attributes = {}
  |                 internal_ip_only = false
  |                 labels           = {}
  |                 machine_type     = "n1-standard-4"
  |                 metadata         = {}
  |                 tags             = []
  |                 zone             = "us-central1-b"
  | 
  |                 data_disk {
  |                     auto_delete       = false
  |                     boot              = false
  |                     guest_os_features = []
  |                     index             = 0
  |                     licenses          = []
  | 
  |                     initialize_params {
  |                         disk_size_gb = 100
  |                         disk_type    = "PD_STANDARD"
  |                         labels       = {}
  |                     }
  |                 }
  |             }
  |         }
  |     }
  | 
  | Plan: 0 to add, 1 to change, 0 to destroy.

How can I avoid this in the rules? I do have

softwareConfig: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true

@m-mayran
Copy link
Contributor Author

Also, I see that the state is in PROVISIONING (which might be why enable_health_monitoring is not yet true). Is there something that I can add (and should I) in my tests to wait for the terraform task to be finished?

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 190 insertions(+), 19 deletions(-))
Terraform Beta: Diff ( 3 files changed, 190 insertions(+), 19 deletions(-))
TF Validator: Diff ( 3 files changed, 14 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2054
Passed tests 1823
Skipped tests: 226
Failed tests: 5

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests TestAccNotebooksRuntime_update|TestAccFirebaserulesRelease_BasicRelease|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withAddons|TestAccNotebooksRuntime_notebookRuntimeBasicGpuExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccNotebooksRuntime_update[view]
TestAccNotebooksRuntime_notebookRuntimeBasicGpuExample[view]
TestAccFirebaserulesRelease_BasicRelease[view]

Tests failed during RECORDING mode:
TestAccContainerCluster_withAddons[view]
TestAccContainerCluster_withConfidentialNodes[view]

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

@m-mayran
Copy link
Contributor Author

@shuyama1 , it seems that the tests related to Runtime passed. Do you see any other error that I might have missed?

mmv1/products/notebooks/api.yaml Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
mmv1/products/notebooks/api.yaml Show resolved Hide resolved
mmv1/products/notebooks/api.yaml Outdated Show resolved Hide resolved
mmv1/products/notebooks/api.yaml Outdated Show resolved Hide resolved
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2095
Passed tests 1866
Skipped tests: 226
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests TestAccNotebooksRuntime_update|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccNotebooksRuntime_update[view]

Tests failed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation[view]

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

@m-mayran
Copy link
Contributor Author

@m-mayran Looks like the test failed. Let me know if you need help debugging! (failed tests TestAccContainerCluster_withAddons and TestAccContainerCluster_withConfidentialNodes are unrelated and can be ignored. Sorry for the noise)

We might change some of the fields that can be edited over time. Is it ok to leave those without the input: true for now?

Also, if I look the Runtime's name for example, that one is immutable and has output: true. Would it still need input: true?

@m-mayran m-mayran requested a review from shuyama1 July 13, 2022 19:04
@shuyama1
Copy link
Member

@m-mayran Looks like the test failed. Let me know if you need help debugging! (failed tests TestAccContainerCluster_withAddons and TestAccContainerCluster_withConfidentialNodes are unrelated and can be ignored. Sorry for the noise)

We might change some of the fields that can be edited over time. Is it ok to leave those without the input: true for now?

Also, if I look the Runtime's name for example, that one is immutable and has output: true. Would it still need input: true?

Output-only fields don't need them. I would recommend you at least add it to fields whose update functionality can't be supported for sure or can't be supported in the near future. Plus, removing input: true does not consider a breaking change. We can remove it from the field anytime when the update logic is supported.

@m-mayran
Copy link
Contributor Author

@m-mayran Looks like the test failed. Let me know if you need help debugging! (failed tests TestAccContainerCluster_withAddons and TestAccContainerCluster_withConfidentialNodes are unrelated and can be ignored. Sorry for the noise)

We might change some of the fields that can be edited over time. Is it ok to leave those without the input: true for now?
Also, if I look the Runtime's name for example, that one is immutable and has output: true. Would it still need input: true?

Output-only fields don't need them. I would recommend you at least add it to fields whose update functionality can't be supported for sure or can't be supported in the near future. Plus, removing input: true does not consider a breaking change. We can remove it from the field anytime when the update logic is supported.

Thanks for the details. Added to the fields that will most likely be immutable until we set up an update for GCE fields who don't required an instance restart.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 158 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 3 files changed, 158 insertions(+), 3 deletions(-))
TF Validator: Diff ( 3 files changed, 14 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2096
Passed tests 1868
Skipped tests: 226
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation[view]

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

@shuyama1 shuyama1 requested review from shuyama1 and removed request for shuyama1 July 14, 2022 20:34
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 in general! It should be good to go after adding the test for reserved_ip_range. Thank you so much for the work!

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 160 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 3 files changed, 160 insertions(+), 3 deletions(-))
TF Validator: Diff ( 3 files changed, 14 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2108
Passed tests 1877
Skipped tests: 226
Failed tests: 5

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests TestAccNotebooksRuntime_update|TestAccComputeInstance_soleTenantNodeAffinities|TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlUser_mysqlDisabled

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccNotebooksRuntime_update[view]
TestAccSqlUser_mysqlDisabled[view]
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]

Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities[view]

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.

Thank you!

@shuyama1 shuyama1 merged commit b720f35 into GoogleCloudPlatform:main Jul 15, 2022
geojaz pushed a commit to geojaz/magic-modules that referenced this pull request Jul 21, 2022
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.

3 participants