Skip to content

Add AnalysisRule resource for contactcenterinsights #13430

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

Draft
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

scawful
Copy link
Contributor

@scawful scawful commented Mar 21, 2025

Add config for contactcenterinsights api and AnalysisRule resource https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations.analysisRules

`google_contact_center_insights_analysis_rule`

Copy link

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.

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

@github-actions github-actions bot requested a review from BBBmau March 21, 2025 23:17
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 21, 2025
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 25, 2025
@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 ( 14 files changed, 1815 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 12 files changed, 1805 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 217 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_analysis_rule (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_analysis_rule" "primary" {
  annotator_selector {
    issue_models    = # value needed
    phrase_matchers = # value needed
    qa_config {
      scorecard_list {
        qa_scorecard_revisions = # value needed
      }
    }
    run_entity_annotator         = # value needed
    run_intent_annotator         = # value needed
    run_issue_model_annotator    = # value needed
    run_phrase_matcher_annotator = # value needed
    run_qa_annotator             = # value needed
    run_sentiment_annotator      = # value needed
    run_silence_annotator        = # value needed
    run_summarization_annotator  = # value needed
    summarization_config {
      conversation_profile = # value needed
      summarization_model  = # value needed
    }
  }
  location = # value needed
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_contact_center_insights_analysis_rule

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Copy link
Collaborator

@BBBmau BBBmau left a comment

Choose a reason for hiding this comment

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

you'll need to address the missing tests, they come from not including update tests. Refer to https://googlecloudplatform.github.io/magic-modules/test/test/#add-an-update-test

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4732
Passed tests: 4280
Skipped tests: 437
Affected tests: 15

Click here to see the affected service packages

All service packages are affected

Action taken

Found 15 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
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleBasicExample
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccLoggingFolderSettings_update
  • TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample

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]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccAccessContextManager [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]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [Error message] [Debug log]
TestAccLoggingFolderSettings_update [Error message] [Debug log]
TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [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

@github-actions github-actions bot requested a review from BBBmau March 25, 2025 19:06
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Mar 25, 2025
@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 ( 14 files changed, 1898 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 12 files changed, 1888 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 238 insertions(+))

Missing service labels

The following new resources do not have corresponding service labels:

  • google_contact_center_insights_analysis_rule

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4765
Passed tests: 4310
Skipped tests: 439
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
  • TestAccCloudQuotasQuotaPreference_cloudquotasQuotaPreferenceBasicExample_update
  • TestAccCloudbuildWorkerPool_basic
  • TestAccComputeInstanceFromMachineImage_terminationTime
  • TestAccComputeInstanceFromTemplate_TerminationTime
  • TestAccComputeInstanceTemplate_instanceTerminationAction_terminationTime
  • TestAccComputeInstance_schedulingTerminationTime
  • TestAccComputeRegionInstanceTemplate_instanceTerminationAction_terminationTime
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleBasicExample
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccLoggingFolderSettings_update
  • TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample

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]

🔴 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:
TestAccCloudQuotasQuotaPreference_cloudquotasQuotaPreferenceBasicExample_update [Error message] [Debug log]
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [Error message] [Debug log]
TestAccLoggingFolderSettings_update [Error message] [Debug log]
TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [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

@BBBmau This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 28, 2025
@scawful
Copy link
Contributor Author

scawful commented Mar 31, 2025

I believe I added all the necessary fields for the update test, let me know if there's anything which looks off. @BBBmau

@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 ( 7 files changed, 1944 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1944 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 4
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • contactcenterinsights
#### Action taken
Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample
  • TestAccContactCenterInsightsAnalysisRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_update [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

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 ( 7 files changed, 1944 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1944 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 4
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • contactcenterinsights
#### Action taken
Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample
  • TestAccContactCenterInsightsAnalysisRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_update [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

- AnalysisRule must enable at least one analysis.
- display_name: Must not be empty
@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 ( 7 files changed, 1945 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1945 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 4
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • contactcenterinsights
#### Action taken
Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample
  • TestAccContactCenterInsightsAnalysisRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_update [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

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 ( 7 files changed, 1948 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1948 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 4
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • contactcenterinsights
#### Action taken
Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample
  • TestAccContactCenterInsightsAnalysisRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample [Error message] [Debug log]
TestAccContactCenterInsightsAnalysisRule_update [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

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 ( 7 files changed, 1958 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1958 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 105 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 4
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • contactcenterinsights
#### Action taken
Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample
  • TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample
  • TestAccContactCenterInsightsAnalysisRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleFullExample [Debug log]
TestAccContactCenterInsightsAnalysisRule_contactCenterInsightsAnalysisRuleProfileExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_update [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

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 ( 7 files changed, 1956 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1956 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 105 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • contactcenterinsights
#### 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
  • TestAccContactCenterInsightsAnalysisRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_update [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

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 ( 7 files changed, 1962 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1962 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 330 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 105 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • contactcenterinsights
#### 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
  • TestAccContactCenterInsightsAnalysisRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAnalysisRule_update [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

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