So I've got a service, let's call it serviceA. It needs a db, db. The db has to receive migrations (run within a different container containerB) then serviceA can start, finally (before serviceA (a.k.a. temporal server) can be used for doing servicy things) we have to run a final setup step on the db (using containerB again). Then we are able to start (and deliver) serviceC (a.k.a temporal ui).
- start
db(withCacheVolume) - exec migrations with
containerB - start
serviceA - exec namespace creation with
containerB - start
serviceC(with binding toserviceA
This all seems to work fine when starting from absolute scratch. If, after seeing it all work, I clear the dagger cache and restart then it goes completely haywire; the migrations never run in containerB. However, if I clear the dagger cache, stop dagger, and do docker system prune -af and then restart the stack it works fine.
So I'm inferring that the the CacheVolume is cleared when clearing the dagger cache, but it seems that the other stuff which is cached (like the execution of the function that execs the migrations, e.g. the equivalent of a docker image layer) does not get cleared. Does that seem right?
Claude tells me that I should mount the CacheVolume in containerB so that when the cache is cleared the migration function will run again, that seems like a hallucination to me. Is that the right way to manage clearing "layers"?