Skip to content

build logs: add follow option

Raymond Ndibe requested to merge log_follow into main

What was done:

  • make changes to the open api schema
  • refactor the logs endpoint to stream logs and follow option is set.
  • get tests to pass

ToDo:

  • refactor the builds-cli
  • find out why api-gateway nginx doesn't allow streaming (or atleast why it is not working for in our case)

Testing:

  • execute OUT_OF_K8S_RUN=true go run cmd/main.go to run the go server
  • then stream the logs of a running build with curl -H "ssl-client-subject-dn: CN=minikube-user,O=system:masters" --cert ~/.minikube/profiles/minikube/client.crt --key ~/.minikube/profiles/minikube/client.key --insecure 'http://localhost:8000/v1/build/<build_id>/logs?follow=true'

Bug: T339922 Depends-on: toolforge-weld!24 (merged)

Edited by Raymond Ndibe

Merge request reports