r/ProgrammerHumor • • Oct 06 '26

Advanced abideTheRulesIncidentCanWait

Post image
806 Upvotes

56 comments sorted by

View all comments

Show parent comment

112

u/shnutzer Oct 06 '26

I'm exaggerating of course, but even if the whole pipeline worked perfectly then all of the steps take a good 30-60 minutes to run if not longer

So if you have an absolutely critical hotfix that must be deployed at 3am you may choose to skip the process at your own risk

Of course we don't just ignore them for normal deployments

42

u/auxiliary-username Oct 06 '26

I’ve done the same many times. But having a sleepy solo dev going off-script and inventing new deployment procedures at 3am always seems like a great way to turn an emergency into a catastrophe.

25

u/devrelm Oct 06 '26

Who said anything about inventing new deployment procedures at 3am?

The hotfix pipeline is something you create when creating your standard deploy pipeline — or at least once the standard pipeline starts taking longer than your team is comfortable deploying hotfixes with.

In case of emergency, there should always be a separate hotfix pipeline that is streamlined to your team's process and aversion to risk. It may or may not include a deploy to your staging environment, but should likely skip dev. It should run the whole test suite, but that can be skipped or trimmed to a subset of the tests if your team values delivering a fix quickly over ensuring that regressions aren't introduced (you may justify it by the fact that the full test suite will be run once the hotfix is merged back into the main branch.) In any case, there should be enough auditing in place to ensure that 1: it's obvious to the whole team that a hotfix happened (to avoid malicious actors; this can be as easy as a Slack message on a public channel) and 2: that it's easy to figure out who performed the hotfix, when, and what was in the hotfix (for accountability & post-mortem tracking.)

15

u/mriforgot Oct 06 '26

At an old company of mine we had an Essential pipeline that ran a minimum of what were deemed absolutely critical tests and could deploy in under 20 minutes while the full suite ran in parallel. It made getting hotfixes out quick while also making sure that the full test suite wasn't just getting ignored.

8

u/shnutzer Oct 06 '26

Ideally you don't have to invent and there's a battle tested side-deployment path ready for you, but I won't cast any stones as I am not free of this sin myself

2

u/ITaggie Oct 06 '26

turn an emergency into a catastrophe

Surely you at least have backups... right?

4

u/Zeikos Oct 06 '26

I understand, but I prefer to fix the process rather than find ways to circumvent it.

30

u/WhenInDoubt_Kamoulox Oct 06 '26

Both, you do both.

You do the quick patch at 3am, then you go and fix the pipeline when you show up at work.

15

u/DeepDuh Oct 06 '26

you two are like this bell curve meme....

1

u/conundorum Oct 06 '26

This is the fix. You run the patch through the hotfix pipeline to keep everything alive long enough for the main line to finish pre-deployment testing. If everything is good, then the main line does everything except deployment (since the patch is already deployed); if something fails, then you know that the "hotfix" is a moth-eaten rag trying to plug a hole in the dam, and work on making a better fix before it bursts for real.