Skip to content

[BUG] in sample: stripe (FUNCTION_NAME) #909

Open
@deremer

Description

@deremer

Which sample has a bug?

Create Stripe customers and charge them on Firestore write

How to reproduce the issue

  1. Deploy code with node runtime later than node 8
  2. Execute code in a manner that will log an error
  3. Observe that "FUNCTION_NAME" will be undefined

Why? Because once cloud functions moved beyond Node 8, the environment variables that are exposed changed. This should now be FUNCTION_TARGET as defined here: https://cloud.google.com/functions/docs/configuring/env-var#newer_runtimes

Debug output

Screenshots

image

Expected behavior

Expect the cloud function name to be shown, but FUNCTION_NAME is not a valid env var after node 8.

Actual behavior

The name of the cloud function is undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions