-
Notifications
You must be signed in to change notification settings - Fork 2k
Add missing fields to google_dialogflow_cx_playbook resource #14765
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
base: main
Are you sure you want to change the base?
Conversation
…port custom functions and list of JSON strings will not work;
Fix typos; Fix JSON string formmat;
Tests analyticsTotal tests: 43 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 43 Click here to see the affected service packages
🟢 All tests passed! View the build log |
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 2 weeks. Please take a look! Use the label |
displayName, ok := res["displayName"].(string) | ||
if !ok { return nil, fmt.Errorf("'displayName' is not a string") } | ||
|
||
if displayName == "Playbook Example with Fulfillment" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed previously- this means that we're making changes that will only support the specific test cases, and mean the general fields/resource likely won't work for customers. Can you remove all test case-specific modifications (i.e. name checks, references to specific field indices unless they're a fixed part of the API contract we need to account for, etc) and push a commit with that change? That'll help me understand the base issue we're running into and suggest corrections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, these changes only support the specific test case, because other tests will fail due to not having the fields.
The specific test case is testing for optional fields for 100% test coverage and other tests do not use these optional fields so it will be a not found
error for the others.
text = ["One more time?"] | ||
} | ||
} | ||
messages { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API response seems to drop these values entirely. We get back:
"eventHandler": {
"event": "sys.no-input-default",
"fulfillment": {
"messages": [
{
"text": {
"text": [
"One more time?"
]
}
},
{},
{
"knowledgeInfoCard": {}
}
],
Is this intentional? That may be the case if those are all default values as proto<>json conversion collapses defaults into null generally. Or just a decision not to return those value(s) back. If not, is this a bug that will be fixed? Is it documented somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I suspect this line of inquiry will carry through the resource- removing the corrections in the decoder will highlight them all)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is expected, this is why I added the decoder for this specific test case.
@@ -45,6 +46,17 @@ examples: | |||
vars: | |||
agent_name: 'dialogflowcx-agent' | |||
bucket_name: 'dialogflowcx-bucket' | |||
ignore_read_extra: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's omit these entries for now, and evaluate adding them back later if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just ran the test locally without the ignore_read_extra
and this is the error I got:
resource_dialogflow_cx_playbook_generated_test.go:114: Step 2/2 error running import: ImportStateVerify attributes not equivalent. Difference is shown below. The - symbol indicates attributes missing after import.
map[string]string{
- "handlers.2.event_handler.0.fulfillment.0.advanced_settings.0.audio_export_gcs_destination.#": "1",
- "handlers.2.event_handler.0.fulfillment.0.advanced_settings.0.audio_export_gcs_destination.0.%": "1",
- "handlers.2.event_handler.0.fulfillment.0.advanced_settings.0.audio_export_gcs_destination.0.uri": "gs://tf-test-dialogflowcx-bucketrc419zoasl/prefix-",
- "handlers.2.event_handler.0.fulfillment.0.messages.1.tool_call.0.action": "Example Tool",
+ "handlers.2.event_handler.0.fulfillment.0.messages.1.tool_call.0.action": "",
- "handlers.2.event_handler.0.fulfillment.0.messages.1.tool_call.0.tool": "projects/zhihaos-grecords-retail-bot/locations/global/agents/817a04b9-a8b6-4e24-9ed2-9951b233f8f3/tools/c5206a3b-d62e-4a5a-a198-b23afcd7bb70",
+ "handlers.2.event_handler.0.fulfillment.0.messages.1.tool_call.0.tool": "",
- "handlers.3.event_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.action": "Example Tool",
+ "handlers.3.event_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.action": "",
- "handlers.3.event_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.tool": "projects/zhihaos-grecords-retail-bot/locations/global/agents/817a04b9-a8b6-4e24-9ed2-9951b233f8f3/tools/c5206a3b-d62e-4a5a-a198-b23afcd7bb70",
+ "handlers.3.event_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.tool": "",
- "handlers.6.lifecycle_handler.0.fulfillment.0.advanced_settings.0.audio_export_gcs_destination.#": "1",
- "handlers.6.lifecycle_handler.0.fulfillment.0.advanced_settings.0.audio_export_gcs_destination.0.%": "1",
- "handlers.6.lifecycle_handler.0.fulfillment.0.advanced_settings.0.audio_export_gcs_destination.0.uri": "gs://tf-test-dialogflowcx-bucketrc419zoasl/prefix-",
- "handlers.6.lifecycle_handler.0.fulfillment.0.messages.1.tool_call.0.action": "Example Tool",
+ "handlers.6.lifecycle_handler.0.fulfillment.0.messages.1.tool_call.0.action": "",
- "handlers.6.lifecycle_handler.0.fulfillment.0.messages.1.tool_call.0.tool": "projects/zhihaos-grecords-retail-bot/locations/global/agents/817a04b9-a8b6-4e24-9ed2-9951b233f8f3/tools/c5206a3b-d62e-4a5a-a198-b23afcd7bb70",
+ "handlers.6.lifecycle_handler.0.fulfillment.0.messages.1.tool_call.0.tool": "",
- "handlers.7.lifecycle_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.action": "Example Tool",
+ "handlers.7.lifecycle_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.action": "",
- "handlers.7.lifecycle_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.tool": "projects/zhihaos-grecords-retail-bot/locations/global/agents/817a04b9-a8b6-4e24-9ed2-9951b233f8f3/tools/c5206a3b-d62e-4a5a-a198-b23afcd7bb70",
+ "handlers.7.lifecycle_handler.0.fulfillment.0.conditional_cases.1.cases.0.case_content.8.message.0.tool_call.0.tool": "",
- "input_parameter_definitions.0.type_schema.0.schema_reference.0.tool": "projects/zhihaos-grecords-retail-bot/locations/global/agents/817a04b9-a8b6-4e24-9ed2-9951b233f8f3/tools/c5206a3b-d62e-4a5a-a198-b23afcd7bb70",
+ "input_parameter_definitions.0.type_schema.0.schema_reference.0.tool": "",
- "output_parameter_definitions.0.type_schema.0.schema_reference.0.tool": "projects/zhihaos-grecords-retail-bot/locations/global/agents/817a04b9-a8b6-4e24-9ed2-9951b233f8f3/tools/c5206a3b-d62e-4a5a-a198-b23afcd7bb70",
+ "output_parameter_definitions.0.type_schema.0.schema_reference.0.tool": "",
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can omit the logging_settings
in the ignore_read_extra
and still pass the test, should I do that then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed logging_settings
in the ignore_read_extra
.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 43 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 43 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label |
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 2 weeks. Please take a look! Use the label |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 43 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 3 weeks. Please take a look! Use the label |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 43 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
fulfill request hashicorp/terraform-provider-google#23328
Previous PR: #14446