Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

Plugin should not fail when Sentry has an outage #379

Closed

Description

@noahtallen

Environment

Sentry SaaS

Steps to Reproduce

When Sentry has an outage, the webpack build will fail.

Expected Result

A sentry SaaS outage should not prevent me from completing and deploying my builds.

Actual Result

ERROR in Sentry CLI Plugin: Command failed: /node_modules/@sentry/cli/sentry-cli releases finalize calypso_53d73fa7a357b4f174ada69229ac1ab636217cbf
 error: API request failed
   caused by: sentry reported an error: unknown error (http status: 503)

webpack compiled with 1 error

I think it's pretty clear that an outage at Sentry shouldn't also cause an outage in a consumer's CD system. However, this is exactly what happens when using the Sentry webpack plugin. With two outages in the past week or two, this is unfortunate behavior! I do understand that there are some other considerations. For example, what if you just couldn't connect to Sentry whatsoever, with no outage happening? It might be hard to differentiate against that scenario.

Activity

  1. sfcgeorge commented on May 26, 2022

    @sfcgeorge

    This has caused deployments to fail for us, not great.

    I see tracking releases in Sentry as a very auxiliary "nice to have" kind of thing, not essential at all so I'm quite happy for it to just suppress failures — wrap the whole thing in a try catch.

    I guess it could be configurable but I doubt many people would want a broken Sentry to break their builds.

  2. perzeuss commented on Feb 16, 2023

    @perzeuss

    This is a problem for us too. It looks like we can handle this by overwriting the errorHandler as described here https://github.com/getsentry/sentry-webpack-plugin/blob/master/README.md?plain=1#L91

    I did not test it yet, but I think this is the solution and the issue can be closed.

  3. noahtallen commented on Feb 16, 2023

    @noahtallen
    Author

    I disagree -- I think breaking consumer's builds is really poor default behavior. We have successfully used the error handler to avoid the problem, but any new user to the library won't expect to have to do anything. This tool is designed to run for production builds, and should respect that.

  4. lforst commented on May 22, 2023

    @lforst
    Contributor

    Hey, long overdue update here: We decided that the plugin should still crash, however, there should be an escape hatch. This escape hatch is the errorHandler option. If you are sensitive to your builds going through no matter what the status of Sentry is like, even at the cost of potentially missing source maps, I recommend setting this option.

    Hope this makes sense. I am closing this for now. Feel free to share more thoughts and feedback as needed. We can always reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions