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

[py] GRPC routing metadata is incorrectly computed for update calls #364

Closed
bdhess opened this issue Jan 6, 2020 · 4 comments
Closed

[py] GRPC routing metadata is incorrectly computed for update calls #364

bdhess opened this issue Jan 6, 2020 · 4 comments
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@bdhess
Copy link

bdhess commented Jan 6, 2020

As an example:
https://github.com/googleapis/google-cloud-python/blob/de73e45a7183a638113153d0faec105cfc437f0e/kms/google/cloud/kms_v1/gapic/key_management_service_client.py#L1569

When the crypto_key argument to UpdateCryptoKey is a dict, the attempt to resolve crypto_key.name results in an AttributeError ("'dict' object has no attribute 'name'"). The error is caught and ignored, so this fails silently.

Reported by a customer at https://stackoverflow.com/questions/59617920/cant-update-cryptokey-in-us-central1

@BinarSkugga
Copy link

The bug also happens with UpdateCryptoKeyVersion

@hkdevandla
Copy link
Member

hkdevandla commented Apr 8, 2020

@software-dov , can you clarify if this issue happens in the micro-generator or is this something that we should fix in the current gapic?

@yihanzhen yihanzhen transferred this issue from googleapis/gapic-generator Apr 9, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 9, 2020
@arithmetic1728
Copy link
Collaborator

arithmetic1728 commented Apr 13, 2020

I think this bug only applies to the monolith generator. The issue is that monolith generator generated code takes individual fields, since one of the field can be either a dict or an object, but the code doesn't handle dict well, it throws exceptions. micro-generator doesn't allow users to provide fields separately, instead they have wrap the fields in a request object, so it won't have this issue.

The following is an example demonstrating this.

micro-generator generated echo method:
https://github.com/arithmetic1728/showcase_sample/blob/master/showcase_generated/google/showcase_v1beta1/services/echo/client.py#L140

monolith generator generated echo method:
https://github.com/arithmetic1728/showcase_sample/blob/master/showcase-monolith/google/showcase_v1beta1/gapic/echo_client.py#L211

@arithmetic1728 arithmetic1728 added type: question Request for information or clarification. Not an issue. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 14, 2020
sethvargo added a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue May 5, 2020
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
sethvargo added a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue May 5, 2020
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
sethvargo added a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue May 5, 2020
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
sethvargo added a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue May 5, 2020
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
busunkim96 pushed a commit to googleapis/python-kms that referenced this issue Jun 4, 2020
…-docs-samples#3690)

This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
busunkim96 pushed a commit to busunkim96/python-kms that referenced this issue Jun 16, 2020
…-docs-samples#3690)

This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
busunkim96 pushed a commit to busunkim96/python-kms that referenced this issue Jun 16, 2020
…-docs-samples#3690)

This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
busunkim96 pushed a commit to googleapis/python-kms that referenced this issue Jun 16, 2020
…-docs-samples#3690)

This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
@busunkim96
Copy link
Contributor

This is now resolved for KMS (via migration to the microgenerator)

rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 8, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 8, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 8, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 8, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 11, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 11, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 14, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
rsamborski pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 14, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
dandhlee pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 14, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
dandhlee pushed a commit to GoogleCloudPlatform/python-docs-samples that referenced this issue Nov 14, 2022
This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
parthea pushed a commit to googleapis/google-cloud-python that referenced this issue Oct 21, 2023
…-docs-samples#3690)

This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
parthea pushed a commit to googleapis/google-cloud-python that referenced this issue Oct 21, 2023
…-docs-samples#3690)

This updates the Cloud KMS samples to match the format from the other 6
languages. It also updates the samples to note the workaround for
googleapis/gapic-generator-python#364.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

7 participants