Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion core/packages/gcp-metadata/src/gcp-residency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ export function isGoogleCloudServerless(): boolean {
* `K_SERVICE` 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 https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}.
*
* `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}.

*/
const isGFEnvironment =
process.env.CLOUD_RUN_JOB ||
process.env.FUNCTION_NAME ||
process.env.K_SERVICE;
process.env.K_SERVICE ||
process.env.CLOUD_RUN_WORKER_POOL;

return !!isGFEnvironment;
}
Expand Down
Loading