294 points · by spondyl · 8y ago · 252 comments
I love fake status pages!
Professional truth-massaging
I feel some companies have the following meaning for the lights: yellow is when servers are literally on fire. Red is when the CEO is bleeding out somewhere on the floor, and the Feds are about to bust in and close the shop.
If it’s not significant (and it’s not) then it shouldn’t change to a medium grade outage status (amber).
At best a notes portion of a status page could mention it.
However over 2018 we seem to have got to a point where I’m worrying about some basic professional competencies and communication systems inside the npm project. I don’t know much about it, but looking at it from a sideways glance, you have to start worrying about what it is that they’re getting wrong, and how to derail their mistakes in my own team and workflows.
and this is why writing yet another package manager instead of gradually improving existing ones - rpm, deb, etc. - is far from ideal.
For anybody who wants to build a package manager I highly recommend to take a look at what Paludis does (not necessarily how they do it).
One time out of fun and curiosity we flushed the cache and deleted the lockfile and the node modules dir, did npm i on a mac and a windows and they were undiffably different. Okay, this was months ago and probably there is a good explanation for it, but it was not reassuring.
* NPM 6 stopped working with Node 4. Rather than actually fix it, they just left it broken for several days because it was already fixed in the upcoming release, and I guess they didn't want to do an emergency release: https://github.com/npm/npm/issues/20716
* There was a several hour period where you could publish packages, but then they would 404 when you tried to download the new version.
* They switched to using Cloudflare on Friday, and broke Yarn in the process: https://mobile.twitter.com/jamiebuilds/status/10001984632696...
* Somehow while switching to Cloudflare they blew away a bunch of the packages that had been published during the previously mentioned window. They also blew away all the versions of some packages. Last Friday night you couldn't 'npm install gulp'. Never gave any explanation for this: https://github.com/npm/npm/issues/20766
About a month ago there was a bug where npm would change permissions on a bunch of system files and render you entire system unusable in you ran it as root. But that was OK because the bug was on the "next" version of npm, not the one you'd get by installing 'npm install -g npm'... Except there was also a bug in the current version of npm that installed the next version of any package by default, so it did in fact blow up a bunch of machines.
Now, apparently, they are a teapot.
You simply have to endure it, and accept that every now and again, for reasons entirely beyond your control (and at a quite possibly very inconvenient moment) it's going to break.
This really annoys me, but what can one do? At least it's fixed now.
Everything else is legit though.
nomnom is no longer maintained, so npm takes the project over, & makes a 2.0.0 update which is empty besides a README saying it's deprecated. Which breaks some packages which have a '>=1.2' version. So npm deletes 2.0.0. Which breaks for people who have had their package.json update from 2.0.0. Even when they'd had a system working with 2.0.0 (not even using nomnom, just a depedency of a dependency for the commandline portion that isn't being used) & were ready to deploy
In Rustland you can't publish a crate with '>=1.2' dependencies
That was the end of February, so not sure but that may be it.
https://www.reddit.com/r/programming/comments/886zji/why_has...
So in case you weren't aware: If you're using webpack, you're using is-odd. Which itself relies on the excellent package is-number.
So, how and why did the developers let things get this bad?
"My package has 2 million downloads, I want x% more than market rate" attitude.
It's like the equivalent of influencer marketing, but for code packages. Of course I could just be a crazy old man. Who knows?
The body of the 418 is {"error":"got unknown host (registry.npmjs.org:443)"}.
Looks like some npm clients are appending the port to the Host
header, but only when going through a proxy, and that's confusing
the registry.
It seems to be based on combination of npm:node version. $ curl -vvv -H 'Host: registry.npmjs.org:443' https://registry.npmjs.org:443
> GET / HTTP/1.1
> Host: registry.npmjs.org:443
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 418 I'm a teapot
< Date: Tue, 29 May 2018 03:52:16 GMT
< Content-Type: text/plain;charset=UTF-8
< Content-Length: 53
< Connection: keep-alive
< Set-Cookie: __cfduid=d3f8dd8d2121ede348194ee142443bccc1527565936; expires=Wed, 29-May-19 03:52:16 GMT; path=/; domain=.registry.npmjs.org; HttpOnly; Secure
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Server: cloudflare
< CF-RAY: 422601de4bf49fc6-IAD
<
{"error":"got unknown host (registry.npmjs.org:443)"}
Per RFC 7230, §5.4 (https://tools.ietf.org/html/rfc7230#section-5.4), the port is optional if it's the default for the URI (:80 for http, :443 for https), but nowhere in the spec does it say it's an error to include a redundant port specifier. The registry server is likely noncompliant here, and it definitely should not be throwing 418 here. (400 would be appropriate if the Host header was malformed - but that's not even the case here).My guess is someone wanted to use some code for "I don't really know what this error is", saw the 418 and thought "that's cute!"
Be careful, "cuteness" and "cleverness" has a way of biting you in the behind.
It took about a year for me to internalize that things will often be that fucked. :)
My best guess? The request ended up at a teapot and the poor thing was asked to do something that no teapot has ever done before.
Generally speaking I tend to agree, but in this specific case how is sending a 418 "biting you in the behind" worse than sending a more proper 500 error? (Or perhaps a 400? Hard to say exactly, feels like the server is having unexpected errors since it cannot properly parse the hostname.)
So yes, returning a 4XX for a 5XX is problematic.
Think about your normal interactions with problem solving as a team. What's more useful, a teammate who tells you when there's a problem what the problem is or a teammate who hides things, obfuscates, and makes random jokes?
400 tells you asked in a way that wasn't understood.
401 says you're unauthorized and 403 says you're not allowed (similar but potentially different implications, not my favorite nuance but it's a common example that might come up)
504 says there's a problem communicating between the two of you.
404 says that your data doesn't exist.
500 says the server is having problems doing the thing and it's completely out of your hands.
418 says "I'm a teapot"
What's more useful data?
Well ideally some 5xx code because it's a server error. I personally think servers should default to 500 if there is an uncaught or unhandled error condition.
That's one simple obvious difference.
The first lesson was to avoid funny error messages in the future. The other was that “impossible” things tend to happen surprisingly frequently in software.
"One in a million is next Tuesday"
https://blogs.msdn.microsoft.com/larryosterman/2004/03/30/on...
Law of stats of large numbers etc
It's amazingly frustrating to see: Hey if you just barfed the output of that failed command into a shell I could fix it but now I have to figure out why this several-hour command failed... bleh.
Seriously, though. I'd love to get a look at their SLA and how they define "uptime" for their "org" and "enterprise" users. I don't think most teams are running out the door to throw their money at npm, and it's this type of instability that creates mistrust amongst developers.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418
If we can't have a little bit of levity in our lives, then what's the point of it all ?
I think this is misguided. Clearly, there are plenty of humourless prudes, even amongst Us, the Blessed T-shirt Wearers. To wit, the "campaign" to remove the 418 code did not originate in a corner office.
(Entourage, https://youtu.be/E-v1hOJCphI?t=78 (NSFW video))
It's alright if they want to lock the thread to prevent a massive +1 spam, but at the very least they should have given a link to track the status of this.
When your production systems are down, "thanks for the report" is not a good enough response.
> You really don't need to respond to repeat what every other poster is saying.
Obviously they did need to because no one from the team had responded yet. Also his response without any link to track the status is rather disappointing but entirely what I'd expect from the NPM team.
Unfortunately, agreed. I hate being pessimistic but nothing disappoints me more than the way NPM handles a problem.
It's clearly not just a fluke at this point.
As the person mostly on the hook for https://news.ycombinator.com/item?id=16435305 (as I recall), I can imagine she/they would be a little on edge.
Still not a good look. . .
If anything, the filesystem permissions bug only makes this worse because it was a destructive bug in a widely promoted release (even if it was technically not supposed to be stable -- npm employees actively recommended using it on twitter) and npm's reaction was fairly dismissive (because it's not a stable release for production use, dummy).
Some time back, when they accidentally installed @latest, which accidentally wiped your hard drive, I narrowly avoided destroying my company laptop. After giving the same treatment on github and blaming their users for being dumb, they finished our twitter exchange calling me “whiny”. Happy yarn user ever since.
> Thanks so much for the report. Currently, we are doing the best to resolve the issue. Please continue to check back on our status page to see our updates. https://status.npmjs.org/
Sounds more appropriate
I am not sure if you are putting your money where your mouth is. This product can be used for free, and there is a simple work around. (i.e. Test before you upgrade.)
In an incident, constant and clear communication is a key.
This is a different magnitude to, "I upgraded my free dependency management tool, and now I have to downgrade it. Please tell me when I can upgrade again."
P.S. The issue has been fixed about 16 min ago according to ceejbot's last reply to the github issue.
The GitHub issue _is_ where you go to track the status of the fix. I'm sure if there are any updates they'll be posted there; and if you're interested you can now subscribe to the issue without getting your inbox spammed by dozens of users spamming "me too" in the thread.
> We've fixed this -- we now accept the port appended to the host. @wgrant's comment was most helpful, thank you!
[0] https://github.com/npm/npm/issues/20791#issuecomment-3926484...
- Public Service Announcement: Don't board the failboat.
You're going to have to explain that better, otherwise you're just perpetuating that dumb lie.
You absolutely can do serious (whatever that means) client-side development without yarn or npm.
I've used them for fairly basic front-end JS development in mostly-Java projects. They worked fine. I don't know if they lack things you'd need to more involved work.
Heck, technically the problem isn't even that it's used by the registry, the problem is the npm client is a broken untestable mess and users seem to routinely unearth extremely surprising bugs.
This all has very little to do with teapots. The fact they used 418 and didn't provide a useful error message only makes it more interesting to talk about.
ETA: The options are "off-topic", "too heated", "resolved" and "spam". It looks like you can also elect to not give a reason, though...
These days I just have to laugh and shake my head.
- To have your own repo since npm doesn’t support composite repos like Maven (last I checked)
- To not trust that npm won’t take a dump like today
- To not let npm know your IP address of your dev boxes or build boxes
I’m sure there are many more reasons...
Presumably the npm community is full of web devs. Given that how can they not know the http codes, especially one as famous as 418?