11
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 14 Jan 2024
11 points (100.0% liked)
important instance shit
150 readers
1 users here now
founded 1 year ago
MODERATORS
They were using immutable cache control headers on resources that were, in fact, mutable? Uh oh.
oh yeah! it’s been causing a ridiculous number of problems for our instance and others (I thought beehaw was down for a long time but I’m realizing it was this cache issue) and basically makes upgrading to a backend that isn’t completely compatible with the previous backend impossible to do cleanly. and yet, I think I might have been the only one who’s discovered this issue, judging by the lack of relevant GitHub issues or other chatter about it.
as for why some lemmy dev chose immutable, all I can figure is they saw that rust is immutable (and I like rust a lot, but these are not good rust devs) and figured that meant immutability is a good thing everywhere regardless of the actual implementation. or maybe Google’s SEO tools insisted they needed it, and they didn’t read on or understand the versioned path requirement for cache busting? you’d think the devs of a federated platform would focus on literally anything other than SEO, but none of these folks had a plan.
anyway… only 7 hours remain until everyone’s browser hopefully marks the old content stale
I saw a few closed issues relating to cache control stuff. They've fixed some bugs related to it and also saw at least one where more aggressive cache control was implemented to improve performance.
oh hey speak of the devil https://github.com/LemmyNet/lemmy-ui/issues/2325 so this isn’t even purely a cache issue, somehow they also broke upgrading credentials between lemmy versions and nobody noticed
fucking brilliant. I might see if I can push a new version of the error page that doesn’t lie about what’s wrong now that caching hopefully isn’t busted
Lemmy-ui immutable static files have a cache busting hash in their path:
On awful.systems, I see you have replaced this hash with an
undefined
:By the way, clean upgrades are completely possible if you know what you're doing. I frequently roll out new upgrades on lemm.ee without any downtime (so some servers running 0.19.1, some running 0.19.2 for example).
oh do tell
https://join-lemmy.org/docs/administration/horizontal_scaling.html#rolling-upgrades
no thx but while we’re here
the reason why the cache busting broke is because I’m building for an immutable environment (NixOS sans docker) and my builds don’t have
.git
cause it’s a source of mutability. lemmy’s cache busting utterly breaks without git but it still incorrectly marks the files as immutable, breaking a ton of users. utterly broken behavior.but the very funny part is the cache behavior isn’t even the bug that’s breaking everything right now. that’s this bug: https://github.com/LemmyNet/lemmy-ui/issues/2325 which you didn’t mention as a factor while you were trying your best to sound smart
also, have you ever gotten banned from an instance for being a shithead reply guy before? I’m betting this ain’t the first time
also motherfucker, those versions are compatible! no shit there’s no downtime for a hotfix upgrade. we got into this mess upgrading from 0.18.4 to 0.19.2 cause nobody seemed to think the upgrade process through in any detail
for anyone interested, the hack that NixOS uses to fix the asset path is here. the config we’re running predates that, and we may not be able to use that hack with a flakeified
lemmy-ui
(which is what makes it a hack — usingsrc.rev
like that is brittle and feels like it breaks Nix’s abstractions. maybe using git hashes like this is actually a bad fucking idea, huh? and the real fucked up part is, the UI knows its version so they could use that, but they woke up and chose jank)