this post was submitted on 16 Apr 2025
700 points (99.4% liked)

Programmer Humor

22690 readers
978 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] JackbyDev@programming.dev 4 points 5 days ago (1 children)

Had a similar thing once. Some how, some way, the DBA copied and pasted something wrong. Oracle DB had some odd extra syntax for left and right joins that other DBs didn't (or at least that I'd never seen). My best guess is that he auto formatted out of habit and maybe it took those symbols out.

It took a long time to find that. Because the only evidence something was wrong was that ONE of our customers wasn't being billed for ONE product. Everyone else was fine. Basically they were using it in a very atypical way. The left joins made sure to include them in the billing even because they didn't have whatever was on the right of that join. Everyone else did.

[–] wise_pancake@lemmy.ca 2 points 4 days ago* (last edited 4 days ago)

SQL auto format is still mostly terrible

The only half decent format is to start from the Mozilla style and then make it more sane.

I’ve been playing with sqlglot lately and want to start using it for diffs.