chore: update googleapis SHA circa 20260422 #16084
chore: update googleapis SHA circa 20260422 #16084scotthart wants to merge 6 commits intogoogleapis:mainfrom
Conversation
PiperOrigin-RevId: 904004297
There was a problem hiding this comment.
Code Review
This pull request updates the googleapis dependency and introduces significant API additions across multiple services. Key changes include the implementation of DeploymentGroup and DeploymentGroupRevision resources in the Config service, the addition of UpdateIndex functionality in Vector Search, and new session-related asynchronous methods for Bigtable. The renovate.sh script was refactored to derive commit metadata from the Bazel Central Registry. Review feedback identifies a critical issue where an overly broad sed command in the update script results in a broken GitHub URL in the workspace configuration, and suggests more robust regex patterns for metadata extraction.
| name = "googleapis", | ||
| urls = [ | ||
| "https://github.com/googleapis/googleapis/archive/c8ca5bce5cbabac76b8619bd8d63ac10bb0561a9.tar.gz", | ||
| "https://github.com/googleapis/20ac242a6b3a723cb10c1a0201209261addaf7d8.tar.gz", |
There was a problem hiding this comment.
The URL for the googleapis archive is broken. It is missing the repository name (googleapis) and the archive path segment. This will cause the build to fail as the archive cannot be downloaded. This appears to be caused by an incorrect sed command in renovate.sh.
| "https://github.com/googleapis/20ac242a6b3a723cb10c1a0201209261addaf7d8.tar.gz", | |
| "https://github.com/googleapis/googleapis/archive/20ac242a6b3a723cb10c1a0201209261addaf7d8.tar.gz", |
| /name = "com_google_googleapis",/,/strip_prefix = "/ { | ||
| s;/com_google_googleapis/.*.tar.gz",;/com_google_googleapis/${COMMIT}.tar.gz",; | ||
| /name = "googleapis",/,/strip_prefix = "/ { | ||
| s;/googleapis/.*.tar.gz",;/googleapis/${COMMIT}.tar.gz",; |
There was a problem hiding this comment.
This sed command is too broad and incorrectly modifies the GitHub URL in bazel/workspace0.bzl. Because it matches any string containing /googleapis/ and ending in .tar.gz", it hits the GitHub URL and replaces the googleapis/archive/ portion, resulting in a broken link. It should be made more specific to only target the mirror URL (e.g., by matching the mirror's domain or path prefix).
| s;/googleapis/.*.tar.gz",;/googleapis/${COMMIT}.tar.gz",; | |
| s;cloud-cpp-community-archive/googleapis/.*.tar.gz",;cloud-cpp-community-archive/googleapis/${COMMIT}.tar.gz",; |
| banner "Determining googleapis COMMIT and COMMIT_DATE from BCR module" | ||
| MODULE_DOWNLOAD="$(mktemp -d)" | ||
| curl -fsSL "https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/refs/heads/main/modules/googleapis/${MODULE_VERSION}/source.json" -o "${MODULE_DOWNLOAD}/source.json" | ||
| COMMIT=$(sed -n 's/.*\/googleapis\/archive\/\(.*\)\.zip",/\1/p' "${MODULE_DOWNLOAD}/source.json") |
There was a problem hiding this comment.
This sed command for extracting the commit SHA from source.json is fragile. It relies on the URL ending with .zip",, which may not be the case if the JSON formatting changes (e.g., if it's the last field in the object and lacks a trailing comma). A more robust regex that matches the SHA within the path would be safer.
| COMMIT=$(sed -n 's/.*\/googleapis\/archive\/\(.*\)\.zip",/\1/p' "${MODULE_DOWNLOAD}/source.json") | |
| COMMIT=$(sed -n 's/.*\/archive\/\([0-9a-f]*\)\.zip.*/\1/p' "${MODULE_DOWNLOAD}/source.json") |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16084 +/- ##
==========================================
- Coverage 92.70% 92.69% -0.01%
==========================================
Files 2351 2351
Lines 217954 217968 +14
==========================================
+ Hits 202047 202050 +3
- Misses 15907 15918 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Also updates renovate.sh to reflect the new BCR module googleapis update flow.