chore: post processing script updates - #18073
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the google-api-core dependency constraints to >= 2.28.0 across multiple client post-processing configurations, upgrades gapic-generator to 1.38.0, and removes several obsolete scripts and temporary patches. Additionally, it refactors the google-ads-admanager client to utilize standard api_core version and dependency check helpers, introducing a compatibility module (_compat.py) to handle request transcoding and endpoint resolution, and updates REST transports to use this new module. The feedback advises using flexible regex patterns instead of hardcoded version strings (such as v1 or v1p1beta1) in post-processing search patterns to ensure the replacement logic remains robust against future version updates.
I am having trouble creating individual review comments. Click here to see my feedback.
.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml (133)
When defining search patterns for automated code replacements in librarian post-processing YAML files, avoid hardcoding specific version strings like v1 or v1p1beta1. Instead, use flexible regex patterns (such as [a-zA-Z0-9_]+ or [\s\S]*?) to match version strings. This ensures the replacement logic remains functional even when dependency versions are updated in the source files, preventing match failures.
before: '(from google\\.cloud\\.speech_[a-zA-Z0-9_]+ import gapic_version as package_version\\n)(?!from google\\.cloud\\.speech_[a-zA-Z0-9_]+\\.helpers)'References
- When defining search patterns for automated code replacements in librarian post-processing YAML files, use flexible regex patterns (such as
[\s\S]*) to match version strings instead of hardcoding specific versions.
f32b6b0 to
93c2039
Compare
1234743 to
b9a1379
Compare
… gapic-generator v1.38
Stacked on top of #18057