Closed Pierre-Do closed 3 years ago
@Pierre-Do great writeup! Yes, please submit a PR. 🙏 It might be useful to make the batch number configurable, like retries
. I'm not sure what name would make the most sense for the config option—maybe workerCount
?
@ParamagicDev I wonder if this could help with #276
@Pierre-Do great writeup! Yes, please submit a PR. pray It might be useful to make the batch number configurable, like
retries
. I'm not sure what name would make the most sense for the config option—maybeworkerCount
?
Thanks for your feedback @joshuap. workerCount
sounds good to me, it would indeed by great to configure that. I've tried with 3 in my fork, but I feel we could safely default to 5.
I'll drop a PR as soon as I figure a way to write some pertinent tests! Probably early next week.
Suggested pull request: https://github.com/honeybadger-io/honeybadger-webpack/pull/300
What are the steps to reproduce this issue?
What happens?
From time to time (once every 5 builds, give or take), the Webpack build is hanging (nothing's happening) or
socket hang up
when uploading the source-maps.What were you expecting to happen?
Source-maps being uploaded consistently
Any logs, error output, etc?
None, the build appears stuck
Any other comments?
These kind of issues are difficult to debug. However, I believe it might be related to this: https://github.com/honeybadger-io/honeybadger-webpack/blob/master/src/HoneybadgerSourceMapPlugin.js#L191
Since 1.3.0, the source-maps are uploaded using
fetchRetry
, in a promise. As shown above, all promises for all source-maps are created at the same time, hence uploading every file at roughly the same time. This isn't an issue for small projects, but my team has been experiencing some issues on with main project (200+ source-maps).One solution could be to upload each file one after the other. This would however be a performance drag. I suggest to have a compromise and upload files 3 or 5 at the time with the following solution: https://github.com/qoqa/honeybadger-webpack/commit/0078ee289937ea3aa37a437216cf072749a72e80
We've been running this fork with the fix linked above. After a week of using this version, we haven't seen any build hanging anymore.
I'm happy to make a PR with this fix to this repo if you deem the solution viable for a broader audience.
What versions are you using?
Operating System: Docker image (ruby-2.7.2-buster) Package Version: 1.3.0 Node Version: 14