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

Fix integrations tests to bootstrap clients and kms #13286

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

rohitjangid
Copy link
Contributor

@rohitjangid rohitjangid commented Mar 7, 2025

Fix integrations flaky tests

integrations: Fixes flaky tests by bootstrapping kms and integrations client

Fixes: hashicorp/terraform-provider-google#21245
Fixes: hashicorp/terraform-provider-google#21246
Fixes: hashicorp/terraform-provider-google#21511

Copy link

github-actions bot commented Mar 7, 2025

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

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

google provider: Diff ( 5 files changed, 71 insertions(+), 89 deletions(-))
google-beta provider: Diff ( 5 files changed, 71 insertions(+), 89 deletions(-))
Open in Cloud Shell: Diff ( 9 files changed, 13 insertions(+), 68 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4669
Passed tests: 4217
Skipped tests: 436
Affected tests: 16

Click here to see the affected service packages

All service packages are affected

Action taken

Found 16 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager
  • TestAccCloudbuildWorkerPool_basic
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigAuthTokenExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigClientCertificateOnlyExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigJwtExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2AuthorizationCodeExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2ClientCredentialsExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOidcTokenExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigServiceAccountExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigUsernameAndPasswordExample
  • TestAccSecretManagerSecretVersion_secretVersionBasicWriteOnlyExample
  • TestAccSecretManagerSecretVersion_secretVersionWithBase64StringSecretDataWriteOnlyExample
  • TestAccSqlUser_password_wo

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAccessContextManager [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccAccessContextManager [Error message] [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigAuthTokenExample [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigClientCertificateOnlyExample [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigJwtExample [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2AuthorizationCodeExample [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2ClientCredentialsExample [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOidcTokenExample [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigServiceAccountExample [Error message] [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigUsernameAndPasswordExample [Error message] [Debug log]
TestAccSecretManagerSecretVersion_secretVersionBasicWriteOnlyExample [Error message] [Debug log]
TestAccSecretManagerSecretVersion_secretVersionWithBase64StringSecretDataWriteOnlyExample [Error message] [Debug log]
TestAccSqlUser_password_wo [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
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Looks like the tests are failing due to permission errors on a service account. Do we need specific permissions to be able to bootstrap these keys?

@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, 114 insertions(+), 89 deletions(-))
google-beta provider: Diff ( 4 files changed, 114 insertions(+), 89 deletions(-))
Open in Cloud Shell: Diff ( 9 files changed, 13 insertions(+), 68 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages

All service packages are affected

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

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.

google provider: Diff ( 4 files changed, 108 insertions(+), 89 deletions(-))
google-beta provider: Diff ( 4 files changed, 108 insertions(+), 89 deletions(-))
Open in Cloud Shell: Diff ( 9 files changed, 13 insertions(+), 68 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages

All service packages are affected

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

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.

google provider: Diff ( 4 files changed, 107 insertions(+), 89 deletions(-))
google-beta provider: Diff ( 4 files changed, 107 insertions(+), 89 deletions(-))
Open in Cloud Shell: Diff ( 9 files changed, 13 insertions(+), 68 deletions(-))

@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, 120 insertions(+), 74 deletions(-))
google-beta provider: Diff ( 4 files changed, 120 insertions(+), 74 deletions(-))
Open in Cloud Shell: Diff ( 9 files changed, 19 insertions(+), 60 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4676
Passed tests: 4215
Skipped tests: 436
Affected tests: 25

Click here to see the affected service packages

All service packages are affected

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
  • TestAccAccessContextManager
  • TestAccCloudbuildWorkerPool_basic
  • TestAccComputeInstanceFromMachineImage_terminationTime
  • TestAccComputeInstanceFromTemplate_TerminationTime
  • TestAccComputeInstanceTemplate_instanceTerminationAction_terminationTime
  • TestAccComputeInstance_schedulingTerminationTime
  • TestAccComputeRegionInstanceTemplate_instanceTerminationAction_terminationTime
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccEventarcPipeline_eventarcPipelineWithOauthAndProtobufFormatExample
  • TestAccEventarcPipeline_eventarcPipelineWithOidcAndJsonFormatExample
  • TestAccEventarcPipeline_eventarcPipelineWithTopicDestinationExample
  • TestAccEventarcPipeline_eventarcPipelineWithWorkflowDestinationExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigAuthTokenExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigClientCertificateOnlyExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigJwtExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2AuthorizationCodeExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2ClientCredentialsExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOidcTokenExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigServiceAccountExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigUsernameAndPasswordExample
  • TestAccSecretManagerSecretVersion_secretVersionBasicWriteOnlyExample
  • TestAccSecretManagerSecretVersion_secretVersionWithBase64StringSecretDataWriteOnlyExample
  • TestAccSqlUser_password_wo

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeInstanceFromMachineImage_terminationTime [Debug log]
TestAccComputeInstanceFromTemplate_TerminationTime [Debug log]
TestAccComputeInstanceTemplate_instanceTerminationAction_terminationTime [Debug log]
TestAccComputeInstance_schedulingTerminationTime [Debug log]
TestAccComputeRegionInstanceTemplate_instanceTerminationAction_terminationTime [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccEventarcPipeline_eventarcPipelineWithOauthAndProtobufFormatExample [Debug log]
TestAccEventarcPipeline_eventarcPipelineWithOidcAndJsonFormatExample [Debug log]
TestAccEventarcPipeline_eventarcPipelineWithTopicDestinationExample [Debug log]
TestAccEventarcPipeline_eventarcPipelineWithWorkflowDestinationExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigAuthTokenExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigClientCertificateOnlyExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigJwtExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2AuthorizationCodeExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2ClientCredentialsExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOidcTokenExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigServiceAccountExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigUsernameAndPasswordExample [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccAccessContextManager [Error message] [Debug log]
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [Error message] [Debug log]
TestAccSecretManagerSecretVersion_secretVersionBasicWriteOnlyExample [Error message] [Debug log]
TestAccSecretManagerSecretVersion_secretVersionWithBase64StringSecretDataWriteOnlyExample [Error message] [Debug log]
TestAccSqlUser_password_wo [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
Copy link
Collaborator

Tests analytics

Total tests: 4676
Passed tests: 4219
Skipped tests: 436
Affected tests: 21

Click here to see the affected service packages

All service packages are affected

Action taken

Found 21 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager
  • TestAccCloudbuildWorkerPool_basic
  • TestAccComputeInstanceFromMachineImage_terminationTime
  • TestAccComputeInstanceFromTemplate_TerminationTime
  • TestAccComputeInstanceTemplate_instanceTerminationAction_terminationTime
  • TestAccComputeInstance_schedulingTerminationTime
  • TestAccComputeRegionInstanceTemplate_instanceTerminationAction_terminationTime
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigAuthTokenExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigClientCertificateOnlyExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigJwtExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2AuthorizationCodeExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2ClientCredentialsExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigOidcTokenExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigServiceAccountExample
  • TestAccIntegrationsAuthConfig_integrationsAuthConfigUsernameAndPasswordExample
  • TestAccSecretManagerSecretVersion_secretVersionBasicWriteOnlyExample
  • TestAccSecretManagerSecretVersion_secretVersionWithBase64StringSecretDataWriteOnlyExample
  • TestAccSqlUser_password_wo

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAccessContextManager [Debug log]
TestAccComputeInstanceFromMachineImage_terminationTime [Debug log]
TestAccComputeInstanceFromTemplate_TerminationTime [Debug log]
TestAccComputeInstanceTemplate_instanceTerminationAction_terminationTime [Debug log]
TestAccComputeInstance_schedulingTerminationTime [Debug log]
TestAccComputeRegionInstanceTemplate_instanceTerminationAction_terminationTime [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigAuthTokenExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigClientCertificateOnlyExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigJwtExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2AuthorizationCodeExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOauth2ClientCredentialsExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigOidcTokenExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigServiceAccountExample [Debug log]
TestAccIntegrationsAuthConfig_integrationsAuthConfigUsernameAndPasswordExample [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccAccessContextManager [Error message] [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [Error message] [Debug log]
TestAccSecretManagerSecretVersion_secretVersionBasicWriteOnlyExample [Error message] [Debug log]
TestAccSecretManagerSecretVersion_secretVersionWithBase64StringSecretDataWriteOnlyExample [Error message] [Debug log]
TestAccSqlUser_password_wo [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

@rohitjangid
Copy link
Contributor Author

@slevenick Can you help me understand why other tests are failing? They should not have been impacted by my change. Also I am not sure what is failing in VCR test.

@slevenick
Copy link
Contributor

Failing tests are unrelated

@slevenick slevenick added this pull request to the merge queue Mar 11, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 0b4149b Mar 11, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment