Skip to content

feat: update API sources and regenerate - #20873

Merged
JoeWang1127 merged 2 commits into
mainfrom
feat-update-sources-2026-11-09
Nov 9, 2026
Merged

JoeWang1127 merged 2 commits into
mainfrom
feat-update-sources-2026-11-09

Conversation

@JoeWang1127

@JoeWang1127 JoeWang1127 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Update googleapis sources to 5adfa535e19786ded0e87ab1c4cf2bece46741bc and regenerate all libraries.

Debug Info

System Details

  • Go version: go version go1.26.8 linux/amd64
  • OS: Linux 7.1.6-1rodete1-amd64 x86_64
  • Librarian version: v0.52.0

Commands Executed

  • go run github.com/googleapis/librarian/cmd/librarian@v0.52.0 update sources.googleapis
  • go run github.com/googleapis/librarian/cmd/librarian@v0.52.0 install
  • go run github.com/googleapis/librarian/cmd/librarian@v0.52.0 generate --all
  • go run github.com/googleapis/librarian/cmd/librarian@v0.52.0 tidy
  • git add .
  • git commit -m "feat: update API sources and regenerate"

Included googleapis CLs

google/ads/datamanager/v1

google/cloud/ces/v1

google/cloud/chronicle/v1

google/cloud/dataplex/v1

google/cloud/discoveryengine/v1

google/cloud/geminidataanalytics/v1

google/cloud/geminidataanalytics/v1beta

google/cloud/hypercomputecluster/v1beta

google/cloud/kms/v1

google/cloud/memorystore/v1

google/cloud/networkmanagement/v1

google/cloud/run/v2

google/cloud/sql/v1

google/cloud/sql/v1beta4

google/cloud/vectorsearch/v1

google/pubsub/v1

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several updates across multiple Google Cloud client libraries, including the addition of the Search service in Chronicle, a new Reporting service in Data Manager, a ListNodes method in Hypercompute Cluster, and Instance IAM/Update operations in Cloud Run. Feedback is provided for the Cloud Run client, where the extraction of the routing header 'location' from the instance name in UpdateInstance uses an expensive regular expression. It is recommended to replace this regex with a simpler, allocation-free substring extraction using strings.Index to optimize performance on this per-RPC hot path.

Comment on lines +698 to +700
if reg := regexp.MustCompile("projects/[^/]+/locations/(?P<location>[^/]+)(?:/.*)?"); reg.MatchString(req.GetInstance().GetName()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetInstance().GetName())[1])) > 0 {
routingHeadersMap["location"] = url.QueryEscape(reg.FindStringSubmatch(req.GetInstance().GetName())[1])
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Performance Optimization

On performance-critical hot paths, such as per-RPC routing header extraction, we should avoid using expensive regular expressions or allocating string manipulation functions. Instead, we can use simpler, allocation-free alternatives like strings.Index to extract the location substring from the instance name.

This avoids both the regex compilation overhead and the runtime allocations of regex matching.

Suggested change
if reg := regexp.MustCompile("projects/[^/]+/locations/(?P<location>[^/]+)(?:/.*)?"); reg.MatchString(req.GetInstance().GetName()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetInstance().GetName())[1])) > 0 {
routingHeadersMap["location"] = url.QueryEscape(reg.FindStringSubmatch(req.GetInstance().GetName())[1])
}
name := req.GetInstance().GetName()
if locIdx := strings.Index(name, "/locations/"); locIdx != -1 {
start := locIdx + len("/locations/")
end := strings.IndexByte(name[start:], '/')
var location string
if end == -1 {
location = name[start:]
} else {
location = name[start : start+end]
}
if len(location) > 0 {
routingHeadersMap["location"] = url.QueryEscape(location)
}
}
References
  1. On performance-critical hot paths, such as per-RPC attempts, avoid using allocating string manipulation functions like strings.Split if simpler, allocation-free alternatives like strings.LastIndex can be used to extract substrings.

