Clean updates of Lucee 7

Historically, we’ve found when updating the version of Lucee it’s better to clear a number of the lucee-server folders and just let it rebuild things on first start. We just found it avoided some corner case issues and gave us the closest to a “fresh” install. This is all part of our provisioning shell scripts.

In examining the changes from Lucee 5 to 7, it looks like we might want to purge the following folders when updating Lucee with a new JAR:

  • server/lucee-server/context/cache/
  • server/lucee-server/context/cfclasses/
  • server/lucee-server/context/dynclasses/
  • server/lucee-server/context/mvn/cache/
  • server/lucee-server/context/temp/
  • server/lucee-server/patches/
  • server/lucee-server/felix-cache/

Does this look right?

I realize that purging something like the mvn/cache folder could lead to new JARs being downloaded, but sort of files like that should probably happen anyway to be on the safe side (because sometimes when updating Lucee, we’re also updating the Java version, etc).

Does this still seem like the best safe practice? Are there any changes I should make?

Maybe @Zackster or @micstriit have input?

The felix-cache is the only one I purge, which is automatically regenerated / populated on startup

There’s a slight bug relating to that with updates, but otherwise Lucee self manages everything

cfclasses only needs a purge if we made a bytecode change

For our Lucee 5 provisioning scripts, I was purging these folders on updates:

And that’s always worked solidly. I can’t recall the exact reason we ended up purging all of these folders (other than server/lucee-server/felix-cache/), but I know I was running into issues every once and a while with weird side effects after updating.

All of these folders should get automatically rebuilt thought, right?

It would just seem to me that if we have updated our JDK, blowing these folders out would be useful to make sure everything re-compiles with the latest JDK. Even if Lucee should be handling things under the hood, bugs happen, so I’d rather start with as clean as slate as possible after updating.

The cost of Lucee having to rebuild stuff that maybe isn’t necessary, is a one time hit that is worth paying for to ensure you’re not dealing with some very weird corner case issues that ends up becoming terribly hard to track down. It also just confirms that every environment should be at the same place once Lucee starts up.

Thoughts?

Honestly, rather than all this dancing around, I’d be moving to a fresh deploy / provisioning each time?

Docker is great for this

7 deploys even quicker than 6 and builds / deployments should be reproducible