4 ms·
> Even just the 'apt-get update' portion of that command is often misunderstood since it can return 0 as a result of transient failure. Tiny correction that go
by j1elo 3y ago
> Even just the 'apt-get update' portion of that command is often misunderstood since it can return 0 as a result of transient failure.
Tiny correction that got me confused: an exit code of '0' would actually mean 'success', so you probably just meant that it could fail at any moment.
But also, this can happen any time external servers are accessed, regardless of the tool. An npm install could fail any time without warning, if the servers are down. Devs should expect their supply chain to break sooner or later, and plan accordingly depending on the severity of the consequences.
My example is if you use the Ubuntu debug packages repository, you'll basically never know if the next run will work until 'apt-get update' is run. Those repos are seemingly down or 'reindexing' for hours every few days.
- donmcronald 3y ago> Tiny correction that got me confused: an exit code of '0' would actually mean 'success', so you probably just meant that it could fail at any moment. No. It fails and then returns 0 = success. It's a design choice. [1] [2] > But also, this can happen any time external servers are accessed, regardless of the tool. An npm install could fail any time without warning, if the servers are down. I think that strengthens my argument that everything should be baked in to the dev container. Edit: Reviewing those bugs, I see there's a new option to control the behavior: -eany, --error-on=any Fail the update command if any error occured, even a transient one. 1. https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1693900 https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1693900 2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776152#15 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776152#15