service dies with out-of-date gpstime package
I started a rolling restart of gracedb-playground and when it came back online, it 503'ed with the following error:
Traceback (most recent call last):
File "/app/gracedb_project/manage.py", line 44, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/dist-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/dist-packages/django/core/management/__init__.py", line 395, in execute
django.setup()
File "/usr/local/lib/python3.9/dist-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.9/dist-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.9/dist-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/app/gracedb_project/gracedb/alerts/models.py", line 19, in <module>
from .phone import get_twilio_from
File "/app/gracedb_project/gracedb/alerts/phone.py", line 12, in <module>
from events.permission_utils import is_external
File "/app/gracedb_project/gracedb/events/permission_utils.py", line 9, in <module>
from .models import Event
File "/app/gracedb_project/gracedb/events/models.py", line 31, in <module>
from gpstime import gpstime
File "/usr/local/lib/python3.9/dist-packages/gpstime/__init__.py", line 41, in <module>
from .leaps import LEAPDATA
File "/usr/local/lib/python3.9/dist-packages/gpstime/leaps.py", line 187, in <module>
LEAPDATA = LeapData()
File "/usr/local/lib/python3.9/dist-packages/gpstime/leaps.py", line 126, in __init__
self._load(fetch_ietf_leapfile, LEAPFILE_IETF_URL)
File "/usr/local/lib/python3.9/dist-packages/gpstime/leaps.py", line 136, in _load
raise RuntimeError(f"Error loading leap file {path}: {str(e)}")
RuntimeError: Error loading leap file https://www.ietf.org/timezones/data/leap-seconds.list: 404 Client Error: Not Found for url: https://www.ietf.org/timezones/data/leap-seconds.list
uhhhh does it not seem dangerous to anyone else to depend on an external file like that which just breaks the package.
I brought playground down to one container, and manually upgraded gpstime
(from 0.6.2) to the latest version (0.8.1, https://git.ligo.org/computing/sccb/-/issues/1397) and that fixed it.
What this means is that production is waiting to break if it restarts for any reason. I'm going to upgrade gpstime
, build new containers and redeploy while the detectors are offline.