One real issue of such kind I remember "birthday congratulations suddenly stopped working to users on new year night!"
my lead was on duty and he spent 2 hours figuring out that "birthday" was non-nullable column, historically, and users who haven't set birhtday date had "1970-01-01" by default and get congratulated on January 1 (millions of them - it was "Tango" messenger by then)
So someone clever just hardcoded "if date is Jan 1st then return" in congratulations sending logic. Years ago.
well, though some people would say it is still ugly, this approach is at least much more "targeted" and is much simpler than modifying column nullability in prod db :) so I second this
Yeah, but then you need to justify why the birthday check requires access to the year. Skipping 1st Jan for one year may have been a safer decision than accessing private data on a hotheaded decision.
Gives a year for a server-side fix of the column, or at least provide some privacy-focused alternative.
(If the column isn't nullable, maybe a view that does return MMDD or null if 1/1/1970)
Actually the best solution (that I just didn't wanna write down before) is making a column that states if birthday date was set, so the value in birthday itself doesn't matter if not set. I know adding columns willy nilly isn't a good practice, but how els would you take care of this problem, not give access to the year and not exclude people with birthday on 1.1.1970? You'd just check first if the flag is true and if it is, you look at the birthday.
Sure, but adding a column is likely to take time, or at least requires to discuss it with the team in charge of the database side etc. If the problem was found 3 days before the christmas freeze, better to block it in a rush and have 11 months to work on it. (Especially if the reminder would take the form of millions of emails)
Oh and obv if adding a "is date null?" column is possible, at some point there should be a way to make the column nullable anyway
Or just allow it to be nullable? Having a "non-nullable" column that has an unset state is lazy. While it likely has a reason (date picker doesn't always allow null), this should be handled outside the db
they have some tools which extract commit messages for some purposes, coordination with issue tracker etc, and these tools seemingly sometimes pick "subj" up to the empty line. but actually this rule is wrong - subj is always 1-liner (git works so), so it shouldn't check for empty line anyway.
and that's why we have a separate tool for deploying hotfixes quickly
I never understood why make CI/CD pipelines so central to everything to then flat out ignore them when they have issues instead of maintaining them. What's the point of using them if they get ignored?
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.
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.)
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.
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
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.
Sometimes engineering judgement and business needs have to win.
If this system being down is costing $5,000 a minute, the CI pipeline takes ~60 minutes to run, and I have a fix that I know works... but CI is failing because I didn't put a space after a comment, used an "any" to get the fix done quickly instead of building out the proper type... whatever, I want to just go to production. Hell, I probably want to skip a lot of checks on CI in the first place and get the system back up.
Then I can take the time in the morning, or direct someone else to, clean up the fix so it passes the entire CI pipeline.
I don't want to have to put in the incident report, "system was down for an additional 60 minutes because engineer forgot to put an extra new line after a comment".
Then put a fast track in the CI itself instead of creating a parallel system. Those parallel systems tend to end up undocumented and used by a few "in the know". I am not saying that how you do it is wrong, but the system we build should reflect the business needs. This includes the aspect of how to manage emergencies.
Fixing the pipeline and making it fast and 100% reliable is impossible. Trust me, I worked on CI/CD at a large listed company with whole teams working on CI and CD and we would only get CI to be 95% reliable at best. We even had automatic flake detection and isolation etc, but you just can't avoid people writing tests that fail 1% of time, or after some time, or only with some newer Docker base image because of an SSL bug...
Sure, but it's a continuous process. Systemic failures should get fixed, because they hint at underlying issues. The whole point of testing and logging errors is to have the information to do something about it. It's the normal process of system hardening, right?
What's the business incentive to spend significant amount of money and reallocate manpower to fix and maintain something that works fine for the usual releases AND already has a solution for the hotfixes (the separate pipeline)?
As a fellow systems autist I understand your focus, but that's not how the business works.
When I was at amazon, the internal pipeline tool had a big red "emergency deploy" button specifically for this situation. A big pipeline might (very deliberately) need days to reach all environments, so having the "ignore all that, just deploy this right now" button was a straight-up requirement.
The hook is kinda stupid because there is no way to fix that error normaly. You have to force push ci branch, altering history. The initial push should be rejected and ci is not triggered to run.
Dude if I got a pager duty alert and decided to make coffee first before looking at it instead of getting on immediately, I’d likely be fired. No wonder your manager was blowing you up.
"Missing empty line after commit message" could (and imho should) be caught by a local git hook thats rejects the push on your machine.
The rule itself might be stupid, but if it is mandatory and the pipeline tells you "nope" (but only after 30 min), you might save yourself some time and sanity by having a local fail fast check.
If it's set up as a server side hook, and there only, you no longer need to keep things in sync (if you have strong enough policy that client side always works, even better)
This is not the sort of thing CI should fail on - CI shouldn't need to care about source control (a pre-build script that checks commit messages, code style, etc - maybe - but by the time you start a build you should only care about code and config for the build)
actually some people prefer to setup automatic corrections for various minor issues on CI side (e.g. grooming the code style, fixing windows/unix newlines etc) - but some others find this inconvenient
186
u/m1k3st4rr Oct 06 '26
You forgot the part where the root cause was a commit made and pushed by a coworker at 2:17am
8
u/ryuzaki49 Oct 06 '26
A build failing due to a commit message? That's just madness
337
u/shnutzer Oct 06 '26
and that's why we have a separate tool for deploying hotfixes quickly
22
u/Last8Exile Oct 06 '26
The hook is kinda stupid because there is no way to fix that error normaly. You have to force push ci branch, altering history. The initial push should be rejected and ci is not triggered to run.
6
u/Hakuchii Oct 06 '26
4
u/deadbeef4 Oct 06 '26
My favourite is when the lint check fails and it’s due to a comment not being wrapped at exactly the right point.
4
u/DogmaticParadigm87 Oct 06 '26
The linter has never been paged at 3am, and it shows.
6
u/Conroman16 Oct 06 '26
Dude if I got a pager duty alert and decided to make coffee first before looking at it instead of getting on immediately, I’d likely be fired. No wonder your manager was blowing you up.
42
u/OmegaPoint6 Oct 06 '26
Someone needs to turn on fail fast, or receive hooks