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

Failing test(s): TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy #17838

Closed
shuyama1 opened this issue Apr 12, 2024 · 3 comments · Fixed by GoogleCloudPlatform/magic-modules#12408, hashicorp/terraform-provider-google-beta#8773 or #20462

Comments

@shuyama1
Copy link
Collaborator

shuyama1 commented Apr 12, 2024

Impacted tests

  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy

Affected Resource(s)

  • google_compute_instance

Failure rates

  • 100% since 2024-03-15 (previously failed due to a different which may potentially hide this error)

Message(s)

=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_one_policy
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config_update_policy_with_stopped_machine
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_remove_access_config
    vcr_utils.go:152: Step 3/4 error: Error running apply: exit status 1
        Error: Error deleting old access_config: googleapi: Error 400: Invalid value for field 'accessConfig': 'external-nat'. Cannot delete an access config with a security policy set. Please remove the security policy first., invalid
          with google_compute_instance.foobar,
          on terraform_plugin_test.tf line 119, in resource "google_compute_instance" "foobar":
         119: resource "google_compute_instance" "foobar" {
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_two_policies
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/access_config_update_access_config
    vcr_utils.go:152: Step 3/5 error: Error running apply: exit status 1
        Error: Error deleting old access_config: googleapi: Error 400: Invalid value for field 'accessConfig': 'external-nat'. Cannot delete an access config with a security policy set. Please remove the security policy first., invalid
          with google_compute_instance.foobar,
          on terraform_plugin_test.tf line 72, in resource "google_compute_instance" "foobar":
          72: resource "google_compute_instance" "foobar" {
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/wit_no_access_config
    vcr_utils.go:152: Step 1/1, expected an error with pattern, no match on: Error running apply: exit status 1
        Error: Error waiting to create Network: Error waiting for Creating Network: timeout while waiting for state to become 'DONE' (last state: 'RUNNING', timeout: 20m0s)
          with google_compute_network.net,
          on terraform_plugin_test.tf line 25, in resource "google_compute_network" "net":
          25: resource "google_compute_network" "net" {
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_access_config_with_empty_nil_security_policy
--- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy (3101.68s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_one_policy (272.92s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config_update_policy_with_stopped_machine (226.60s)
    --- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_remove_access_config (278.36s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_two_policies (377.24s)
    --- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/access_config_update_access_config (258.48s)
    --- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/wit_no_access_config (1243.39s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config (236.67s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_access_config_with_empty_nil_security_policy (208.02s)

Nightly build test history

b/336319407

@karolgorc
Copy link

karolgorc commented Jul 29, 2024

I don't have an environment with Cloud Armor to test this but it seems that the error message expected in the tests has changed.

Here is an example

https://github.com/hashicorp/terraform-provider-google-beta/blob/314f686b0e8bdd389b95f85e574b27b57a73f122/google-beta/services/compute/resource_compute_instance_test.go#L3459-L3475

@karolgorc
Copy link

PR got merged. This can be closed i think

@SarahFrench
Copy link
Member

I've seen this test failing on PRs lately, and it's been failing every night in the nightly tests since Nov 19th:

------- Stdout: -------
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config_update_policy_with_stopped_machine
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_remove_access_config
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_two_policies
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/access_config_update_access_config
    resource_compute_instance_test.go:3945: Step 5/5, expected an error with pattern, no match on: Error running apply: exit status 1
        Error: Error deleting old access_config: googleapi: Error 400: Invalid value for field 'accessConfig': 'external-nat'. Cannot delete an access config with a security policy set. Please remove the security policy first., invalid
          with google_compute_instance.foobar,
          on terraform_plugin_test.tf line 72, in resource "google_compute_instance" "foobar":
          72: resource "google_compute_instance" "foobar" {
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/wit_no_access_config
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_access_config_with_empty_nil_security_policy
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_one_policy
--- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy (1908.73s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment