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 Network Policy resource to Vmwareengine #9514

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

swamitagupta
Copy link
Member

@swamitagupta swamitagupta commented Nov 22, 2023

Added support for Network Policy resource and datasource.

Release Note Template for Downstream PRs (will be copied)

`google_vmwareengine_network_policy`
`google_vmwareengine_network_policy`

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

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

Terraform GA: Diff ( 9 files changed, 1315 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 1315 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 169 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3240
Passed tests 2906
Skipped tests: 331
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccVmwareengineNetworkPolicy_vmwareEngineNetworkPolicyBasicExample|TestAccVmwareengineNetworkPolicy_update|TestAccDataSourceVmwareengineNetworkPolicy_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

$\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

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

Terraform GA: Diff ( 9 files changed, 1315 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 1316 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 1 file changed, 169 insertions(+))

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

Terraform GA: Diff ( 9 files changed, 1316 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 1317 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 1 file changed, 169 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3240
Passed tests 2908
Skipped tests: 331
Affected tests: 1

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
TestAccDataSourceGoogleServiceAccountJwt

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

$\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

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

Terraform GA: Diff ( 9 files changed, 1316 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 1316 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 169 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3240
Passed tests 2909
Skipped tests: 331
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

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

Terraform GA: Diff ( 9 files changed, 1316 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 1316 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 169 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3244
Passed tests 2913
Skipped tests: 331
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

Code looks good, but some of the fields looked like they might need to be required or immutable (just guessing though). Making the update test a bit more comprehensive should help to highlight if any of those configs need to change.

})
}

func testAccVmwareengineNetworkPolicy_config(context map[string]interface{}, internetAccess bool, externalIp bool) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be checking all updateable fields here, so we'd expect to see changes to description, edge_services_cidr, and vmware_engine_network, based on the current implementation. On a similar token, it would be best if one of those configs also omitted all optional fields, to validate that they are not required. Using 2 separate config templates might make that easier to test.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the feedback Ryan, I've modified the update test to include changes in all mutable fields. I have made also added two seperate tests in examples for _basic and _full to validate the creation of resource with and without all optional fields.

@swamitagupta swamitagupta force-pushed the network-policy-ga branch 2 times, most recently from b77f168 to 2bf1a28 Compare November 29, 2023 04:19
@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.

Terraform GA: Diff ( 9 files changed, 1370 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 1370 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 169 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3245
Passed tests 2911
Skipped tests: 331
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccVmwareengineNetworkPolicy_vmwareEngineNetworkPolicyFullExample|TestAccVmwareengineNetworkPolicy_update|TestAccVmwareengineNetworkPolicy_vmwareEngineNetworkPolicyBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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


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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

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

Terraform GA: Diff ( 9 files changed, 1372 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 1372 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 169 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3245
Passed tests 2913
Skipped tests: 331
Affected tests: 1

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
TestAccVmwareengineNetworkPolicy_vmwareEngineNetworkPolicyBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

$\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
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

LGTM

@roaks3
Copy link
Contributor

roaks3 commented Nov 30, 2023

Adjusted release note to include the data source as well (guidance is in https://googlecloudplatform.github.io/magic-modules/contribute/release-notes/, but slightly buried)

@roaks3 roaks3 merged commit 03342cd into GoogleCloudPlatform:main Nov 30, 2023
14 checks passed
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