Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Update Intent Optional Field is not Optional #129

Closed
nnegrey opened this issue Jun 14, 2019 · 14 comments
Closed

Update Intent Optional Field is not Optional #129

nnegrey opened this issue Jun 14, 2019 · 14 comments
Assignees
Labels
api: dialogflow Issues related to the googleapis/python-dialogflow API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@nnegrey
Copy link
Contributor

nnegrey commented Jun 14, 2019

In the updateIntent method, the language_code is listed as optional, but if you try to call the library without passing in that argument you get it error that it is required.

https://github.com/googleapis/dialogflow-python-client-v2/blob/master/dialogflow_v2/gapic/intents_client.py#L518-L547

@busunkim96
Copy link
Contributor

language_code is described as an optional field in the RPC API Reference as well

https://cloud.google.com/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2beta1#updateintentrequest

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 15, 2019
@sduskis sduskis added type: question Request for information or clarification. Not an issue. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. type: question Request for information or clarification. Not an issue. labels Jun 16, 2019
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Dec 11, 2019
@czahedi
Copy link
Contributor

czahedi commented Jan 15, 2020

Hi folks,

What's the plan here? Noah and Bu Sun, can you revisit this and all the related Dialogflow Python issues? If there's work to be done I'd love for us to get started on it since these are out of SLO. It's possible a recent regen has fixed this though.

Thanks!

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 15, 2020

It appears the v2 (not v2beta1) proto has been fixed with annotations:

Changed here: googleapis/googleapis@b7abb49#diff-3bd3ac95a9428fb7b5e51caee180b94f

https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2/intent.proto#L1015

But library doesn't seem to have those changes: https://github.com/googleapis/dialogflow-python-client-v2/blob/master/dialogflow_v2/gapic/intents_client.py#L544

Issue with the generator or micro-generator?

@busunkim96
Copy link
Contributor

@nnegrey The updates aren't merged automatically into the library. Autosynth currently opens a PR when it notices a difference in a regeneration. I think https://github.com/googleapis/dialogflow-python-client-v2/pull/163/files has a change to make language_code required.

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 16, 2020

That PR is for the KnowledgeBases, where the issue is still on the UpdateIntents call.

@busunkim96
Copy link
Contributor

@nnegrey Yep! But any proto changes that happened after that won't appear until that one gets merged. Alternatively you can close that one and wait for a new PR to appear.

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 16, 2020

Oh..... now I get it.

But the new annotations got updated in September from the date, does that mean the one above although from October is maybe older? (sorry confused again)

@busunkim96
Copy link
Contributor

Hmm, it does look like there's a mismatch. 😭 I'm going to close the open synth PR to see if we get something new tomorrow. Dialogflow is using the old generator (gapic-generator).

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 27, 2020

Looks like an issue with the old generator. :(

@czahedi
Copy link
Contributor

czahedi commented Jan 27, 2020

Bu Sun please keep us updated on what you find :)

@google-cloud-label-sync google-cloud-label-sync bot added the api: dialogflow Issues related to the googleapis/python-dialogflow API. label Jan 30, 2020
@czahedi
Copy link
Contributor

czahedi commented Feb 3, 2020

Hey folks, any update here?

@busunkim96
Copy link
Contributor

It looks like Dialogflow has not been migrated to use the new proto annotations, so required/optional is determined by the GAPIC config. https://github.com/googleapis/googleapis/blob/2e23b8fbc45f5d9e200572ca662fe1271bcd6760/google/cloud/dialogflow/v2beta1/dialogflow_gapic.yaml#L838 line makes language_code required.

Opening a CL now to fix it.

@czahedi
Copy link
Contributor

czahedi commented Feb 14, 2020

Hey Bu Sun, checking back in. Did that other CL you mentioned go through?

@busunkim96
Copy link
Contributor

Closed by #175

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: dialogflow Issues related to the googleapis/python-dialogflow API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

5 participants