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

Compute - Add update support for Network IP when changing network/subnetwork #4030

Merged

Conversation

ScottSuarez
Copy link
Contributor

@ScottSuarez ScottSuarez commented Sep 29, 2020

Compute - add support for changing network ip when moving network/subnetwork only
Fixed a scenario where changes access configs at the same time as network could result in an incompatible accessconfig being applied with the previous subnetwork.

Closes 7118

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).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • 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).
  • 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)

compute: added support for updating `network_interface.[d].network_ip` on `google_compute_instance` when changing network or subnetwork

@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 ( 2 files changed, 148 insertions(+), 46 deletions(-))
Terraform Beta: Diff ( 2 files changed, 148 insertions(+), 46 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149271"

@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 ( 2 files changed, 148 insertions(+), 46 deletions(-))
Terraform Beta: Diff ( 2 files changed, 148 insertions(+), 46 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149271"

@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 ( 2 files changed, 150 insertions(+), 46 deletions(-))
Terraform Beta: Diff ( 2 files changed, 150 insertions(+), 46 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149271"

Copy link
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

mostly suggestions

@danawillow
Copy link
Contributor

also cc @ndmckinley who at one point was looking into what it would take to generate instance- nathan, not sure if you ran into trying to update network interfaces yet but there's a lot of different cases that require different handling, and the new update method won't help in this case (https://cloud.google.com/compute/docs/instances/update-instance-properties#updatable-properties)

Copy link
Contributor Author

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

Fixed some issues. Refactored code

@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, 260 insertions(+), 114 deletions(-))
Terraform Beta: Diff ( 3 files changed, 260 insertions(+), 114 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149477"

@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, 260 insertions(+), 114 deletions(-))
Terraform Beta: Diff ( 3 files changed, 260 insertions(+), 114 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149480"

@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, 260 insertions(+), 114 deletions(-))
Terraform Beta: Diff ( 3 files changed, 260 insertions(+), 114 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149481"

@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, 261 insertions(+), 112 deletions(-))
Terraform Beta: Diff ( 3 files changed, 261 insertions(+), 112 deletions(-))

@ScottSuarez
Copy link
Contributor Author

I've made changes now to extrapolate functions when there is either code reuse or to avoid the creation of an inline function. I'm rather happy with this result.

These should be the changes that in essence are the pure functionality improvements. I've scrapped the refactor and the concept of network interface helper. Thanks for your time and assistance here!

@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 ( 5 files changed, 303 insertions(+), 60 deletions(-))
Terraform Beta: Diff ( 5 files changed, 303 insertions(+), 60 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151409"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccProviderMeta_setModuleName You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151411"

Copy link
Contributor

@danawillow danawillow left a comment

Choose a reason for hiding this comment

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

Getting there! Most of my comments are pretty small at this point, and sorry again for the back-and-forth on the structure/refactoring part.

Copy link
Contributor Author

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

Resolved formatting and comment concerns

@ScottSuarez
Copy link
Contributor Author

Getting there! Most of my comments are pretty small at this point, and sorry again for the back-and-forth on the structure/refactoring part.

No worries ! I learned a lot between these refactors. I appreciate your dedication to getting things right and not just getting them in.

@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 ( 5 files changed, 331 insertions(+), 80 deletions(-))
Terraform Beta: Diff ( 5 files changed, 344 insertions(+), 93 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151424"

Copy link
Contributor

@danawillow danawillow left a comment

Choose a reason for hiding this comment

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

LGTM assuming tests pass!

…comment friends. Truly truly a beautiful site to behold. Please be well and safe comment because the world needs you. YOU TOO are important
@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 ( 5 files changed, 326 insertions(+), 74 deletions(-))
Terraform Beta: Diff ( 5 files changed, 339 insertions(+), 87 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151427"

@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 ( 5 files changed, 326 insertions(+), 74 deletions(-))
Terraform Beta: Diff ( 5 files changed, 339 insertions(+), 87 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151459"

@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 ( 5 files changed, 326 insertions(+), 74 deletions(-))
Terraform Beta: Diff ( 5 files changed, 339 insertions(+), 87 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151763"

@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 ( 5 files changed, 304 insertions(+), 54 deletions(-))
Terraform Beta: Diff ( 5 files changed, 304 insertions(+), 54 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151775"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleSQLCaCerts_basic|TestAccDataSourceSqlDatabaseInstance_basic|TestAccProviderMeta_setModuleName|TestAccCloudRunService_cloudRunServiceSqlExample|TestAccProjectServiceIdentity_basic|TestAccSQLDatabase_sqlDatabaseBasicExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151781"

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

Successfully merging this pull request may close these issues.

Update support for google_compute_instance.network_interface
5 participants