sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Sentry wrapped function tries to delete my google cloud functions.

Open InputNeuron opened this issue 6 years ago • 0 comments

  • [x] Review the documentation: https://docs.sentry.io/
  • [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
  • [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases
  • [x] Provide a link to the affected event from your Sentry account

Package + Version

  • [ ] @sentry/browser

  • [ ] @sentry/node

  • [ ] raven-js

  • [ ] raven-node (raven for node)

  • [x] other:

    "@google-cloud/functions-framework": "=1.7.1", "@sentry/serverless": "=5.27.2", "@types/aws-lambda": "=8.10.64"

Version:

5.27.2

Description

We're on GCP and deploying cloud functions to Firebase ...

When we deploy GCP tries to delete our functions:

The following functions are found in your project but do not exist in your local source code:
        StripeWebhook(us-central1)
        StripeWebhookTest(us-central1)

Our sentry wrapper function looks like this:

export namespace SentryFunctions {

    export function wrapHttpFunction(delegate: HttpFunction) {
        return Sentry.GCPFunction.wrapHttpFunction(delegate);
    }
}

... I think what's happening here is that , for some reason, your function is returning void, null, or undefined?

The code works just fine without this sentry wrapper.

I'm calling it like this

    return SentryFunctions.wrapHttpFunction(functions.https.onRequest(createApp(mode)));

If I call it like:

    return functions.https.onRequest(createApp(mode));

... then it works just fine.

Obviously we can't deploy like this and this is a pretty big bug.

I can try to deploy this way with our other functions but each deploy takes about 20-30 minutes.

InputNeuron avatar Nov 02 '20 16:11 InputNeuron