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

Added new resource "WasmPlugin" #12275

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

matheusaleixo-cit
Copy link
Contributor

@matheusaleixo-cit matheusaleixo-cit commented Nov 7, 2024

Adds new resource google_network_services_wasm_plugin.
Also creates new product networkservicesplugins as a subset of networkservices to allow this resource to use the v1beta1 API for the beta provider.

Fixes: hashicorp/terraform-provider-google#20220

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_service_extensions_wasm_plugin`

- Fixed NetworkServices product being configured to use v1 endpoints for the beta providers;
@matheusaleixo-cit matheusaleixo-cit changed the title Added new resource "WasmPlugins" Added new resource "WasmPlugin" Nov 7, 2024
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 7, 2024
@matheusaleixo-cit matheusaleixo-cit marked this pull request as ready for review November 8, 2024 14:51
@github-actions github-actions bot requested a review from SirGitsalot November 8, 2024 14:52
Copy link

github-actions bot commented Nov 8, 2024

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

@SirGitsalot, 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 modular-magician added service/networkservices-traffic-director service/networkservices-media-cdn and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Nov 8, 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, 431 insertions(+))
google-beta provider: Diff ( 35 files changed, 1632 insertions(+), 43 deletions(-))
terraform-google-conversion: Diff ( 15 files changed, 256 insertions(+), 28 deletions(-))

Missing test report

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

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

resource "google_network_services_wasm_plugin" "primary" {
  versions {
    plugin_config_data = # value needed
    plugin_config_uri  = # value needed
  }
}

type: ResourceRef
resource: 'WasmPluginVersion'
description: |
Optional. The ID of the WasmPluginVersion resource that is the currently serving one. The version referred to must be a child of this WasmPlugin resource and should be listed in the "versions" field.
Copy link
Member

Choose a reason for hiding this comment

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

Is there a google_network_services_wasm_plugin_version resource on its way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am currently trying to implement a version resource but I am having some issues since main_version_id appears to be required for creation (despite the API docs describing it as optional) and needs to refer to a version listed in this plugin resource during request. Trying to list a initial version in the plugin resource and config additional versions as resources inevitably causes permadiffs.

Either way, I think this field would be better off as a String since it may not necessarily be used with a future versions resource.

Copy link
Member

Choose a reason for hiding this comment

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

I just checked the API proto definition, and main_version_id is annotated with both (google.api.field_behavior) = OPTIONAL and a validator.rule that makes it required (and the latter wins).

The main reason I asked about google_network_services_wasm_plugin_version is if that resource can manage versions and so can a writeable versions field in google_network_services_wasm_plugin then there's no single canonical place to configure versions, which doesn't play well with Terraform.

Thinking about it a little more, I'm not sure that google_network_services_wasm_plugin_version would be possible, at least not without a lot of custom code or a sketchy user experience. Since the parent google_network_services_wasm_plugin needs to exist before creating a google_network_services_wasm_plugin_version child, the configuration sequence would be:

  1. Configure a google_network_services_wasm_plugin with an empty main_version_id (assuming that the validator.rule is incorrect and can be removed from the API)
  2. Create a google_network_services_wasm_plugin_version
  3. Update the plugin from step 1 to set main_version_id to the version from step 2.

As you've discovered, step 3 is what makes things a PITA. There's a couple of ways to work around the problem:

  • The easiest is not to implement google_network_services_wasm_plugin_version and make the versions field of google_network_services_wasm_plugin required instead.
  • If main_version_id really is optional, remove the validator.rule (and wait for the subsequent API rollout). Then, implement google_network_services_wasm_plugin_version with an additional virtual boolean field, something like main_version. When a google_network_services_wasm_plugin_version is configured with main_version = true a custom post-create or post-update step would PATCH the parent plugin resource to set main_version to the version in question.

With the latter, main_version_id and versions in google_network_services_wasm_plugin can be output only or omitted entirely. You'll need custom encoder for main_version_id and versions for updates so that they don't get zeroed out when updating the other fields in the resource.

I think the separate version resource option is a more idiomatically Terraform approach and a better user experience, but it will be a fair amount of additional work to create and maintain. I'll leave it up to you which you prefer.

Copy link
Contributor Author

@matheusaleixo-cit matheusaleixo-cit Nov 12, 2024

Choose a reason for hiding this comment

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

main_version_id being required seems to be the intended behavior for the API, with versions being managed together with the WasmPlugin, so I will be keeping the versions implementation on the google_network_services_wasm_plugin resource.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4288
Passed tests: 3810
Skipped tests: 415
Affected tests: 63

Click here to see the affected service packages

All service packages are affected

#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccNetworkServicesWasmPlugin_wasmPluginLogConfigUpdate
  • TestAccNetworkServicesWasmPlugin_wasmPluginVersionUpdate

Action taken

Found 63 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBackupDRBackupPlanAssociation_backupDrBpaExample
  • TestAccBackupDRBackupPlan_backupDrBackupPlanSimpleExample
  • TestAccBackupDRBackupVault_fullUpdate
  • TestAccCloudRunV2Service_cloudrunv2ServiceMeshExample
  • TestAccCloudRunV2Service_cloudrunv2ServiceMeshUpdate
  • TestAccComputeServiceAttachment_serviceAttachmentBasicExampleGateway
  • TestAccContainerCluster_withFleetConfig
  • TestAccDataSourceGoogleBackupDRBackupPlanAssociation_basic
  • TestAccNetworkServicesEdgeCacheKeyset_networkServicesEdgeCacheKeysetBasicExample
  • TestAccNetworkServicesEdgeCacheKeyset_networkServicesEdgeCacheKeysetDualTokenExample
  • TestAccNetworkServicesEdgeCacheKeyset_update
  • TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample
  • TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginBasicExample
  • TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginV4authExample
  • TestAccNetworkServicesEdgeCacheOrigin_updateAndImport
  • TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample
  • TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceBasicExample
  • TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceDualTokenExample
  • TestAccNetworkServicesEdgeCacheService_updateAndImport
  • TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyBasicExample
  • TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyEmptyMatchExample
  • TestAccNetworkServicesEndpointPolicy_update
  • TestAccNetworkServicesGateway_minimalSwp
  • TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentNetwork
  • TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentSubnetwork
  • TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample
  • TestAccNetworkServicesGateway_networkServicesGatewayBasicExample
  • TestAccNetworkServicesGateway_networkServicesGatewayMultipleSwpSameNetworkExample
  • TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyExample
  • TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyWithoutAddresses
  • TestAccNetworkServicesGateway_swpAsNextHop
  • TestAccNetworkServicesGateway_swpUpdate
  • TestAccNetworkServicesGateway_update
  • TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteActionsExample
  • TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteBasicExample
  • TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteMatchesAndActionsExample
  • TestAccNetworkServicesGrpcRoute_update
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteActionsExample
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteBasicExample
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMatchesAndActionsExample
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMeshBasicExample
  • TestAccNetworkServicesHttpRoute_update
  • TestAccNetworkServicesLBPolicies_update
  • TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample
  • TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample
  • TestAccNetworkServicesLbTrafficExtension_update
  • TestAccNetworkServicesMesh_networkServicesMeshBasicExample
  • TestAccNetworkServicesMesh_networkServicesMeshNoPortExample
  • TestAccNetworkServicesMesh_update
  • TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample
  • TestAccNetworkServicesServiceBinding_update
  • TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesAdvancedExample
  • TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesBasicExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteActionsExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteBasicExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteGatewayBasicExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteMeshBasicExample
  • TestAccNetworkServicesTcpRoute_update
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteBasicExample
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteGatewayBasicExample
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteMeshBasicExample
  • TestAccNetworkServicesTlsRoute_update
  • TestAccNetworkServicesWasmPlugin_wasmPluginBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccBackupDRBackupPlanAssociation_backupDrBpaExample [Debug log]
TestAccBackupDRBackupVault_fullUpdate [Debug log]
TestAccCloudRunV2Service_cloudrunv2ServiceMeshExample [Debug log]
TestAccCloudRunV2Service_cloudrunv2ServiceMeshUpdate [Debug log]
TestAccComputeServiceAttachment_serviceAttachmentBasicExampleGateway [Debug log]
TestAccDataSourceGoogleBackupDRBackupPlanAssociation_basic [Debug log]
TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyBasicExample [Debug log]
TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyEmptyMatchExample [Debug log]
TestAccNetworkServicesEndpointPolicy_update [Debug log]
TestAccNetworkServicesGateway_minimalSwp [Debug log]
TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentNetwork [Debug log]
TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentSubnetwork [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayBasicExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayMultipleSwpSameNetworkExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyWithoutAddresses [Debug log]
TestAccNetworkServicesGateway_swpAsNextHop [Debug log]
TestAccNetworkServicesGateway_swpUpdate [Debug log]
TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteActionsExample [Debug log]
TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteBasicExample [Debug log]
TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteMatchesAndActionsExample [Debug log]
TestAccNetworkServicesGrpcRoute_update [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteActionsExample [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteBasicExample [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMatchesAndActionsExample [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMeshBasicExample [Debug log]
TestAccNetworkServicesHttpRoute_update [Debug log]
TestAccNetworkServicesLBPolicies_update [Debug log]
TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample [Debug log]
TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample [Debug log]
TestAccNetworkServicesLbTrafficExtension_update [Debug log]
TestAccNetworkServicesMesh_networkServicesMeshBasicExample [Debug log]
TestAccNetworkServicesMesh_networkServicesMeshNoPortExample [Debug log]
TestAccNetworkServicesMesh_update [Debug log]
TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample [Debug log]
TestAccNetworkServicesServiceBinding_update [Debug log]
TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesAdvancedExample [Debug log]
TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteActionsExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteGatewayBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteMeshBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_update [Debug log]
TestAccNetworkServicesTlsRoute_networkServicesTlsRouteBasicExample [Debug log]
TestAccNetworkServicesTlsRoute_networkServicesTlsRouteMeshBasicExample [Debug log]
TestAccNetworkServicesTlsRoute_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccBackupDRBackupPlan_backupDrBackupPlanSimpleExample [Error message] [Debug log]
TestAccContainerCluster_withFleetConfig [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheKeyset_networkServicesEdgeCacheKeysetBasicExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheKeyset_networkServicesEdgeCacheKeysetDualTokenExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheKeyset_update [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginBasicExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginV4authExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheOrigin_updateAndImport [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceBasicExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceDualTokenExample [Error message] [Debug log]
TestAccNetworkServicesEdgeCacheService_updateAndImport [Error message] [Debug log]
TestAccNetworkServicesGateway_update [Error message] [Debug log]
TestAccNetworkServicesTlsRoute_networkServicesTlsRouteGatewayBasicExample [Error message] [Debug log]
TestAccNetworkServicesWasmPlugin_wasmPluginBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@@ -16,7 +16,7 @@ name: 'NetworkServices'
display_name: 'Network services'
versions:
- name: 'beta'
base_url: 'https://networkservices.googleapis.com/v1/'
base_url: 'https://networkservices.googleapis.com/v1beta1/'
Copy link
Member

Choose a reason for hiding this comment

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

This change is what's causing the new test failures. I think (based on looking at your API service config) that the wasm endpoints are being served on /v1/ so you should be able to revert.

Choose a reason for hiding this comment

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

/v1/ may not be available until Q1 2025. We need to stay with v1beta1.

Copy link
Member

Choose a reason for hiding this comment

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

The discovery doc says that the wasm plugin endpoints are available under /v1/ so it might be worth trying. If it works, it'll save you from having to fix all the tests that are broken when connecting to /v1beta1/

Copy link
Contributor Author

@matheusaleixo-cit matheusaleixo-cit Nov 18, 2024

Choose a reason for hiding this comment

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

Running the v1 endpoints for wasmPlugins causes a 403 error: "WasmPlugins v1 api is not yet available. Please use the v1beta1 API." so I guess there is no way around that.

Most of the broken tests are related to NetworkServicesEdgeCache* resources, and the docs lists only v1 and v1alpha1 endpoints for these, so maybe we could use v1alpha1 endpoints for the beta provider?

Copy link
Member

Choose a reason for hiding this comment

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

It's OK to use a higher-versioned endpoint (like using GA for beta as has been used here) but going the other way is not. This is the first time I've encountered a split where one resource is available in GA but not beta, while another resource is available in beta but not GA. I'll talk to the team and see if there's a precedent for how to handle the situation.

Copy link

@krz-filip krz-filip Nov 21, 2024

Choose a reason for hiding this comment

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

Most of the broken tests are related to NetworkServicesEdgeCache* resources, and the docs lists only v1 and v1alpha1 endpoints for these, so maybe we could use v1alpha1 endpoints for the beta provider?

I can't image how NetworkServicesEdgeCache tests may be impacted, as it would require WasmAction resource (a connection between WasmPlugin and EdgeCacheService) which stays in v1alpha and is not a part of the current task (you have access to WasmAction API because your test projects are allowlisted).

At this moment WasmPlugin is intented to be used with LbTrafficExtension and LbRouteExtensions only.

Copy link
Member

Choose a reason for hiding this comment

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

I can't image how NetworkServicesEdgeCache tests may be impacted

Those tests are unchanged, but Magic Modules only supports a single base URL per version (beta or GA) and this PR changes the base URL for the beta version from /v1/ to /v1beta/.

@matheusaleixo-cit after discussing this with the rest of the team the solution is to move this new resource to a new product (say, networkservicesplugins). That should be a quick change:

  • Create the new mmv1/products/networkservicesplugins directory
  • Move WasmPlugin.yaml to it
  • Copy mmv1/products/networkservices/product.yaml to it, with the beta base url set to /v1beta
  • Revert the change to mmv1/products/networkservices/product.yaml

- Changed mainVersionId type to String;
@github-actions github-actions bot requested a review from SirGitsalot November 12, 2024 22:09
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 12, 2024
Copy link

@SirGitsalot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Member

@SirGitsalot SirGitsalot left a comment

Choose a reason for hiding this comment

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

Making GitHub happy here since with my last comment I didn't click the "request changes" button

@github-actions github-actions bot requested a review from SirGitsalot November 22, 2024 13:51
@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 22, 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 ( 10 files changed, 673 insertions(+))
google-beta provider: Diff ( 13 files changed, 1822 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 228 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4319
Passed tests: 3862
Skipped tests: 411
Affected tests: 46

Click here to see the affected service packages

All service packages are affected

#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginBasicExample
  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginConfigUpdate
  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginLogConfigUpdate
  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginVersionUpdate

Action taken

Found 46 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccCloudRunV2Service_cloudrunv2ServiceMeshExample
  • TestAccCloudRunV2Service_cloudrunv2ServiceMeshUpdate
  • TestAccComputeServiceAttachment_serviceAttachmentBasicExampleGateway
  • TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyBasicExample
  • TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyEmptyMatchExample
  • TestAccNetworkServicesEndpointPolicy_update
  • TestAccNetworkServicesGateway_minimalSwp
  • TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentNetwork
  • TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentSubnetwork
  • TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample
  • TestAccNetworkServicesGateway_networkServicesGatewayBasicExample
  • TestAccNetworkServicesGateway_networkServicesGatewayMultipleSwpSameNetworkExample
  • TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyExample
  • TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyWithoutAddresses
  • TestAccNetworkServicesGateway_swpAsNextHop
  • TestAccNetworkServicesGateway_swpUpdate
  • TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteActionsExample
  • TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteBasicExample
  • TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteMatchesAndActionsExample
  • TestAccNetworkServicesGrpcRoute_update
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteActionsExample
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteBasicExample
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMatchesAndActionsExample
  • TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMeshBasicExample
  • TestAccNetworkServicesHttpRoute_update
  • TestAccNetworkServicesLBPolicies_update
  • TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample
  • TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample
  • TestAccNetworkServicesLbTrafficExtension_update
  • TestAccNetworkServicesMesh_networkServicesMeshBasicExample
  • TestAccNetworkServicesMesh_networkServicesMeshNoPortExample
  • TestAccNetworkServicesMesh_update
  • TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample
  • TestAccNetworkServicesServiceBinding_update
  • TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesAdvancedExample
  • TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesBasicExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteActionsExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteBasicExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteGatewayBasicExample
  • TestAccNetworkServicesTcpRoute_networkServicesTcpRouteMeshBasicExample
  • TestAccNetworkServicesTcpRoute_update
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteBasicExample
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteMeshBasicExample
  • TestAccNetworkServicesTlsRoute_update
  • TestAccParallelstoreInstance_parallelstoreInstanceBasicExample
  • TestAccSecureSourceManagerInstance_secureSourceManagerInstancePrivatePscBackendExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccCloudRunV2Service_cloudrunv2ServiceMeshExample [Debug log]
TestAccCloudRunV2Service_cloudrunv2ServiceMeshUpdate [Debug log]
TestAccComputeServiceAttachment_serviceAttachmentBasicExampleGateway [Debug log]
TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyBasicExample [Debug log]
TestAccNetworkServicesEndpointPolicy_networkServicesEndpointPolicyEmptyMatchExample [Debug log]
TestAccNetworkServicesEndpointPolicy_update [Debug log]
TestAccNetworkServicesGateway_minimalSwp [Debug log]
TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentNetwork [Debug log]
TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentSubnetwork [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayBasicExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayMultipleSwpSameNetworkExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyWithoutAddresses [Debug log]
TestAccNetworkServicesGateway_swpAsNextHop [Debug log]
TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteActionsExample [Debug log]
TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteBasicExample [Debug log]
TestAccNetworkServicesGrpcRoute_networkServicesGrpcRouteMatchesAndActionsExample [Debug log]
TestAccNetworkServicesGrpcRoute_update [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteActionsExample [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteBasicExample [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMatchesAndActionsExample [Debug log]
TestAccNetworkServicesHttpRoute_networkServicesHttpRouteMeshBasicExample [Debug log]
TestAccNetworkServicesHttpRoute_update [Debug log]
TestAccNetworkServicesLBPolicies_update [Debug log]
TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample [Debug log]
TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample [Debug log]
TestAccNetworkServicesLbTrafficExtension_update [Debug log]
TestAccNetworkServicesMesh_networkServicesMeshBasicExample [Debug log]
TestAccNetworkServicesMesh_networkServicesMeshNoPortExample [Debug log]
TestAccNetworkServicesMesh_update [Debug log]
TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample [Debug log]
TestAccNetworkServicesServiceBinding_update [Debug log]
TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesAdvancedExample [Debug log]
TestAccNetworkServicesServiceLbPolicies_networkServicesServiceLbPoliciesBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteActionsExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteGatewayBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_networkServicesTcpRouteMeshBasicExample [Debug log]
TestAccNetworkServicesTcpRoute_update [Debug log]
TestAccNetworkServicesTlsRoute_networkServicesTlsRouteBasicExample [Debug log]
TestAccNetworkServicesTlsRoute_networkServicesTlsRouteMeshBasicExample [Debug log]
TestAccNetworkServicesTlsRoute_update [Debug log]
TestAccParallelstoreInstance_parallelstoreInstanceBasicExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccNetworkServicesGateway_swpUpdate [Error message] [Debug log]
TestAccSecureSourceManagerInstance_secureSourceManagerInstancePrivatePscBackendExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 25, 2024
Copy link
Member

@SirGitsalot SirGitsalot left a comment

Choose a reason for hiding this comment

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

Looks good, just waiting on the test run to finish successfully now.

@krz-filip PTAL

Choose a reason for hiding this comment

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

I see that all tests defines the single version configuration. Could you please extend at least one of them to define at least 2 versions? The perfect would updating "update" test to modify WasmPlugin from having v1(main)+v2 versions into v2(main)+v3?

Choose a reason for hiding this comment

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

WasmPlugin is in Public Preview phase (beta), should reach GA in Q1 2025.
Is it valid to add it here?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the answer is no, as the only product that I can find that exists in beta but not in ga is firebasestorage and it does not have an entry in the ga file.

@@ -546,6 +546,11 @@ var ServicesListGa = mapOf(
"displayName" to "Networkservices",
"path" to "./google/services/networkservices"
),
"networkservicesplugins" to mapOf(

Choose a reason for hiding this comment

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

Is this "networkservicesplugins" value customer visible?
Can it be safely changed in the future?

Copy link
Member

Choose a reason for hiding this comment

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

It is customer visible, the name of the resource will be google_network_services_plugins_wasm_plugin (instead of google_network_services_wasm_plugin) and the documentation for the resource will land in a section called "Network Services Plugins" (though I think the docs section might be changeable so that it lands in the main "Network Services" section instead).

It can't be changed later, but I'm not at all stuck on the name - I suggested "Network Services Plugins" as it needed a new name and that seemed like a fitting description. If there's a better name, let's change it here.

Choose a reason for hiding this comment

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

Thanks, I need to discuss it with the product owner (next week). I suppose that he would prefer something like "service_extensions" instead of "network_services_plugins".
AFAIK the main reason of moving it to the new product were failing tests for other network_services resources.
Do you think that there is a chance to make them passing? What should change on networkservices API?

@github-actions github-actions bot requested a review from SirGitsalot November 26, 2024 21:37
@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 26, 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 ( 10 files changed, 723 insertions(+))
google-beta provider: Diff ( 13 files changed, 1872 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 228 insertions(+))

Copy link
Member

@SirGitsalot SirGitsalot left a comment

Choose a reason for hiding this comment

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

Kicked off a new test run with the latest changes

@@ -546,6 +546,11 @@ var ServicesListGa = mapOf(
"displayName" to "Networkservices",
"path" to "./google/services/networkservices"
),
"networkservicesplugins" to mapOf(
Copy link
Member

Choose a reason for hiding this comment

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

It is customer visible, the name of the resource will be google_network_services_plugins_wasm_plugin (instead of google_network_services_wasm_plugin) and the documentation for the resource will land in a section called "Network Services Plugins" (though I think the docs section might be changeable so that it lands in the main "Network Services" section instead).

It can't be changed later, but I'm not at all stuck on the name - I suggested "Network Services Plugins" as it needed a new name and that seemed like a fitting description. If there's a better name, let's change it here.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the answer is no, as the only product that I can find that exists in beta but not in ga is firebasestorage and it does not have an entry in the ga file.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4326
Passed tests: 3904
Skipped tests: 411
Affected tests: 11

Click here to see the affected service packages

All service packages are affected

#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginBasicExample
  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginConfigUpdate
  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginLogConfigUpdate
  • TestAccNetworkServicesPluginsWasmPlugin_wasmPluginVersionUpdate

Action taken

Found 11 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeDeveloper_apigeeDeveloperUpdateTest
  • TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy
  • TestAccNetworkServicesGateway_swpUpdate
  • TestAccOracleDatabaseAutonomousDatabase_basic
  • TestAccOracleDatabaseAutonomousDatabases_basic
  • TestAccOracleDatabaseCloudExadataInfrastructure_basic
  • TestAccOracleDatabaseCloudExadataInfrastructures_basic
  • TestAccOracleDatabaseCloudVmCluster_basic
  • TestAccOracleDatabaseDbNodes_basic
  • TestAccOracleDatabaseDbServers_basic
  • TestAccSecureSourceManagerInstance_secureSourceManagerInstancePrivatePscBackendExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeDeveloper_apigeeDeveloperUpdateTest [Debug log]
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy [Debug log]
TestAccNetworkServicesGateway_swpUpdate [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccOracleDatabaseAutonomousDatabase_basic [Error message] [Debug log]
TestAccOracleDatabaseAutonomousDatabases_basic [Error message] [Debug log]
TestAccOracleDatabaseCloudExadataInfrastructure_basic [Error message] [Debug log]
TestAccOracleDatabaseCloudExadataInfrastructures_basic [Error message] [Debug log]
TestAccOracleDatabaseCloudVmCluster_basic [Error message] [Debug log]
TestAccOracleDatabaseDbNodes_basic [Error message] [Debug log]
TestAccOracleDatabaseDbServers_basic [Error message] [Debug log]
TestAccSecureSourceManagerInstance_secureSourceManagerInstancePrivatePscBackendExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

@matheusaleixo-cit, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days.

Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

This notification can be disabled with the disable-automatic-closure label.

@github-actions github-actions bot requested a review from SirGitsalot December 10, 2024 16:38
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Dec 10, 2024
@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Dec 12, 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 ( 9 files changed, 718 insertions(+))
google-beta provider: Diff ( 13 files changed, 1872 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 228 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4357
Passed tests: 3934
Skipped tests: 419
Affected tests: 4

Click here to see the affected service packages

All service packages are affected

#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccServiceExtensionsWasmPlugin_wasmPluginBasicExample
  • TestAccServiceExtensionsWasmPlugin_wasmPluginConfigUpdate
  • TestAccServiceExtensionsWasmPlugin_wasmPluginLogConfigUpdate
  • TestAccServiceExtensionsWasmPlugin_wasmPluginVersionUpdate

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeDeveloper_apigeeDeveloperUpdateTest
  • TestAccDataSourceGoogleQuotaInfo_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccSecureSourceManagerInstance_secureSourceManagerInstancePrivatePscBackendExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeDeveloper_apigeeDeveloperUpdateTest [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccDataSourceGoogleQuotaInfo_basic [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [Error message] [Debug log]
TestAccSecureSourceManagerInstance_secureSourceManagerInstancePrivatePscBackendExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

@SirGitsalot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Member

@SirGitsalot SirGitsalot left a comment

Choose a reason for hiding this comment

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

Looks good, just one final question to enable the tests - @krz-filip do you know if any of the examples available in a publicly accessible registry? Some of TPG's other resource tests rely on Docker containers, but we're able to use the service's own example containers in our tests (like Cloud Run has us-docker.pkg.dev/cloudrun/container/hello)

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.

Add new resource Network Services WASM Plugins
4 participants