googleapis / api-linter

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

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

Closed noahdietz closed 4 months ago

noahdietz commented 4 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 4 months ago

Thank you!