243
DO NOT TOUCH (lemmy.world)
submitted 1 year ago* (last edited 1 year ago) by devil_d0c@lemmy.world to c/programminghumor@lemmy.world

Edit: so im done with my preliminary research into this codebase.

Our corporate SSO provider is changing, so I've been updating our tools to take advantage of the new badges. I found this in a web application that I started on today. The original developer is long gone, and according to our PaaS, this app has been running for just under 3 years without an update.

There is no CI/CD, blue-green deployment, or back ups. The database is an H2 db with ddl-auto set to create-drop on startup, meaning that this database will delete itself if the app is restaged but thanks to this guys code, it won't populate itself. ๐Ÿคท

top 39 comments
sorted by: hot top controversial new old
[-] Semi-Hemi-Demigod@kbin.social 57 points 1 year ago

Dropping the database is not recoverable

This is the real problem

[-] alnilam@lemmy.world 16 points 1 year ago

I sure hope they can recover from last night's backup. Right?

[-] kogasa@programming.dev 21 points 1 year ago

Recovering a database from a backup is often possible but often a pain in the ass, and depending on the application you may not consider it acceptable to lose a day of data

[-] tdawg@lemmy.world 2 points 1 year ago

Then you need more frequent backups and possibly even live failovers imo

[-] kogasa@programming.dev 2 points 1 year ago

Yeah, of course you want restoring from backups to be as easy as possible. It's just sometimes not feasible, usually because someone can't afford the time or equipment to set it up.

[-] sci@feddit.nl 11 points 1 year ago

that's assuming they tested the backup system

[-] alnilam@lemmy.world 8 points 1 year ago

Ohh, valid point. So many organisations not testing their restore procedures.

[-] sci@feddit.nl 8 points 1 year ago* (last edited 1 year ago)

At one of the businesses I worked at, the backup was very slow, and at some point the daily backup started taking more than 24 hours. You can probably guess what happened after that.

[-] smashboy@kbin.social 4 points 1 year ago

Hold on I have to go check something

[-] devil_d0c@lemmy.world 6 points 1 year ago

๐Ÿ‘ƒ๐Ÿ‘ˆ

According to the documentation for the app, they got it classified as a shop aid tool, thereby circumventing production requirements.

The whole app is written like some college kids hello world mvc app

[-] Hawke@lemmy.world 5 points 1 year ago

[mis-]classified as a shop aid tool

a college kids hello world app

This hits way too close to home.

[-] devil_d0c@lemmy.world 5 points 1 year ago

This job pays sooo well though, so I just do what I can and try to speak up when appropriate. They never take my advice, but I have a long list of cya emails for when it all goes tits up ๐Ÿค™

[-] devil_d0c@lemmy.world 54 points 1 year ago

Found this in production while migrating SSO providers. Made me chuckle ๐Ÿ™ƒ

[-] yamsham@lemm.ee 40 points 1 year ago* (last edited 1 year ago)

DO NOT RUN IN PROD

Found this in production

Classic

[-] devil_d0c@lemmy.world 10 points 1 year ago

When I sat down today I thought I was just going to be updating some properties file with oauth end points.

This is so blatantly stupid that I now have to pick through the code base and write up a change request and incident avoidance report ๐Ÿ˜•

[-] RvTV95XBeo@sh.itjust.works 7 points 1 year ago

Actually, this code is also used in their side business manufacturing cattle prods, that line must be excluded from the prods or else they may become sentient and form a cattle prod based skynet.

[-] yukichigai@lemmy.world 6 points 1 year ago

Only thing better is finding commented out code below that which would actually prevent it from running in Prod. Bonus if there's a code comment next to it saying "disabled per email" with no further explanation.

[-] shukufuku@lemmy.ml 32 points 1 year ago

You wonder why spaceships have self-destruct option?

[-] dojan@lemmy.world 5 points 1 year ago

Your comment is a blessing.

[-] AlexWIWA@lemmy.ml 6 points 1 year ago

I'm stealing this. This is a fantastic way to say a comment was good.

[-] dojan@lemmy.world 4 points 1 year ago

Haha, feel free to! It's actually a bit of a joke, since the person's username is shukufuku, ็ฅ็ฆ, meaning blessing or celebration.

[-] Synthead@lemmy.world 31 points 1 year ago

Good Lord, this makes my hands sweaty. Why is your entire prod database leaning on one line of code that's prone to human error? There should be 20 extra accidental steps taken to do something like this.

[-] mathemachristian@lemm.ee 24 points 1 year ago

Look, if you hold the lever tight you can safely put the pin back in the grenade!

[-] Synthead@lemmy.world 10 points 1 year ago* (last edited 1 year ago)

^C^C^C^C^C^C

[-] sci@feddit.nl 12 points 1 year ago

what do you mean? there's 20 lines of comments warning about it!

[-] devil_d0c@lemmy.world 4 points 1 year ago

Turns out we were always one copy paste error from a major incident.

Don't worry, I'm fixing it ๐Ÿคท

[-] MajorHavoc@lemmy.world 1 points 1 year ago

Heh. That looks like it has decent odds of being a "company ending event" incident, to be specific.

But at least there's lots of comments. And maybe someone already put a safety net in somewhere else and just forgot to update the 20 comments. It could happen.

[-] devil_d0c@lemmy.world 1 points 1 year ago

Under different circumstances, sure. As it is, worst they could expect is a fine from our regulators for data retention hits. We could recreate the info easily enough if our suppliers played nicely.

[-] zikk_transport2@lemmy.world 11 points 1 year ago

I usually tend to leave "written by ChatGPT" so colleagues can feed it back and ask to explain lol.

[-] DukeMcAwesome@lemmy.world 9 points 1 year ago

This also implies that their only persistent environment is production. No dev. No QA.

[-] Mewtwo 5 points 1 year ago

The Tesla model.

[-] devil_d0c@lemmy.world 5 points 1 year ago

๐Ÿ‘ƒ๐Ÿ‘ˆ ding ding ding!

Dev pushed drop and recreate the dB each time.

And there is no QA, don't be silly.

[-] MajorHavoc@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

That would be silly. Why pay for QA staff when we can spend customer good-will instead?

Edit: Sorry, I've worked with this kind of stupid so long, I can hear the logic in my bones. The only target that matters is this upcoming quarterly report. The quarterly report after that happens to future me, and he's never done anything for me.

[-] THE_STORM_BLADE@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

What's with lemmy and beans? /s

How are you finding Spring?

[-] devil_d0c@lemmy.world 2 points 1 year ago

I don't hate it. The docs are good and it's very opinionated, which I appreciate. Makes it easier to divy up the work into chunks management can digest.

I wouldn't use it for a personal project though.

[-] devil_d0c@lemmy.world 1 points 1 year ago

Underrated comment here lol

[-] dgendreau@lemmy.world 2 points 1 year ago* (last edited 1 year ago)
[-] devil_d0c@lemmy.world 1 points 1 year ago

You get a side effect! You get a side effect! You all get siiiide effffects!!!

load more comments
view more: next โ€บ
this post was submitted on 27 Jul 2023
243 points (100.0% liked)

Programming Humor

2615 readers
1 users here now

Related Communities !programmerhumor@lemmy.ml !programmer_humor@programming.dev !programmerhumor@kbin.social !programming_horror@programming.dev

Other Programming Communities !programming@beehaw.org !programming@programming.dev !programming@lemmy.ml !programming@kbin.social !learn_programming@programming.dev !functional_programming@programming.dev !embedded_prog@lemmy.ml

founded 1 year ago
MODERATORS