Skip to content

Update IsGoogleCloudServerless function to check for Cloud Run Worker Pools - #9226

Open
kcolton-jpg wants to merge 2 commits into
googleapis:mainfrom
kcolton-jpg:patch-2
Open

Update IsGoogleCloudServerless function to check for Cloud Run Worker Pools#9226
kcolton-jpg wants to merge 2 commits into
googleapis:mainfrom
kcolton-jpg:patch-2

Conversation

@kcolton-jpg

Copy link
Copy Markdown

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • [ X ] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • [X ] Ensure the tests and linter pass
  • [ X] Code coverage does not decrease (if any source code was changed)
  • [ X] Appropriate docs were updated (if necessary)

Fixes ##9225 🦕

…rmining if the environment is GCP Serverless

Update the function for determining whether a environment is GCP Serverless to include K_CLOUD_RUN_WORKER_POOLS.
@kcolton-jpg
kcolton-jpg requested a review from a team as a code owner August 28, 2026 21:38
@github-actions
github-actions Bot requested a review from westarle August 28, 2026 21:39

@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 updates the isGoogleCloudServerless detection logic to include the CLOUD_RUN_WORKER_POOL environment variable, along with its corresponding JSDoc documentation. The review feedback correctly identifies an invalid internal URL in the newly added documentation and suggests replacing it with the correct public Google Cloud documentation link.

*
* `CLOUD_RUN_WORKER_POOL` is used in Cloud Run and newer Cloud Functions environments:
* - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
* - See {@link http://cloud/run/docs/deploy-worker-pools Deploy Worker Pools to Cloud Run}.

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

The URL http://cloud/run/docs/deploy-worker-pools is invalid and appears to be a typo or an internal link. It should be updated to the public documentation URL: https://cloud.google.com/run/docs/deploy-worker-pools.

Suggested change
* - See {@link http://cloud/run/docs/deploy-worker-pools Deploy Worker Pools to Cloud Run}.
* - See {@link https://cloud.google.com/run/docs/deploy-worker-pools Deploy Worker Pools to Cloud Run}.

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.

1 participant