chore: update googleapis SHA circa 20260514#16102
Conversation
PiperOrigin-RevId: 915473784
There was a problem hiding this comment.
Code Review
This pull request updates several Google Cloud C++ client libraries, including the Data Lineage, Dataproc, Memorystore, Redis Cluster, Spanner, and Support APIs. Key changes involve updating the googleapis dependency version, refreshing documentation links, and adding new RPC methods such as SearchLineageStreaming and GetAttachment/GetComment. The reviewer identified that the request_id generation logic in lineage_connection_impl.cc is duplicated and should be refactored into a private helper method to align with the repository's style guide.
| auto request_copy = request; | ||
| if (request_copy.request_id().empty()) { | ||
| request_copy.set_request_id(invocation_id_generator_->MakeInvocationId()); | ||
| } |
There was a problem hiding this comment.
This logic for ensuring a request_id is present is duplicated five times in this file (lines 83-86, 103-106, 124-127, 290-293, and 465-468). Following the repository style guide, this should be factored out into a private helper method to improve maintainability and reduce code duplication.
References
- The repository prefers to factor out duplicated code if it appears 3 or more times in non-test files. (link)
| } | ||
| std::string doxygen_formatted_function_comments = | ||
| method_source_location.leading_comments; | ||
| absl::StrReplaceAll({{"$", "$$"}}, &doxygen_formatted_function_comments); |
There was a problem hiding this comment.
Why not make this a member of substitutions?
There was a problem hiding this comment.
This felt more like a "good practice" to always sanitize the input to escape a known problematic character. substitutions typically contain problematic strings that we couldn't anticipate and have to add post breakage. I also wanted the sanitization to occur before we applied substitutions, which could be enforced by making it the first substitution, but that would require future updates to be mindful of.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #16102 +/- ##
==========================================
- Coverage 92.70% 92.69% -0.01%
==========================================
Files 2353 2353
Lines 218354 218388 +34
==========================================
+ Hits 202419 202434 +15
- Misses 15935 15954 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
One of the updated protos had an example comment containing the
$character which broke the generator. Added code to sanitize the comments by changing any$to$$, which escapes it.