Skip to content

Dialogflow generator new#18236

Open
matt-degraffenreid wants to merge 4 commits into
GoogleCloudPlatform:mainfrom
matt-degraffenreid:dialogflow-generator-new
Open

Dialogflow generator new#18236
matt-degraffenreid wants to merge 4 commits into
GoogleCloudPlatform:mainfrom
matt-degraffenreid:dialogflow-generator-new

Conversation

@matt-degraffenreid

Copy link
Copy Markdown

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

dialogflow: added `free_form_context`, `agent_coaching_context`, `translation_context`, `agent_feedback_context`, `customer_message_generation_context`, `tuned_model`, and `tools` fields to `google_dialogflow_generator` resource

Added support for freeFormContext, agentCoachingContext, translationContext, agentFeedbackContext, and customerMessageGenerationContext.

Enforced mutual exclusivity using exactly_one_of.

Made summarizationContext optional (non-breaking).

Added timeouts and tunedModel support.
Added 'tools' property to Generator.yaml and updated samples to demonstrate linkage.

Fixed pre-existing errors in Tool connector and datastore samples.
- Update summarizationContext.version candidates in Generator.yaml to 5.0 and 6.0
- Update versions in samples to 6.0
- Update versions in handwritten tests to 5.0 and 6.0
- Add valid path to dialogflow_generator_with_tools OpenAPI spec
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 9, 2026
@matt-degraffenreid matt-degraffenreid force-pushed the dialogflow-generator-new branch from cf072d4 to bdb78ee Compare July 9, 2026 05:18
@matt-degraffenreid matt-degraffenreid marked this pull request as ready for review July 9, 2026 17:44
@github-actions github-actions Bot requested a review from BBBmau July 9, 2026 17:44
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-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.

@modular-magician modular-magician added service/dialogflow-cx and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jul 9, 2026
@modular-magician

modular-magician commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit bdb78ee:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 1969 insertions(+), 250 deletions(-)
google-beta provider View Diff 5 files changed, 1969 insertions(+), 250 deletions(-)
terraform-google-conversion View Diff 1 file changed, 599 insertions(+)
Open in Cloud Shell View Diff 9 files changed, 243 insertions(+), 1 deletion(-)

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field published_model within resource google_dialogflow_generator was added to exactly one of - reference
  • Field tuned_model within resource google_dialogflow_generator was added to exactly one of - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

Missing test report

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

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

resource "google_dialogflow_generator" "primary" {
  agent_coaching_context {
    instructions {
      agent_action     = # value needed
      condition        = # value needed
      display_details  = # value needed
      display_name     = # value needed
      system_action    = # value needed
      triggering_event = # value needed
    }
    output_language_code = # value needed
    search_config {
      datastores    = # value needed
      search_engine = # value needed
    }
  }
  agent_feedback_context {
    instructions {
      agent_action     = # value needed
      condition        = # value needed
      display_details  = # value needed
      display_name     = # value needed
      system_action    = # value needed
      triggering_event = # value needed
    }
    version = # value needed
  }
  customer_message_generation_context {
    customization {
      scenario = # value needed
    }
    version = # value needed
  }
  free_form_context {
    text = # value needed
  }
  translation_context {
    agent_language_code    = # value needed
    customer_language_code = # value needed
    translation_customization {
      glossary_terms {
        agent_language_glossary    = # value needed
        customer_language_glossary = # value needed
      }
      sentence_translations {
        agent_language_sentence    = # value needed
        customer_language_sentence = # value needed
      }
    }
    version = # value needed
  }
  tuned_model = # value needed
}

Test report

Analytics

Total Tests Passed Skipped Affected
24 19 0 5
Affected Service Packages
  • dialogflow

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccDialogflowGenerator_dialogflowGeneratorAgentCoachingExample
  • TestAccDialogflowGenerator_dialogflowGeneratorBasicExample
  • TestAccDialogflowGenerator_dialogflowGeneratorWithToolsExample
  • TestAccDialogflowGenerator_regional
  • TestAccDialogflowGenerator_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccDialogflowGenerator_update
❌ Error · Log - TestAccDialogflowGenerator_dialogflowGeneratorAgentCoachingExample
❌ Error · Log - TestAccDialogflowGenerator_dialogflowGeneratorBasicExample
❌ Error · Log - TestAccDialogflowGenerator_dialogflowGeneratorWithToolsExample
❌ Error · Log - TestAccDialogflowGenerator_regional

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@matt-degraffenreid, @BBBmau VCR tests complete for bdb78ee!

@BBBmau BBBmau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

aside from the comments we get errors on the following:

