Skip to content

Generator: give precendence to protos if mixin is declared #905

@sofisl

Description

@sofisl

Please make sure you have searched for information in the following guides.

Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.

googleapis/google-cloud-node#7237

A step-by-step description of how to reproduce the issue, based on the linked reproduction.

In https://critique.corp.google.com/cl/868182714 seems like they explicitly declared IAM rpcs in their protos, in addition to the mixin. In Nodejs this caused a duplicate identifier: googleapis/google-cloud-node#7237 for those methods. It seems like according to this RPC, this is specifically a ts generator bug: https://google.aip.dev/client-libraries/4234#overriding-a-duplicate-rpc.

steps to reproduce:

  1. pull down current googleapis/googleapis
  2. run bazelisk build //google/cloud/dataform:google-cloud-dataform-nodejs
  3. see the duplicate identifier in the service.ts.

A clear and concise description of what the bug is, and what you expected to happen.

see chat: https://chat.google.com/room/AAAA3k1_t2c/X19WKL84OQA

according to AIP: https://google.aip.dev/client-libraries/4234#overriding-a-duplicate-rpc we have to give precedence to the protos in a case of a collision. we need to fix this in the generator so it doesn't try to generate mixin rpcs if the proto defines it as well

A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

this CL https://critique.corp.google.com/cl/868182714 broke the generator. AIP says this shouldn;t be the case: https://google.aip.dev/client-libraries/4234#overriding-a-duplicate-rpc

Metadata

Metadata

Assignees

No one assigned

    Labels

    size: sPull request size is small.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions