Skip to content

dataprocmetastore: fix TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample - #18828

Draft
SirGitsalot wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
SirGitsalot:fix-dataprocmetastore-service-psc-example
Draft

dataprocmetastore: fix TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample#18828
SirGitsalot wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
SirGitsalot:fix-dataprocmetastore-service-psc-example

Conversation

@SirGitsalot

@SirGitsalot SirGitsalot commented Aug 28, 2026

Copy link
Copy Markdown
Member

Fixes nightly acceptance test failure for TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample.

Root Cause & Fix

When a google_dataproc_metastore_service is configured with network_config.consumers.subnetwork to use Private Service Connect, an IP address (metastore-addr-*) is implicitly created within the subnetwork. When Terraform destroys the resources during post-test cleanup, it deletes the Dataproc Metastore Service first and then immediately attempts to delete the subnetwork. However, the background PSC IP address cleanup occurs asynchronously on the GCP backend (typically taking ~5-6 minutes)—resulting in a 400 resourceInUseByAnotherResource error during subnetwork teardown.

This change:

  • Adds a time_sleep resource with a 10-minute destroy_duration between the subnetwork and the Dataproc Metastore Service in both dataproc_metastore_service_private_service_connect.tf.tmpl and dataproc_metastore_service_private_service_connect_custom_routes.tf.tmpl. This delays subnetwork deletion by 10 minutes after the Metastore Service is destroyed, giving the GCP backend sufficient time to release the PSC address and ensuring clean teardown.
  • Adds external_providers: [time] to both sample definitions in mmv1/products/metastore/Service.yaml so that the generated acceptance test registers the hashicorp/time provider factory.

@modular-magician

modular-magician commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 24 insertions(+)
google-beta provider View Diff 2 files changed, 24 insertions(+)
Open in Cloud Shell View Diff 1 file changed, 8 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
37 34 2 1
Affected Service Packages
  • dataprocmetastore

Learn how VCR tests work


Step 1: Replaying Mode

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

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. 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.

@SirGitsalot VCR tests complete for 846382e!

@modular-magician

modular-magician commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 28 insertions(+), 1 deletion(-)
google-beta provider View Diff 2 files changed, 28 insertions(+), 1 deletion(-)
Open in Cloud Shell View Diff 1 file changed, 8 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
37 34 2 1
Affected Service Packages
  • dataprocmetastore

Learn how VCR tests work


Step 1: Replaying Mode

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

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. 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.

@SirGitsalot VCR tests complete for 9ccc94b!

@modular-magician

modular-magician commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 34 insertions(+), 1 deletion(-)
google-beta provider View Diff 2 files changed, 34 insertions(+), 1 deletion(-)
Open in Cloud Shell View Diff 1 file changed, 10 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
37 34 2 1
Affected Service Packages
  • dataprocmetastore

Learn how VCR tests work


Step 1: Replaying Mode

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

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. 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.

@SirGitsalot VCR tests complete for a153464!

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