googleapis / api-linter

A linter for APIs defined in protocol buffers.
https://linter.aip.dev/
Apache License 2.0
602 stars 144 forks source link

fix(AIP-136): handle LRO response names #1391

Closed noahdietz closed 6 months ago

noahdietz commented 6 months ago

The common lint for response message name matching needs to better handle LRO Methods which have their response message encoded in the google.longrunning.operation_info annotation.

This fixes the common lint to properly compare the response_type name instead of the rpc return type in the LRO case, as well as the AIP-136 implementation to warn on the proper spot.

Internal bug b/342434484

cc: @liveFreeOrCode just an fyi - the helper we used had a little bug in it that would let it fall through to the finding logic on valid RPCs using LRO. I should've asked for LRO case in the tests! my bad

pratnala commented 6 months ago

Thank you!