Skip to content

networkservices: add deferred list resources - #18866

Open
BBBmau wants to merge 7 commits into
GoogleCloudPlatform:mainfrom
BBBmau:add-networkservices-list-resources-followup
Open

networkservices: add deferred list resources#18866
BBBmau wants to merge 7 commits into
GoogleCloudPlatform:mainfrom
BBBmau:add-networkservices-list-resources-followup

Conversation

@BBBmau

@BBBmau BBBmau commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Adds list-resource generation for the following networkservices resources:

  • google_network_services_agent_gateway
  • google_network_services_edge_cache_keyset
  • google_network_services_edge_cache_origin
  • google_network_services_edge_cache_service
  • google_network_services_endpoint_policy
  • google_network_services_gateway
  • google_network_services_grpc_route
  • google_network_services_http_route
  • google_network_services_lb_route_extension
  • google_network_services_lb_traffic_extension
  • google_network_services_mesh
  • google_network_services_service_lb_policies
  • google_network_services_tcp_route
  • google_network_services_tls_route

Per-resource investigation (Pattern P-17)

All 14 resources were initially deferred with Pattern P-17 (scope mismatch). Each resource was individually investigated below.

Group 1: base_url hardcodes /locations/global/ — no scope mismatch possible

The following resources hardcode global in base_url, so the list query always targets global regardless of the test environment region. No P-17 fix required.

Resource base_url Fix applied
EdgeCacheKeyset projects/{{project}}/locations/global/edgeCacheKeysets None needed
EdgeCacheOrigin projects/{{project}}/locations/global/edgeCacheOrigins None needed
EdgeCacheService projects/{{project}}/locations/global/edgeCacheServices None needed
EndpointPolicy projects/{{project}}/locations/global/endpointPolicies None needed
HttpRoute projects/{{project}}/locations/global/httpRoutes None needed
TcpRoute projects/{{project}}/locations/global/tcpRoutes None needed

Group 2: base_url was {{location}} but fixed to hardcode global — samples updated

These resources have location as a url_param_only field defaulting to global. The base_url was updated from locations/{{location}} to locations/global so the list query always targets the global collection. Sample configs were updated to pass location: 'global' in vars.

Resource Root cause Fix
GrpcRoute base_url used {{location}} which resolves to env region at test time; resource default is global Changed base_url to hardcode global; added vars: location: 'global' to basic sample
Mesh Same as GrpcRoute Changed base_url to hardcode global; added vars: location: 'global' to basic sample

Group 3: base_url uses {{location}}vars/test_vars_overrides added to align scope

These resources use {{location}} in base_url. The P-17 fix was to add vars: location: 'global' and test_vars_overrides: location: envvar.GetTestRegionFromEnv() to the sample so both resource creation and list query use the same region.

Resource Root cause Fix
Gateway location defaults to global but auto-injection used env region Added vars: location: 'global' + test_vars_overrides: location: envvar.GetTestRegionFromEnv() to basic sample; updated template to use {{index $.Vars "location"}}
TlsRoute location defaults to global but auto-injection used env region Same fix as Gateway
ServiceLbPolicies location is required No template change needed

Group 4: base_url uses {{location}} with regional resources — image fix

Resource Root cause Fix
LbRouteExtension Test VM image debian-11 is deprecated, causing creation failure before list query runs Updated VM image from debian-cloud/debian-11 to debian-cloud/debian-12 in both sample templates
LbTrafficExtension Same as LbRouteExtension Same fix

Group 5: base_url uses {{location}}listScope.Capture self-corrects scope

Resource Root cause Fix
AgentGateway base_url uses {{location}}; the generated test uses listScope.Capture to read the actual resource location after creation, then passes it to list query via ConfigVariables. No P-17 mismatch occurs. The generate_list_resource: true flag was accidentally removed in the previous commit when adding a reference to a non-existent decoder file. Restored generate_list_resource: true. Moved client_to_agent sample first. Removed stale decoder reference (name has ignore_read: true so no decoder is needed).

Release notes

`google_network_services_agent_gateway`
`google_network_services_edge_cache_keyset`
`google_network_services_edge_cache_origin`
`google_network_services_edge_cache_service`
`google_network_services_endpoint_policy`
`google_network_services_gateway`
`google_network_services_grpc_route`
`google_network_services_http_route`
`google_network_services_lb_route_extension`
`google_network_services_lb_traffic_extension`
`google_network_services_mesh`
`google_network_services_service_lb_policies`
`google_network_services_tcp_route`
`google_network_services_tls_route`

@google-cla

google-cla Bot commented Sep 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@modular-magician

