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

Enabling management of default Dialogflow resources without terraform import: name field editable #9359

Conversation

mmurakowski-verily
Copy link
Contributor

@mmurakowski-verily mmurakowski-verily commented Oct 25, 2023

Fixes hashicorp/terraform-provider-google#16308, read that bug for more context 😅

An alternative version of #9336 because designing a good API is hard and I want someone else to make that decision 😅.

Release Note Template for Downstream PRs (will be copied)

dialogflowcx: changed `name` from an output-only attribute to an argument in the `google_dialogflow_cx_intent` resource
dialogflowcx: changed `name` from an output-only attribute to an argument in the `google_dialogflow_cx_flow` resource

…Default Negative Intent, without terraform import (v2!)
@mmurakowski-verily
Copy link
Contributor Author

@SarahFrench + @melinath + @rileykarson 👋

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

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

@ScottSuarez ScottSuarez requested review from SarahFrench and removed request for ScottSuarez October 25, 2023 19:13
@ScottSuarez
Copy link
Contributor

ScottSuarez commented Oct 25, 2023

Assigning to the previous reviewer since there is on-going context.

@modular-magician
Copy link
Collaborator

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

Breaking Change(s) Detected

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

  • Field is_fallback became Computed only on google_dialogflow_cx_intent - 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.

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 8 files changed, 633 insertions(+), 54 deletions(-))
Terraform Beta: Diff ( 8 files changed, 633 insertions(+), 54 deletions(-))
TF Conversion: Diff ( 2 files changed, 20 insertions(+), 10 deletions(-))
TF OiCS: Diff ( 16 files changed, 582 insertions(+))

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

Terraform GA: Diff ( 8 files changed, 629 insertions(+), 27 deletions(-))
Terraform Beta: Diff ( 8 files changed, 629 insertions(+), 27 deletions(-))
TF Conversion: Diff ( 2 files changed, 20 insertions(+))
TF OiCS: Diff ( 16 files changed, 583 insertions(+))

@@ -62,9 +73,11 @@ parameters:
properties:
- !ruby/object:Api::Type::String
name: 'name'
output: true
default_from_api: true
Copy link
Member

Choose a reason for hiding this comment

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

FWIW I misunderstood the question regarding reading from the API so I'm not sure this design will work out - sorry for the confusion! I'll take a look over the designs & offer some thoughts since we chatted about this earlier but ultimately Sarah is the reviewer here.

Copy link
Member

Choose a reason for hiding this comment

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

left some notes on the other PR.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3178
Passed tests 2845
Skipped tests: 319
Affected tests: 14

Action taken

Found 14 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDialogflowCXIntent_dialogflowcxIntentDefaultNegativeIntentExample|TestAccDialogflowCXIntent_dialogflowcxIntentDefaultWelcomeIntentExample|TestAccDialogflowCXFlow_dialogflowcxFlowBasicExample|TestAccDialogflowCXFlow_dialogflowcxFlowDefaultStartFlowExample|TestAccDialogflowCXFlow_defaultStartFlow|TestAccDialogflowCXIntent_defaultIntents|TestAccDialogflowCXIntent_dialogflowcxIntentFullExample|TestAccDialogflowCXIntent_update|TestAccDialogflowCXTestCase_update|TestAccDialogflowCXTestCase_dialogflowcxTestCaseFullExample|TestAccDialogflowCXFlow_update|TestAccDialogflowCXFlow_dialogflowcxFlowFullExample|TestAccSpannerInstanceIamPolicy|TestAccSpannerDatabaseIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDialogflowCXIntent_dialogflowcxIntentDefaultNegativeIntentExample[Debug log]
TestAccDialogflowCXIntent_dialogflowcxIntentDefaultWelcomeIntentExample[Debug log]
TestAccDialogflowCXFlow_dialogflowcxFlowDefaultStartFlowExample[Debug log]
TestAccDialogflowCXFlow_defaultStartFlow[Debug log]
TestAccSpannerInstanceIamPolicy[Debug log]
TestAccSpannerDatabaseIamPolicy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccDialogflowCXFlow_dialogflowcxFlowBasicExample[Error message] [Debug log]
TestAccDialogflowCXIntent_defaultIntents[Error message] [Debug log]
TestAccDialogflowCXIntent_dialogflowcxIntentFullExample[Error message] [Debug log]
TestAccDialogflowCXIntent_update[Error message] [Debug log]
TestAccDialogflowCXTestCase_update[Error message] [Debug log]
TestAccDialogflowCXTestCase_dialogflowcxTestCaseFullExample[Error message] [Debug log]
TestAccDialogflowCXFlow_update[Error message] [Debug log]
TestAccDialogflowCXFlow_dialogflowcxFlowFullExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these 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.

Terraform GA: Diff ( 8 files changed, 651 insertions(+), 25 deletions(-))
Terraform Beta: Diff ( 8 files changed, 651 insertions(+), 25 deletions(-))
TF Conversion: Diff ( 2 files changed, 20 insertions(+))
TF OiCS: Diff ( 16 files changed, 583 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3179
Passed tests 2855
Skipped tests: 319
Affected tests: 5

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
TestAccBigQueryDataTable_bigtable|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccDialogflowCXFlow_dialogflowcxFlowBasicExample|TestAccDialogflowCXIntent_defaultIntents|TestAccSpannerInstanceIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigQueryDataTable_bigtable[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample[Debug log]
TestAccDialogflowCXFlow_dialogflowcxFlowBasicExample[Debug log]
TestAccSpannerInstanceIamPolicy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccDialogflowCXIntent_defaultIntents[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these 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.

Terraform GA: Diff ( 8 files changed, 651 insertions(+), 25 deletions(-))
Terraform Beta: Diff ( 8 files changed, 651 insertions(+), 25 deletions(-))
TF Conversion: Diff ( 2 files changed, 20 insertions(+))
TF OiCS: Diff ( 16 files changed, 583 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3180
Passed tests 2860
Skipped tests: 319
Affected tests: 1

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
TestAccDialogflowCXIntent_defaultIntents

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDialogflowCXIntent_defaultIntents[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@mmurakowski-verily mmurakowski-verily marked this pull request as ready for review October 26, 2023 19:24
@mmurakowski-verily mmurakowski-verily changed the title Enabling management of Default Start Flow + Default Welcome Intent + Default Negative Intent, without terraform import (v2!) Enabling management of default Dialogflow resources without terraform import: name field editable Oct 26, 2023
@melinath melinath removed their request for review October 27, 2023 18:30
@SarahFrench
Copy link
Collaborator

Of the two approaches I prefer using new boolean fields over the name field. I think the booleans are more self-explanatory, whereas as I think using the value of the name field could cause some confusion for maintainers and users. For example I can imagine users confusing the name and display_name, and if we introduced any bugs during this work they could be a bit confusing to debug. For maintainers, I think they'd find booleans easier to gain context on when maintaining these resources.

Because of that I'll resume reviewing #9336 and this PR could be closed when the other PR is merged.

@mmurakowski-verily
Copy link
Contributor Author

mmurakowski-verily commented Nov 3, 2023

We the reviewer picked a different approach 🎉

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

Successfully merging this pull request may close these issues.

Can't easily update DialogflowCX "Default start flow" or "Default welcome intent"
5 participants