thewca / worldcubeassociation.org

All of the code that runs on worldcubeassociation.org
https://www.worldcubeassociation.org/
GNU General Public License v3.0
332 stars 176 forks source link

Deploying does not always compile packs appropriately #5370

Open viroulep opened 4 years ago

viroulep commented 4 years ago

We rebuild our assets with bundle exec rake assets:clean assets:precompile. While it usually appropriately detects what has changed and what to rebuild, I just encountered that weird behavior:

++ bundle exec rake assets:clean assets:precompile
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/0-28d3442684126a279e3b.chunk.js.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/1-8644b3061279baf7c93d.chunk.js.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/1-8644b3061279baf7c93d.chunk.js.LICENSE.txt
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/2-9163c64a7f5a0f13eac2.chunk.js.map.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/0-28d3442684126a279e3b.chunk.js.map
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/20-9b77832de99bb5b4076e.chunk.js.map
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/1-8644b3061279baf7c93d.chunk.js.map.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/1-8644b3061279baf7c93d.chunk.js.map.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/1-8644b3061279baf7c93d.chunk.js
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/1-8644b3061279baf7c93d.chunk.js.map
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/19-062d1850aa70c09c1fe4.chunk.js.LICENSE.txt
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/2-9163c64a7f5a0f13eac2.chunk.js.map.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/20-9b77832de99bb5b4076e.chunk.js
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/19-062d1850aa70c09c1fe4.chunk.js.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/19-062d1850aa70c09c1fe4.chunk.js
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/0-28d3442684126a279e3b.chunk.js.map.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/20-9b77832de99bb5b4076e.chunk.js.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/20-9b77832de99bb5b4076e.chunk.js.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/19-062d1850aa70c09c1fe4.chunk.js.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/0-28d3442684126a279e3b.chunk.js.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/19-062d1850aa70c09c1fe4.chunk.js.map.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/2-9163c64a7f5a0f13eac2.chunk.js.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/2-9163c64a7f5a0f13eac2.chunk.js.map
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/1-8644b3061279baf7c93d.chunk.js.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/19-062d1850aa70c09c1fe4.chunk.js.map.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/0-28d3442684126a279e3b.chunk.js
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/19-062d1850aa70c09c1fe4.chunk.js.map
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/20-9b77832de99bb5b4076e.chunk.js.map.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/0-28d3442684126a279e3b.chunk.js.map.br
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/2-9163c64a7f5a0f13eac2.chunk.js.gz
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/2-9163c64a7f5a0f13eac2.chunk.js
Removed /home/cubing/worldcubeassociation.org/WcaOnRails/public/packs/js/20-9b77832de99bb5b4076e.chunk.js.map.gz
yarn install v1.22.4
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 1.41s.
Everything's up-to-date. Nothing to do

But it turns out these js packs were the actual used packs, and they didn't get compiled appropriately... I had to manually remove the public/packs directory to trigger a rebuild.

viroulep commented 4 years ago

Maybe somehow related to https://github.com/rails/webpacker/issues/2049?

viroulep commented 4 years ago

Just noticed that the chunks are being removed, not the full entry points!