modular-magician commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 23a8b8d:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 42 files changed, 4516 insertions(+), 6 deletions(-)
google-beta provider View Diff 44 files changed, 4809 insertions(+), 6 deletions(-)
terraform-google-conversion View Diff 1 file changed, 15 insertions(+), 6 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
6993 6257 698 38
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 38 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeInstanceFromMachineImage_diffProject
  • TestAccComputeSecurityPolicy_withPreconfiguredWafConfig
  • TestAccContainerCluster_autopilot_privileged_admission
  • TestAccContainerCluster_dataplaneOptimizationMode
  • TestAccContainerNodePool_withSoleTenantConfig
  • TestAccDataSourceGoogleStorageControlOrganizationIntelligenceFindingsSummary_empty
  • TestAccDataformConfig_update
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccFirebaseAILogicConfig_firebaseailogicConfigFullExample
  • TestAccFirebaseAILogicConfig_firebaseailogicConfigUpdate
  • TestAccFirebaseAndroidApp_firebaseAndroidAppCustomApiKeyExample
  • TestAccFirebaseAndroidApp_update
  • TestAccFirebaseAppleApp_firebaseAppleAppFullExample
  • TestAccFirebaseAppleApp_update
  • TestAccFirebaseWebApp_firebaseWebAppCustomApiKeyExample
  • TestAccFirebaseWebApp_firebaseWebAppFull
  • TestAccNetworkServicesAgentGatewayListQuery_generated
  • TestAccNetworkServicesEdgeCacheKeysetListQuery_generated
  • TestAccNetworkServicesEdgeCacheOriginListQuery_generated
  • TestAccNetworkServicesEdgeCacheServiceListQuery_generated
  • TestAccNetworkServicesEndpointPolicyListQuery_generated
  • TestAccNetworkServicesGatewayListQuery_generated
  • TestAccNetworkServicesGrpcRouteListQuery_generated
  • TestAccNetworkServicesHttpRouteListQuery_generated
  • TestAccNetworkServicesLbRouteExtensionListQuery_generated
  • TestAccNetworkServicesLbTrafficExtensionListQuery_generated
  • TestAccNetworkServicesMeshListQuery_generated
  • TestAccNetworkServicesServiceLbPoliciesListQuery_generated
  • TestAccNetworkServicesTcpRouteListQuery_generated
  • TestAccNetworkServicesTlsRouteListQuery_generated
  • TestAccProjectIamMemberRemove_memberInMultipleBindings
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample
  • TestAccStorageFtpUser_forceNewOnUserIdChange
  • TestAccStorageFtpUser_storageFtpUserBasicExample
  • TestAccStorageFtpUser_updateMappingsAndCredentials
  • TestAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_featureRegistry_updated
  • TestAccVertexAISemanticGovernancePolicyEngine_basic

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccFirebaseAILogicConfig_firebaseailogicConfigFullExample
✅ Log TestAccFirebaseAILogicConfig_firebaseailogicConfigUpdate
✅ Log TestAccFirebaseAndroidApp_firebaseAndroidAppCustomApiKeyExample
✅ Log TestAccFirebaseAndroidApp_update
✅ Log TestAccFirebaseAppleApp_firebaseAppleAppFullExample
✅ Log TestAccFirebaseAppleApp_update
✅ Log TestAccFirebaseWebApp_firebaseWebAppCustomApiKeyExample
✅ Log TestAccFirebaseWebApp_firebaseWebAppFull
✅ Log TestAccNetworkServicesEdgeCacheKeysetListQuery_generated
✅ Log TestAccNetworkServicesEdgeCacheOriginListQuery_generated
✅ Log TestAccNetworkServicesEdgeCacheServiceListQuery_generated
✅ Log TestAccNetworkServicesEndpointPolicyListQuery_generated
✅ Log TestAccNetworkServicesHttpRouteListQuery_generated
✅ Log TestAccNetworkServicesServiceLbPoliciesListQuery_generated
✅ Log TestAccNetworkServicesTcpRouteListQuery_generated
✅ Log TestAccProjectIamMemberRemove_memberInMultipleBindings
✅ Log TestAccStorageFtpUser_forceNewOnUserIdChange
✅ Log TestAccStorageFtpUser_storageFtpUserBasicExample
✅ Log TestAccStorageFtpUser_updateMappingsAndCredentials
✅ Log ❌ Error · Log TestAccDataformConfig_update
❌ Error · Log - TestAccComputeInstanceFromMachineImage_diffProject
❌ Error · Log - TestAccComputeSecurityPolicy_withPreconfiguredWafConfig
❌ Error · Log - TestAccContainerCluster_autopilot_privileged_admission
❌ Error · Log - TestAccContainerCluster_dataplaneOptimizationMode
❌ Error · Log - TestAccContainerNodePool_withSoleTenantConfig
❌ Error · Log - TestAccDataSourceGoogleStorageControlOrganizationIntelligenceFindingsSummary_empty
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
❌ Error · Log - TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
❌ Error · Log - TestAccNetworkServicesAgentGatewayListQuery_generated
❌ Error · Log - TestAccNetworkServicesGatewayListQuery_generated
❌ Error · Log - TestAccNetworkServicesGrpcRouteListQuery_generated
❌ Error · Log - TestAccNetworkServicesLbRouteExtensionListQuery_generated
❌ Error · Log - TestAccNetworkServicesLbTrafficExtensionListQuery_generated
❌ Error · Log - TestAccNetworkServicesMeshListQuery_generated
❌ Error · Log - TestAccNetworkServicesTlsRouteListQuery_generated
❌ Error · Log - TestAccPubsubSubscription_pubsubSubscriptionTagsExample
❌ Error · Log - TestAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_featureRegistry_updated
❌ Error · Log - TestAccVertexAISemanticGovernancePolicyEngine_basic

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@BBBmau VCR tests complete for 23a8b8d!

