• sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 hours ago

    It is unwrap’s fault. If they did it properly, they would’ve had to explicitly deal with the problem, which could clarify exactly what the problem is. In this case, I’d probably use expect() to add context. Also, when doing anything with strict size requirements, I would also explicitly check the size to make sure it’ll fit, again, for better error reporting.

    Proper error reporting could’ve made this a 5-min investigation.

    Also, the problem in the first place should’ve been caught with unit tests and a test deploy. Our process here is:

    1. Any significant change to queries is tested with a copy of production data
    2. All changes are tested in a staging environment similar to production
    3. All hotfixes are tested with a copy of production data

    And we’re not a massive software shop, we have a few dozen devs in a company of thousands of people. If I worked at Cloudflare, I’d have more rigorous standards given the global impact of a bug (we have a few hundred users, not billions like Cloudflare).