New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep backups, even when they're old. #2734
Conversation
Recently, we encountered an issue with webpacker removing our previous assets during the webpacker:clean task, and not keeping the specified number of backups. We expected the [behavior from sprockets][sprockets], in which assets are kept if under age or within the count limit. However, webpacker only keeps assets if under age *AND* within the count limit. I think this should work like sprockets and has perhaps been overlooked. [sprockets]: https://github.com/rails/sprockets/blob/358f83ff09a77f69ac17543a9b1d127737060f00/lib/sprockets/manifest.rb#L258-L259
thank you 🍰 |
Recently, we encountered an issue with webpacker removing our previous assets during the webpacker:clean task, and not keeping the specified number of backups. We expected the [behavior from sprockets][sprockets], in which assets are kept if under age or within the count limit. However, webpacker only keeps assets if under age *AND* within the count limit. I think this should work like sprockets and has perhaps been overlooked. [sprockets]: https://github.com/rails/sprockets/blob/358f83ff09a77f69ac17543a9b1d127737060f00/lib/sprockets/manifest.rb#L258-L259
Recently, we encountered an issue with webpacker removing our previous assets during the webpacker:clean task, and not keeping the specified number of backups. We expected the [behavior from sprockets][sprockets], in which assets are kept if under age or within the count limit. However, webpacker only keeps assets if under age *AND* within the count limit. I think this should work like sprockets and has perhaps been overlooked. [sprockets]: https://github.com/rails/sprockets/blob/358f83ff09a77f69ac17543a9b1d127737060f00/lib/sprockets/manifest.rb#L258-L259
@gauravtiwari Can you point me to any docs on releasing webpacker updates? I'd love to help backport this bugfix to 5.X.X, as we're currently using a custom fork to get this fix, and cut a release! |
@gauravtiwari @Pezmc +1. We just encountered this issue as well and it caused lots of missing assets on our prod env. I'd really like to see it back-ported to 5.X.X as well. |
+1 to backporting this to 5.x! we were bitten by this issue in production today! |
Recently, we encountered an issue with webpacker removing our previous assets during the webpacker:clean task, and not keeping the specified number of backups. We expected the [behavior from sprockets][sprockets], in which assets are kept if under age or within the count limit. However, webpacker only keeps assets if under age *AND* within the count limit. I think this should work like sprockets and has perhaps been overlooked. [sprockets]: https://github.com/rails/sprockets/blob/358f83ff09a77f69ac17543a9b1d127737060f00/lib/sprockets/manifest.rb#L258-L259
It turns out our issue was a bit different than this. This issue certainly didn't help us, but wasn't the root cause of our issues. I've created a GH issue over at #2913 describing what we ran into. |
Recently, we encountered an issue with webpacker removing our previous assets during the webpacker:clean task, and not keeping the specified number of backups. We expected the [behavior from sprockets][sprockets], in which assets are kept if under age or within the count limit. However, webpacker only keeps assets if under age *AND* within the count limit. I think this should work like sprockets and has perhaps been overlooked. [sprockets]: https://github.com/rails/sprockets/blob/358f83ff09a77f69ac17543a9b1d127737060f00/lib/sprockets/manifest.rb#L258-L259 Backport-PR-URL: #2912 Co-authored-by: Brad Dunbar <dunbarb2@gmail.com>
Recently, we encountered an issue with webpacker removing our previous assets during the webpacker:clean task, and not keeping the specified number of backups. We expected the behavior from sprockets, in which assets are kept if under age or within the count limit. However, webpacker only keeps assets if under age AND within the count limit.
I think this should work like sprockets and has perhaps been overlooked.