So today I discovered that there’s a cron job that holds non-reproducible state that died, and now our system is fucked.
The cron job doesn’t live inside any source control. This morning it entered a terminal state, and because it overwrites its state there’s no way to revert it.
I’m currently waiting for the database rollback and have rewritten it in a reproducible/idempotent way.
Idempotent code/repositories are great - I love making everything as reproducible as possible. Particularly in make where every ‘all’ type command should have a corresponding ‘clean’ command. Many times I’ll see code bases where they skip defining the ‘clean’ command… or worse, have no ‘all’ command to begin with and rely on the developer knowing all the build and environment setup commands…
Yeah, I don’t consider most code complete unless it’s safe and reproducible. I love make, currently using npm but you can set up scripts with it. Automating the build process was the very first thing I did.
This project is a piece of work. There’s effectively no documentation, and every now and then I find something new like this. The stuff I’ve fixed up so far has been much much more reliable and performant.
Part of me just wants to rewrite the whole thing, but I need to ship features so we can sell the product and pay my salary.
At least I’m not a cog in a huge corporation getting my soul crushed every day. I actually love fixing weird stuff.
since you are currently using npm, check out pnpm
also “just” seems to be a more modern replacement for make
I’ll check out both, thanks!