Page MenuHomePhabricator

Toolforge buildservice logs error
Closed, DuplicatePublicBUG REPORT

Description

When trying to look at logs i get:

tools.owidimporter@tools-bastion-13:~$ toolforge webservice --backend kubernetes buildservice logs -f
2024-08-23T13:33:30+00:00 [owidimporter-57f88bd748-65m6g]
Traceback (most recent call last):
  File "/usr/bin/toolforge-webservice", line 33, in <module>
    sys.exit(load_entry_point('toolforge-webservice==0.103.10', 'console_scripts', 'toolforge-webservice')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/toolsws/cli/webservice.py", line 603, in main
    for entry in logs:
  File "/usr/lib/python3/dist-packages/toolforge_weld/logs/kubernetes.py", line 66, in query
    for entry in self._get_pod_logs(
  File "/usr/lib/python3/dist-packages/toolforge_weld/logs/kubernetes.py", line 45, in _get_pod_logs
    datetime=parse_date(datetime),
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/dateutil/parser/_parser.py", line 1368, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/dateutil/parser/_parser.py", line 646, in parse
    raise ParserError("String does not contain a date: %s", timestr)
dateutil.parser._parser.ParserError: String does not contain a date:

[This error is from the toolforge tool, not an error in my log]

I think maybe one of the log entries had a newline in it or something. I can read logs if i specify -l option and skip the bad line.