Page MenuHomePhabricator

Move Kubernetes log source multi-pod handling from jobs-api to toolforge-weld
Closed, ResolvedPublic

Description

T388274: [jobs-api] "toolforge jobs logs <name> -f" should get the logs of all containers in all target pods added logic in jobs-api to handle loading logs from the Kubernetes logging API in instances where there are multiple pods. I think this logic should live in toolforge-weld instead, as:

  • that way webservice logs can also take advantage of this bugfix
  • this lets jobs-api to use a non-implementation-specific interface (LogSource.query(), that is) so that in the parent task it can be swapped to Loki much more easily.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
jobs-api: bump to 0.0.386-20250729091039-7e54536brepos/cloud/toolforge/toolforge-deploy!884group_203_bot_f4d95069bb2675e4ce1fff090c1c1620bump_jobs-apimain
Use logging multi-pod fix moved to toolforge-weldrepos/cloud/toolforge/jobs-api!179taavitaavi/loggingmain
logs: Move multi-pod fix from jobs-api to hererepos/cloud/toolforge/toolforge-weld!82taavitaavi/logs-multi-podmain
Customize query in GitLab

Event Timeline

taavi triaged this task as Medium priority.

I have my doubts about this, as relatively soon we will move webservice to jobs-api, and then there will be no other users of the logging code making it better to not have in an external library, imo it's ok to move it to the jobs-api directly instead.

Yeah, most of this will soon be obsolete. But right now it isn't, and I don't want to block the Loki work on the webservice->jobs migration, and this is very much a similar amount of work compared to the alternative (crafting a "wrapper" LogSource in jobs-api internally), and it gives webservice users a better experience in the mean time.

Yeah, most of this will soon be obsolete. But right now it isn't, and I don't want to block the Loki work on the webservice->jobs migration, and this is very much a similar amount of work compared to the alternative (crafting a "wrapper" LogSource in jobs-api internally), and it gives webservice users a better experience in the mean time.

👍

group_203_bot_f4d95069bb2675e4ce1fff090c1c1620 opened https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/884

jobs-api: bump to 0.0.386-20250729091039-7e54536b