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): TestAccKMSKeyHandle_kmsKeyHandleBasicExample #18934

Open
SarahFrench opened this issue Jul 31, 2024 · 8 comments
Open

Failing test(s): TestAccKMSKeyHandle_kmsKeyHandleBasicExample #18934

SarahFrench opened this issue Jul 31, 2024 · 8 comments

Comments

@SarahFrench
Copy link
Member

SarahFrench commented Jul 31, 2024

Impacted tests

  • TestAccKMSKeyHandle_kmsKeyHandleBasicExample

Affected Resource(s)

  • google_kms_key_handle

Failure rates

  • 100% since 2024-07-14

Message(s)

------- Stdout: -------
=== RUN   TestAccKMSKeyHandle_kmsKeyHandleBasicExample
=== PAUSE TestAccKMSKeyHandle_kmsKeyHandleBasicExample
=== CONT  TestAccKMSKeyHandle_kmsKeyHandleBasicExample
    vcr_utils.go:152: Step 1/2 error: Error running apply: exit status 1
        Error: Error creating folder 'folder-example' in 'organizations/1234567890': Error waiting for creating folder: Error code 9, message: Folder reservation failed for parent [organizations/1234567890], folder [] due to constraint: The folder operation violates display name uniqueness within the parent.
          with google_folder.autokms_folder,
          on terraform_plugin_test.tf line 5, in resource "google_folder" "autokms_folder":
           5: resource "google_folder" "autokms_folder" {
--- FAIL: TestAccKMSKeyHandle_kmsKeyHandleBasicExample (18.78s)
FAIL

Nightly build test history

b/357622084

@SarahFrench
Copy link
Member Author

https://github.com/GoogleCloudPlatform/magic-modules/blob/d690063bc59b8d3d3bf2699eb36d179f06b1d6a6/mmv1/templates/terraform/examples/kms_key_handle_basic.tf.erb needs to be updated so that the names of the resources as sweepable (start tf-test-) and are unique per test run

@melinath
Copy link
Collaborator

melinath commented Aug 5, 2024

https://googlecloudplatform.github.io/magic-modules/develop/test/test/ has more detailed information about how to make test resources sweepable

@melinath melinath added size/xs and removed forward/review In review; remove label to forward labels Aug 5, 2024
@melinath melinath added this to the Goals milestone Aug 5, 2024
@melinath melinath added test-failure-100 100% fail rate and removed test-failure-50 50%+ fail rate labels Aug 9, 2024
@melinath
Copy link
Collaborator

melinath commented Aug 9, 2024

bumping to test-failure-100 since this is now failing consistently. Note that it was previously flakey with the message:

vcr_utils.go:152: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        Terraform will perform the following actions:
          # google_kms_autokey_config.autokey_config will be updated in-place
          ~ resource "google_kms_autokey_config" "autokey_config" {
                id          = "folders/1036212419933/autokeyConfig"
              + key_project = "projects/tf-test-key-projptxk6togg0"
                # (1 unchanged attribute hidden)
            }

@melinath
Copy link
Collaborator

Corrected labels & description since this is a test for a KMS resource, not a CRM resource.

@tdbhacks
Copy link

I'm addressing some of this in GoogleCloudPlatform/magic-modules#11693, but keeping the discussion in #18935.

@melinath
Copy link
Collaborator

The The folder operation violates display name uniqueness within the parent. error is no longer happening as of Oct. 4 - we're now back to the key_project error, which seems to be causing consistent failures as well.

@tdbhacks
Copy link

Good, at least GoogleCloudPlatform/magic-modules#11905 appears to be working and we're back to the known issue: #18935

@tdbhacks
Copy link

#18935 is closed and we've confirmed that test is passing. Sending a PR to turn this test back on

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

No branches or pull requests

4 participants