Apostrophe CMS Main Site Forum Home

Minificaton freezes after failed deploy

I made a mistake in a commit, not including a semi-colon after a CSS instruction, and it blew up my deploy. So, I fixed the mistake and have been trying to redeploy.

However, apostrophe:generation --all-sites now hangs indefinitely. What can I do to safely “clear the cache” of previous generations without costing myself any site customizations (images, css, etc.)?

Adding some error logs I have discovered that the issue relates to the lock logic throwing a duplicate error in afterAttempt. The same logic of course works for other sites. What in the state of the database could cause this?

Thanks

Was able to get this solved.

Good to know! In future a how-to or bug question like this is better posted to stackoverflow (tagged apostrophe-cms), or shared on chat.apostrophecms.org.

Going to write up a github issue about this actually. The gist is: if a deploy fails because of a LESS file issue, you’re stuck in limbo and need to comment-out some of the logic in withLock to get yourself going again. This unquestionably has to do with what we are discussing via email as well.

Gotcha. Bug reports to github make sense too of course.

I think you’re suggesting the deploy process got stuck somehow and never exited, thus never released the lock? Apostrophe should time the lock out automatically rather quickly if it’s just exiting prematurely without explicitly releasing it.

Yep, stuck and never exited. The logic of lock and withLock appeared that way to me too. If I remember correctly it just involved momentarily commenting out the if statement here or here to force the site to unlock. Ran minification again directly on the site in question, and boom, fixed. Then, obviously reinserting that logic.