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): TestAccDataLossPreventionDiscoveryConfig_Update #21244

Closed

Comments

@shuyama1
Copy link
Collaborator

shuyama1 commented Feb 5, 2025

Impacted tests

TestAccDataLossPreventionDiscoveryConfig_Update

Affected Resource(s)

google_data_loss_prevention_discovery_config

Failure rates

  • GA: 0%
  • Beta: 100%

Message(s)

=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/gcs
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/actions
    resource_data_loss_prevention_discovery_config_test.go:118: Step 3/6 error: Error running apply: exit status 1
        
        Error: Error waiting to create TagKey: Error waiting for Creating TagKey: Error code 6, message: <eye3 title='ALREADY_EXISTS'/> generic::ALREADY_EXISTS: A TagKey with short name 'environment' already exists under parent 'projects/653407317329'
        
          with google_tags_tag_key.tag_key,
          on terraform_plugin_test.tf line 6, in resource "google_tags_tag_key" "tag_key":
           6: resource "google_tags_tag_key" "tag_key" {
        
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/conditions
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/cloud_sql
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/bq_single
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/secrets
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/basic
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/org
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/filter
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/sql_single
=== RUN   TestAccDataLossPreventionDiscoveryConfig_Update/gcs_single
--- FAIL: TestAccDataLossPreventionDiscoveryConfig_Update (1142.19s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/gcs (36.51s)
    --- FAIL: TestAccDataLossPreventionDiscoveryConfig_Update/actions (42.74s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/conditions (34.58s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/cloud_sql (34.69s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/bq_single (38.59s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/secrets (32.80s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/basic (30.02s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/org (20.39s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/filter (22.36s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/sql_single (812.94s)
    --- PASS: TestAccDataLossPreventionDiscoveryConfig_Update/gcs_single (36.57s)
FAIL

Test Debug Log

b/394920107

@github-actions github-actions bot added forward/review In review; remove label to forward service/dlp labels Feb 5, 2025
@melinath melinath added this to the Feb 2025 Test Burndown milestone Feb 5, 2025
@c2thorn c2thorn self-assigned this Feb 6, 2025
@shuyama1 shuyama1 removed the forward/review In review; remove label to forward label Feb 6, 2025
@patrickmoy
Copy link

patrickmoy commented Feb 6, 2025

This update test attempts to create a DiscoveryConfig resource and then add a certain Action to it that uses tags.

Since our backend (DLP) validates for real tags, I wrote this test originally to create a tag KV pair to use, but it looks like sometimes the key doesn't get deleted properly on cleanup.

A few thoughts on solutions, but I'm not sure which is ideal here.

  1. Write a custom sweeper to clean up the tag at the end of the test
  2. Suffix the tag key/values with a random number so that they don't clash if clean up fails
  3. Skip this validation in our backend, and then don't create real tags for this test

@c2thorn
Copy link
Collaborator

c2thorn commented Feb 7, 2025

  1. Suffix the tag key/values with a random number so that they don't clash if clean up fails

@patrickmoy I have a PR for this, and ended up going with this approach. Should be fixed soon.

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