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

Add a flag to update the resource when creating a service networking connection fails #11332

Conversation

zli82016
Copy link
Member

@zli82016 zli82016 commented Aug 1, 2024

fixes hashicorp/terraform-provider-google#16697

In provider 4.x, resource google_service_networking_connection is soft deleted with removePeering method.
After upgrading to 5.x, creating the resource google_service_networking_connection in the same network and different peering ranges fails. When the field update_on_creation_fail is set to true, the creation will succeed by calling PATCH method after creation fails.

one pager doc is here

Release Note Template for Downstream PRs (will be copied)

servicenetworking: added `update_on_creation_fail` field to `google_service_networking_connection` resource

@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 ( 3 files changed, 108 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 3 files changed, 108 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • servicenetworking
#### Non-exercised tests

Tests were added that are skipped in VCR:

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

View the build log

@zli82016 zli82016 force-pushed the service-networking-connection branch from d999d91 to 7fdb6c4 Compare August 2, 2024 04:25
@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 ( 4 files changed, 115 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 115 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 7
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • servicenetworking

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@zli82016 zli82016 force-pushed the service-networking-connection branch from 7fdb6c4 to 57bf910 Compare August 2, 2024 16:41
@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 ( 4 files changed, 115 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 115 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 7
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • servicenetworking

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@zli82016 zli82016 force-pushed the service-networking-connection branch from 57bf910 to 74f9547 Compare August 2, 2024 17:27
@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 ( 4 files changed, 118 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 118 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 6
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • servicenetworking

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
  • TestAccServiceNetworkingConnection_abandon
  • TestAccServiceNetworkingConnection_updateOnCreationFail

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccServiceNetworkingConnection_abandon[Error message] [Debug log]
TestAccServiceNetworkingConnection_updateOnCreationFail[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

@zli82016 zli82016 force-pushed the service-networking-connection branch from 74f9547 to 5c2f48c Compare August 2, 2024 17:56
@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 ( 4 files changed, 116 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 116 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 7
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • servicenetworking

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@zli82016 zli82016 force-pushed the service-networking-connection branch from 5c2f48c to 3c0538b Compare August 2, 2024 18:32
@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 ( 4 files changed, 116 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 116 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 7
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • servicenetworking

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@zli82016 zli82016 force-pushed the service-networking-connection branch from 3c0538b to 580df0b Compare August 2, 2024 20:35
@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 ( 4 files changed, 111 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 111 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • servicenetworking
#### Non-exercised tests

Tests were added that are skipped in VCR:

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

View the build log

@zli82016 zli82016 force-pushed the service-networking-connection branch from 580df0b to 708fca2 Compare August 2, 2024 21:02
@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 ( 4 files changed, 112 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 112 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 7
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • servicenetworking

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccServiceNetworkingConnection_updateOnCreationFail[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

@zli82016 zli82016 requested review from a team and c2thorn and removed request for a team August 2, 2024 21:35
},
{
Config: testAccServiceNetworkingConnections(network, addr1, addr2, "servicenetworking.googleapis.com", org_id, billing_account, true),
ExpectNonEmptyPlan: true,
Copy link
Member

Choose a reason for hiding this comment

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

why do we expect a non-empty plan here again?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, google_service_networking_connection.foobar and google_service_networking_connection.foobar1 are the same service networking connection as they have the same network and service. When update_on_creation_fail is set to true, the service networking connection is updated with peering range google_compute_global_address.foobar1 successfully through google_service_networking_connection.foobar1. After refresh, google_service_networking_connection.foobar will also have the peering range google_compute_global_address.foobar1. The plan is not empty.

@zli82016
Copy link
Member Author

zli82016 commented Aug 5, 2024

Closing this PR. A new PR is open #11364.

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.

3 participants