You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
Repository navigation
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
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.
Reacted by Pablo Sáez, Francis George, Andrew Dassonville and Pascal M
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.
Reacted by Mark Claus Nunes, Noah Allen, Andrew Dassonville, Sebastian and Daniel Steele
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.
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.
Activity
sfcgeorge commentedon May 26, 2022
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.
perzeuss commentedon Feb 16, 2023
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.
noahtallen commentedon Feb 16, 2023
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.
lforst commentedon May 22, 2023
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
errorHandleroption. 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.