@BBBmau

BBBmau commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

/gcbrun

@modular-magician

modular-magician commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 23a8b8d:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 42 files changed, 4529 insertions(+), 6 deletions(-)
google-beta provider View Diff 44 files changed, 4823 insertions(+), 6 deletions(-)
terraform-google-conversion View Diff 1 file changed, 15 insertions(+), 6 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
6995 6272 698 25
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 25 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeBackendService_backendServiceInFlightExample
  • TestAccComputeInstanceFromMachineImage_diffProject
  • TestAccComputeInstanceTemplate_gracefulShutdown
  • TestAccComputeInstance_GracefulShutdownWithResetUpdate
  • TestAccComputeInstance_GracefulShutdownWithoutResetUpdate
  • TestAccComputeRegionInstanceTemplate_gracefulShutdown
  • TestAccComputeSecurityPolicy_withPreconfiguredWafConfig
  • TestAccComputeTargetInstance_withSecurityPolicy
  • TestAccContainerCluster_autopilot_privileged_admission
  • TestAccContainerCluster_dataplaneOptimizationMode
  • TestAccContainerNodePool_withSoleTenantConfig
  • TestAccDataSourceGoogleStorageControlOrganizationIntelligenceFindingsSummary_empty
  • TestAccDataformConfig_update
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccNetworkServicesAgentGatewayListQuery_generated
  • TestAccNetworkServicesGatewayListQuery_generated
  • TestAccNetworkServicesGrpcRouteListQuery_generated
  • TestAccNetworkServicesLbRouteExtensionListQuery_generated
  • TestAccNetworkServicesLbTrafficExtensionListQuery_generated
  • TestAccNetworkServicesMeshListQuery_generated
  • TestAccNetworkServicesTlsRouteListQuery_generated
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample
  • TestAccTpuV2Vm_update
  • TestAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_featureRegistry_updated

View the replaying VCR build log


Step 2: Recording Mode

Caution

Panic occurred during VCR tests

🔴 RECORDING mode: The provider crashed with a panic. Please check the build log for details.

Please fix the issue to complete your PR.

View the build log

@BBBmau VCR tests complete for 23a8b8d!

@modular-magician

modular-magician commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 9a326b5:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 51 files changed, 4541 insertions(+), 85 deletions(-)
google-beta provider View Diff 53 files changed, 4835 insertions(+), 85 deletions(-)
Open in Cloud Shell View Diff 2 files changed, 2 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
126 115 2 9
Affected Service Packages
  • networkservices

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 9 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccNetworkServicesAgentGatewayListQuery_generated
  • TestAccNetworkServicesGatewayListQuery_generated
  • TestAccNetworkServicesGateway_networkServicesGatewayBasicExample
  • TestAccNetworkServicesGrpcRouteListQuery_generated
  • TestAccNetworkServicesLbRouteExtensionListQuery_generated
  • TestAccNetworkServicesLbTrafficExtensionListQuery_generated
  • TestAccNetworkServicesMeshListQuery_generated
  • TestAccNetworkServicesTlsRouteListQuery_generated
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteBasicExample

View the replaying VCR build log


Step 2: Recording Mode

Caution

Panic occurred during VCR tests

🔴 RECORDING mode: The provider crashed with a panic. Please check the build log for details.

Please fix the issue to complete your PR.

View the build log

@BBBmau VCR tests complete for 9a326b5!

@BBBmau
BBBmau force-pushed the add-networkservices-list-resources-followup branch from 0237ba1 to 448a8d1 Compare September 4, 2026 22:37
@modular-magician

modular-magician commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 0237ba1:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 45 files changed, 4083 insertions(+), 2 deletions(-)
google-beta provider View Diff 47 files changed, 4377 insertions(+), 2 deletions(-)
Open in Cloud Shell View Diff 2 files changed, 2 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
125 118 2 5
Affected Service Packages
  • networkservices

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccNetworkServicesGateway_networkServicesGatewayBasicExample
  • TestAccNetworkServicesLbRouteExtensionListQuery_generated
  • TestAccNetworkServicesLbTrafficExtensionListQuery_generated
  • TestAccNetworkServicesTlsRouteListQuery_generated
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteBasicExample

View the replaying VCR build log


Step 2: Recording Mode

Caution

Panic occurred during VCR tests

🔴 RECORDING mode: The provider crashed with a panic. Please check the build log for details.

Please fix the issue to complete your PR.

View the build log

@BBBmau VCR tests complete for 0237ba1!

BBBmau and others added 7 commits September 4, 2026 22:47
Empty tokens replayed the first page until the 6h TF_ACC timeout (VCR panic on PR 18701). Null tokens panicked on a string conversion.
…sources

Co-authored-by: Cursor <cursoragent@cursor.com>
Add generate_list_resource: true to 14 eligible networkservices resources:
- AgentGateway
- EdgeCacheKeyset
- EdgeCacheOrigin
- EdgeCacheService
- EndpointPolicy
- Gateway
- GrpcRoute
- HttpRoute
- LbRouteExtension
- LbTrafficExtension
- Mesh
- ServiceLbPolicies
- TcpRoute
- TlsRoute
- Gateway: add vars/test_vars_overrides for location and update
  sample template to include location field so test creates resource
  in provider test region matching list query scope
- TlsRoute: same fix as Gateway
- GrpcRoute: base_url already hardcodes global, no change needed
- Mesh: base_url already hardcodes global, no change needed
- LbRouteExtension: update vm_test image from debian-11 to debian-12
- LbTrafficExtension: update vm_test image from debian-11 to debian-12
- AgentGateway: move simpler client_to_agent sample first to avoid
  complex infrastructure setup timeout; add custom_code decoder
Restore generate_list_resource: true to AgentGateway.yaml which was
accidentally removed in the previous commit when adding the decoder
template reference. Also reorder samples to put the simpler
client_to_agent sample first so the generated list-query test uses the
lighter-weight configuration.

Root cause (P-17 investigation): AgentGateway has base_url with
{{location}} scope param. The generated test uses listScope.Capture to
read the actual resource location after creation and passes that to the
list query via ConfigVariables, so the list query always targets the
same location where the resource was created. No scope mismatch occurs.

The decoder template reference has been removed since name has
ignore_read: true which already suppresses read-time name drift.
@BBBmau
BBBmau force-pushed the add-networkservices-list-resources-followup branch from 448a8d1 to ba608f6 Compare September 4, 2026 22:50
@modular-magician

modular-magician commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit ba608f6:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 51 files changed, 4523 insertions(+), 85 deletions(-)
google-beta provider View Diff 53 files changed, 4817 insertions(+), 85 deletions(-)
terraform-google-conversion View Diff 1 file changed, 12 insertions(+)
Open in Cloud Shell View Diff 2 files changed, 2 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
6996 6273 698 25
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 25 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccCESApp_cesAppBasicExample
  • TestAccCESApp_update
  • TestAccComputeBackendService_backendServiceInFlightExample
  • TestAccComputeInstanceFromMachineImage_diffProject
  • TestAccComputeInstanceTemplate_gracefulShutdown
  • TestAccComputeInstance_GracefulShutdownWithResetUpdate
  • TestAccComputeInstance_GracefulShutdownWithoutResetUpdate
  • TestAccComputeRegionInstanceTemplate_gracefulShutdown
  • TestAccComputeSecurityPolicy_withPreconfiguredWafConfig
  • TestAccComputeTargetInstance_withSecurityPolicy
  • TestAccContainerCluster_autopilot_privileged_admission
  • TestAccContainerCluster_dataplaneOptimizationMode
  • TestAccContainerNodePool_withSoleTenantConfig
  • TestAccDataSourceGoogleStorageControlOrganizationIntelligenceFindingsSummary_empty
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccNetworkServicesAgentGatewayListQuery_generated
  • TestAccNetworkServicesLbRouteExtensionListQuery_generated
  • TestAccNetworkServicesLbTrafficExtensionListQuery_generated
  • TestAccNetworkServicesTlsRouteListQuery_generated
  • TestAccNetworkServicesTlsRoute_networkServicesTlsRouteBasicExample
  • TestAccObservabilityLink_observabilityLinkBasicExample
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample
  • TestAccTpuV2Vm_update
  • TestAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_featureRegistry_updated

View the replaying VCR build log


Step 2: Recording Mode

Caution

Panic occurred during VCR tests

🔴 RECORDING mode: The provider crashed with a panic. Please check the build log for details.

Please fix the issue to complete your PR.

View the build log

@BBBmau VCR tests complete for ba608f6!

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.

2 participants