Comment on lines +1209 to +1211
if reg := regexp.MustCompile("projects/[^/]+/locations/(?P<location>[^/]+)(?:/.*)?"); reg.MatchString(req.GetInstance().GetName()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetInstance().GetName())[1])) > 0 {
routingHeadersMap["location"] = url.QueryEscape(reg.FindStringSubmatch(req.GetInstance().GetName())[1])
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Performance Optimization

On performance-critical hot paths, such as per-RPC routing header extraction, we should avoid using expensive regular expressions or allocating string manipulation functions. Instead, we can use simpler, allocation-free alternatives like strings.Index to extract the location substring from the instance name.

This avoids both the regex compilation overhead and the runtime allocations of regex matching.

name := req.GetInstance().GetName()
if locIdx := strings.Index(name, "/locations/"); locIdx != -1 {
	start := locIdx + len("/locations/")
	end := strings.IndexByte(name[start:], '/')
	var location string
	if end == -1 {
		location = name[start:]
	} else {
		location = name[start : start+end]
	}
	if len(location) > 0 {
		routingHeadersMap["location"] = url.QueryEscape(location)
	}
}
References
  1. On performance-critical hot paths, such as per-RPC attempts, avoid using allocating string manipulation functions like strings.Split if simpler, allocation-free alternatives like strings.LastIndex can be used to extract substrings.

@JoeWang1127
JoeWang1127 marked this pull request as ready for review November 9, 2026 19:46
@JoeWang1127
JoeWang1127 requested review from a team as code owners November 9, 2026 19:46
@snippet-bot

snippet-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 31 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@JoeWang1127
JoeWang1127 enabled auto-merge (squash) November 9, 2026 19:46
@JoeWang1127
JoeWang1127 merged commit 3ded070 into main Nov 9, 2026
20 checks passed
@JoeWang1127
JoeWang1127 deleted the feat-update-sources-2026-11-09 branch November 9, 2026 20:15
colinmoy pushed a commit that referenced this pull request Nov 10, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>auth: 0.24.4</summary>

##
[0.24.4](auth/v0.24.3...auth/v0.24.4)
(2026-11-09)


### Bug Fixes

* **auth/grpctransport:** Use TLS for DirectPath over Interconnect
channels
([#20771](#20771))
([39436d1](39436d1))
* **auth:** Use JWT exp claim for ID token expiry
([#20859](#20859))
([726bdb3](726bdb3)),
refs
[#20839](#20839)
</details>

<details><summary>ces: 1.7.0</summary>

##
[1.7.0](ces/v1.6.0...ces/v1.7.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>datamanager: 1.9.0</summary>

##
[1.9.0](datamanager/v1.8.1...datamanager/v1.9.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>dataplex: 1.39.0</summary>

##
[1.39.0](dataplex/v1.38.1...dataplex/v1.39.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>discoveryengine: 1.38.0</summary>

##
[1.38.0](discoveryengine/v1.37.0...discoveryengine/v1.38.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>geminidataanalytics: 1.9.0</summary>

##
[1.9.0](geminidataanalytics/v1.8.0...geminidataanalytics/v1.9.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>hypercomputecluster: 1.4.0</summary>

##
[1.4.0](hypercomputecluster/v1.3.1...hypercomputecluster/v1.4.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>kms: 1.37.0</summary>

##
[1.37.0](kms/v1.36.1...kms/v1.37.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>memorystore: 1.9.0</summary>

##
[1.9.0](memorystore/v1.8.0...memorystore/v1.9.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>networkmanagement: 1.34.0</summary>

##
[1.34.0](networkmanagement/v1.33.0...networkmanagement/v1.34.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>run: 1.25.0</summary>

##
[1.25.0](run/v1.24.1...run/v1.25.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>sql: 0.7.0</summary>

##
[0.7.0](sql/v0.6.0...sql/v0.7.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

<details><summary>vectorsearch: 1.7.0</summary>

##
[1.7.0](vectorsearch/v1.6.1...vectorsearch/v1.7.0)
(2026-11-09)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
shollyman pushed a commit that referenced this pull request Nov 10, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.9.0](pubsub/v2.8.1...pubsub/v2.9.0)
(2026-11-10)


### Features

* Update API sources and regenerate
([#20873](#20873))
([3ded070](3ded070))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址