bikeshed dies if it tries to update offline
fantasai opened this issue · comments
I'm offline so can't file an issue right now, so figured I'd send an email before I forget.
Bikeshed dies if I try to run it locally, because it's trying to update itself (even though I didn't ask for an update!):
~/w3c/csswg$ bikeshed
Bringing data files up-to-date...
Updating via manifest...
Gathering local manifest data...
Fetching remote manifest data...
WARNING: Couldn't download remote manifest file, so can't update. Please report this!
HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /speced/bikeshed-data/main/data/manifest.txt (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fecdb04b130>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
WARNING: Update manually with `bikeshed update --skip-manifest`.
Falling back to a manual update...
Downloading anchor data from Webref...
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
It would be nice if this wasn't a critical error when trying to build without Internet. :) (Also why is it trying to update? Clearly too smart for its own good.)
~fantasai
It would be nice if this wasn't a critical error when trying to build without Internet.
Fixed!
- Catches all update errors so it doesn't spew console trash at you.
- Auto-updates only try to update by manifest; they skip manual updating since that takes a long time and the auto-update is supposed to be fast.
- Does a fast, cheap check for internet connectivity before auto-updating, so you don't even have to wait for a network timeout. (Manually running
bikeshed update
doesn't do this check, so if it's faulty you can still manually update yourself.) It'll still pop a warning message, but at least it'll quickly move on to actually processing your spec.
(Also why is it trying to update? Clearly too smart for its own good.)
Because people don't remember to run bikeshed update
regularly, and have in the past reported errors to me that were just the datafiles being out of date. Now, if your files are at least a week old, it auto-updates the datafiles so you're always working with reasonably recent data.