Error recording tests:
error running go: exit status 1
stdout:
=== RUN   TestAccDialogflowGenerator_dialogflowGeneratorAgentCoachingExample
=== PAUSE TestAccDialogflowGenerator_dialogflowGeneratorAgentCoachingExample
=== CONT  TestAccDialogflowGenerator_dialogflowGeneratorAgentCoachingExample
    resource_dialogflow_generator_generated_test.go:118: Step 1/3 error: Error running pre-apply plan: exit status 1
        
        Error: Invalid combination of arguments
        
          with google_dialogflow_generator.agent_coaching_generator,
          on terraform_plugin_test.tf line 12, in resource "google_dialogflow_generator" "agent_coaching_generator":
          12: resource "google_dialogflow_generator" "agent_coaching_generator" {
        
        "published_model": one of `published_model,tuned_model` must be specified
        
        Error: Invalid combination of arguments
        
          with google_dialogflow_generator.agent_coaching_generator,
          on terraform_plugin_test.tf line 12, in resource "google_dialogflow_generator" "agent_coaching_generator":
          12: resource "google_dialogflow_generator" "agent_coaching_generator" {
        
        "tuned_model": one of `published_model,tuned_model` must be specified
--- FAIL: TestAccDialogflowGenerator_dialogflowGeneratorAgentCoachingExample (0.72s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-google-beta/google-beta/services/dialogflow	0.795s
FAIL
stderr:
Error recording tests:
error running go: exit status 1
stdout:
=== RUN   TestAccDialogflowGenerator_dialogflowGeneratorBasicExample
=== PAUSE TestAccDialogflowGenerator_dialogflowGeneratorBasicExample
=== CONT  TestAccDialogflowGenerator_dialogflowGeneratorBasicExample
    resource_dialogflow_generator_generated_test.go:65: Step 1/3 error: Error running pre-apply plan: exit status 1
        
        Error: Invalid combination of arguments
        
          with google_dialogflow_generator.summarization_basic_generator,
          on terraform_plugin_test.tf line 12, in resource "google_dialogflow_generator" "summarization_basic_generator":
          12: resource "google_dialogflow_generator" "summarization_basic_generator" {
        
        "tuned_model": one of `published_model,tuned_model` must be specified
        
        Error: Invalid combination of arguments
        
          with google_dialogflow_generator.summarization_basic_generator,
          on terraform_plugin_test.tf line 12, in resource "google_dialogflow_generator" "summarization_basic_generator":
          12: resource "google_dialogflow_generator" "summarization_basic_generator" {
        
        "published_model": one of `published_model,tuned_model` must be specified
--- FAIL: TestAccDialogflowGenerator_dialogflowGeneratorBasicExample (0.73s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-google-beta/google-beta/services/dialogflow	0.801s
FAIL
stderr:
Error recording tests:
error running go: exit status 1
stdout:
=== RUN   TestAccDialogflowGenerator_dialogflowGeneratorWithToolsExample
=== PAUSE TestAccDialogflowGenerator_dialogflowGeneratorWithToolsExample
=== CONT  TestAccDialogflowGenerator_dialogflowGeneratorWithToolsExample
    resource_dialogflow_generator_generated_test.go:164: Step 1/3 error: Error running pre-apply plan: exit status 1
        
        Error: Invalid resource type
        
          on terraform_plugin_test.tf line 23, in resource "google_dialogflow_tool" "test_tool":
          23: resource "google_dialogflow_tool" "test_tool" {
        
        The provider hashicorp/google does not support resource type
        "google_dialogflow_tool".
--- FAIL: TestAccDialogflowGenerator_dialogflowGeneratorWithToolsExample (0.71s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-google-beta/google-beta/services/dialogflow	0.780s
FAIL
stderr:
Error recording tests:
error running go: exit status 1
stdout:
=== RUN   TestAccDialogflowGenerator_regional
=== PAUSE TestAccDialogflowGenerator_regional
=== CONT  TestAccDialogflowGenerator_regional
    resource_dialogflow_generator_test.go:75: Step 1/2 error: Error running pre-apply plan: exit status 1
        
        Error: Invalid combination of arguments
        
          with google_dialogflow_generator.summarization_generator,
          on terraform_plugin_test.tf line 12, in resource "google_dialogflow_generator" "summarization_generator":
          12: resource "google_dialogflow_generator" "summarization_generator" {
        
        "published_model": one of `published_model,tuned_model` must be specified
        
        Error: Invalid combination of arguments
        
          with google_dialogflow_generator.summarization_generator,
          on terraform_plugin_test.tf line 12, in resource "google_dialogflow_generator" "summarization_generator":
          12: resource "google_dialogflow_generator" "summarization_generator" {
        
        "tuned_model": one of `published_model,tuned_model` must be specified
--- FAIL: TestAccDialogflowGenerator_regional (0.71s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-google-beta/google-beta/services/dialogflow	0.778s
FAIL
stderr:

Comment on lines +27 to +30
timeouts:
insert_minutes: 20
update_minutes: 20
delete_minutes: 20

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this isn't necessary since the default timeouts are already set to 20 minutes

- TOOL_CALL_COMPLETION
- name: publishedModel
type: String
exactly_one_of:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this sets publishedModel as a required field instead of it being optional, was this intended? Unless there was a change to the API we should keep it as optional by utilizing conflicts to prevent both from being set.

Optional. The published Large Language Model name. * To use the latest model version, specify the model name without version number. Example: text-bison * To use a stable model version, specify the version number as well. Example: text-bison@002.
- name: tunedModel
type: String
exactly_one_of:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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