Repository navigation
fix(gcp-metadata): support CLOUD_RUN_WORKER_POOL residency detection and harden isAvailable error unwrapping - #9349
Merged
Conversation
8 tasks done
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the GCP metadata package to improve error handling and environment detection. Specifically, it handles abort and timeout errors by mapping them to 'ETIMEDOUT', extracts nested error codes from err.error, and formats unexpected error codes more clearly in warnings. Additionally, it updates documentation and adds test coverage for the CLOUD_RUN_WORKER_POOL environment variable. No review comments were provided, so there is no additional feedback.
… Cloud Run Worker Pools
quirogas
force-pushed
the
fix-gcp-metadata-worker-pool
branch
from
September 16, 2026 00:02
26a4380 to
e832159
Compare
…rve exact public API surface
quirogas
marked this pull request as ready for review
September 16, 2026 14:49
quirogas
enabled auto-merge (squash)
September 16, 2026 14:52
danieljbruce
approved these changes
Sep 16, 2026
Merged
danieljbruce
pushed a commit
that referenced
this pull request
Sep 16, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>gcp-metadata: 9.0.4</summary> ## [9.0.4](gcp-metadata-v9.0.3...gcp-metadata-v9.0.4) (2026-09-16) ### Bug Fixes * **gcp-metadata:** Support CLOUD_RUN_WORKER_POOL residency detection and harden isAvailable error unwrapping ([#9349](#9349)) ([10b654f](10b654f)) * Update IsGoogleCloudServerless function to check for Cloud Run Worker Pools ([#9226](#9226)) ([e0ff8c5](e0ff8c5)) </details> <details><summary>apptopology: 0.3.0</summary> ## [0.3.0](apptopology-v0.2.0...apptopology-v0.3.0) (2026-09-16) ### ⚠ BREAKING CHANGES * upgrade minimum Node.js version to 22 ([#9357](#9357)) ### Features * Upgrade minimum Node.js version to 22 ([#9357](#9357)) ([d2e6a23](d2e6a23)) </details> <details><summary>ftp: 0.3.0</summary> ## [0.3.0](ftp-v0.2.0...ftp-v0.3.0) (2026-09-16) ### ⚠ BREAKING CHANGES * upgrade minimum Node.js version to 22 ([#9357](#9357)) ### Features * Upgrade minimum Node.js version to 22 ([#9357](#9357)) ([d2e6a23](d2e6a23)) </details> <details><summary>tasks: 7.1.1</summary> ## [7.1.1](tasks-v7.1.0...tasks-v7.1.1) (2026-09-16) ### Bug Fixes * Remove unintentionally added file ([#9356](#9356)) ([99f6657](99f6657)) </details> <details><summary>workloadidentity: 0.3.0</summary> ## [0.3.0](workloadidentity-v0.2.0...workloadidentity-v0.3.0) (2026-09-16) ### ⚠ BREAKING CHANGES * upgrade minimum Node.js version to 22 ([#9357](#9357)) ### Features * Upgrade minimum Node.js version to 22 ([#9357](#9357)) ([d2e6a23](d2e6a23)) </details> <details><summary>loyaltycustomers: 0.3.0</summary> ## [0.3.0](loyaltycustomers-v0.2.0...loyaltycustomers-v0.3.0) (2026-09-16) ### ⚠ BREAKING CHANGES * upgrade minimum Node.js version to 22 ([#9357](#9357)) ### Features * Upgrade minimum Node.js version to 22 ([#9357](#9357)) ([d2e6a23](d2e6a23)) </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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #9226 (Fixes #9225).
Summary of Changes
src/gcp-residency.ts:process.env.K_SERVICE ||that causedpresubmit/lint(prettier/prettier&no-trailing-spaces) to fail in chore: update IsGoogleCloudServerless function to check for Cloud Run Worker Pools #9226.http://cloud/run/docs/deploy-worker-poolslink with the public Google Cloud documentation URL (https://cloud.google.com/run/docs/deploy-worker-pools) and clarifies thatCLOUD_RUN_WORKER_POOLapplies to Cloud Run Worker Pools.AggregateErrorandAbortErrorCodes insrc/index.ts:AbortError/aborted/request-timeouttoETIMEDOUTingetErrorCodes().Array.from(new Set(codes)).join(', ')) instead of defaulting to'UNKNOWN'when emittingMetadataLookupWarningforAggregateError(whenPromise.anyrejects).delete customEnv.CLOUD_RUN_WORKER_POOL;toremoveServerlessEnvironmentVariables()intest/utils/gcp-residency.ts.CLOUD_RUN_WORKER_POOLintest/gcp-residency.test.ts.AggregateErrorcode unwrapping inMetadataLookupWarningintest/index.test.ts.