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

Fix interconnect immutability issue causing macsec failure #11700

Conversation

harshithpatte-g
Copy link
Contributor

@harshithpatte-g harshithpatte-g commented Sep 13, 2024

fixes hashicorp/terraform-provider-google#19410

Customer issue: b/365795490
When Customer tries to deploy an interconnect with macsec enabled. The deployment fails. The circuit needs to be deployed first before enabling macsec, however, if macsec is enabled after, it causes the circuit to be destroyed and recreated.
Interconnect can't created with macsec enabled.

Fix: remove immutability from the interconnect resource and add it at field level.

Release Note Template for Downstream PRs (will be copied)

compute: added in-place update in `google_compute_interconnect` resource except for `remote_location ` and `requested_features` fields

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Sep 13, 2024
@harshithpatte-g harshithpatte-g force-pushed the harshithpatte/fix-interconnect-macsec-mutability branch from 5959dd5 to e726000 Compare September 13, 2024 12:10
@harshithpatte-g harshithpatte-g marked this pull request as ready for review September 13, 2024 15:48
Copy link

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

@zli82016, 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.

@github-actions github-actions bot requested a review from zli82016 September 13, 2024 15:49
@zli82016
Copy link
Member

/gcbrun

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

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1003
Passed tests: 926
Skipped tests: 75
Affected tests: 2

Click here to see the affected service packages
  • compute

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeInstance_confidentialHyperDiskBootDisk
  • TestAccComputeInterconnect_computeInterconnectMacsecTest

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeInstance_confidentialHyperDiskBootDisk[Debug log]
$\textcolor{red}{\textsf{Tests failed when rerunning REPLAYING mode:}}$
TestAccComputeInstance_confidentialHyperDiskBootDisk[Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccComputeInterconnect_computeInterconnectMacsecTest[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

@harshithpatte-g harshithpatte-g changed the title [Draft] Fix interconnect immutability issue causing macsec failure Fix interconnect immutability issue causing macsec failure Sep 13, 2024
Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

Can you please fix the failed test TestAccComputeInterconnect_computeInterconnectMacsecTest? Thanks.

@github-actions github-actions bot requested a review from zli82016 September 17, 2024 17:30
@zli82016
Copy link
Member

/gcbrun

@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 17, 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, 187 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 2 files changed, 187 insertions(+), 11 deletions(-))

Missing test report

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

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

resource "google_compute_interconnect" "primary" {
  macsec {
    pre_shared_keys {
      fail_open = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1005
Passed tests: 930
Skipped tests: 74
Affected tests: 1

Click here to see the affected service packages
  • compute

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeInterconnect_computeInterconnectMacsecTest[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


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

View the build log or the debug log for each test

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

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.

Support update-in-place for google_compute_interconnect resource
3 participants