Skip to content
Merged
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 @@
* `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}.
Comment thread
quirogas marked this conversation as resolved.
*/
const isGFEnvironment =
process.env.CLOUD_RUN_JOB ||
process.env.FUNCTION_NAME ||
process.env.K_SERVICE;
process.env.K_SERVICE ||

Check failure on line 58 in core/packages/gcp-metadata/src/gcp-residency.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed

Check failure on line 58 in core/packages/gcp-metadata/src/gcp-residency.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
process.env.CLOUD_RUN_WORKER_POOL;

return !!isGFEnvironment;
}
Expand Down
Loading