Steps to replicate the issue (include links if applicable):
- Run toolforge jobs logs <job name>
- Run toolforge jobs logs --follow <job name>
What happens?:
toolforge jobs logs <job name> does not return the logs in time order:
tools.cluebotng-review@tools-bastion-12:~$ toolforge jobs logs migrate-database 2025-08-10T14:24:30+00:00 [migrate-database-445fh] [job] /usr/bin/env: 'python': No such file or directory 2025-08-10T15:06:24+00:00 [migrate-database-4fhfq] [job] Operations to perform: 2025-08-10T14:53:44+00:00 [migrate-database-c76fl] [job] /usr/bin/env: 'python': No such file or directory
However --follow does:
tools.cluebotng-review@tools-bastion-12:~$ toolforge jobs logs --follow migrate-database 2025-08-10T14:24:30+00:00 [migrate-database-445fh] [job] /usr/bin/env: 'python': No such file or directory 2025-08-10T14:53:44+00:00 [migrate-database-c76fl] [job] /usr/bin/env: 'python': No such file or directory 2025-08-10T15:06:24+00:00 [migrate-database-4fhfq] [job] Operations to perform: ^C Aborted!
What should have happened instead?:
toolforge jobs logs should return the logs in time order, with the oldest entry been shown first and the newest entry being shown last.
This is consistent with the old behaviour (backed by kubectl logs) and filelog.
Without access to specify the LogQL directly (at least to me) this would be expected behaviour.