News for hackers. Stuff that matters.
Re:Cloudflare outage on November 18, 2025 post mortem by AdieuToLogic on Friday November 21, 2025 @09:13PM (#46011433)
>> Problem is, the enclosing function (`fetch_features`) returns a `Result`, so the `unwrap` on line #82 only serves as a shortcut a developer took due to assuming `features.append_with_names` would never fail. Instead, the routine likely should have worked within `Result`.

> But it's a fatal error. It doesn't matter whether it's implicit or explicit, the result is the same.

I agree it is an error, but disagree that it should be a fatal error at that location. The reason being is the method defining the offending `unwrap` construct produces a `Result`, which is fully capable of representing any error `features.append_with_names` could produce.

> But that has nothing to do with the actual bug here, which was that the invariant failed.

The bug is by invoking `unwrap` the process crashed. To the degree that Cloudfare had a massive outage.

Had the logic been such that a `Result` representing this error condition activated an alternate workflow to handle the error (perhaps by logging it, emitting a notification event alerting SRE's, transitioning into a failure mode, or all of these options), then a global outage might have been averted.

Which makes:

> How they choose to implement checking and failing the invariant in the semantics of the chosen language is irrelevant.

Very relevant indeed.

There are no comments on this comment yet.