Page MenuHomePhabricator

Catalyst API user can stream logs from a specific container
Closed, ResolvedPublic5 Estimated Story Points

Description

AS a catalyst API user
GIVEN I have set a user api token
AND I have created a new mediawiki environment (with id 2) which is still starting
WHEN I GET /api/environments/2/logs?stream=mediawiki/install-mediawiki
THEN I receive a 200 OK with with all of the logs of install-mediawiki up to this point
AND I receive line by line new logs as the are generated
AND the connection closes when the container has stopped

  • Trying to stream a container that does not exist returns a 404
  • If someone tries to hit this endpoint after the container has stopped, it should just return the whole logs as plaintext and then close the connection

Notes:

  • the kubernetes go client supports streaming logs
    • it is set as a log option before invoking the client
  • you can likely use gin c.Stream to stream the logs

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJun 7 2024, 10:58 PM
SDunlap set the point value for this task to 5.
SDunlap moved this task from Backlog to Acersecomicke ๐Ÿ‘ on the Catalyst board.
SDunlap edited projects, added Catalyst (Acersecomicke ๐Ÿ‘); removed Catalyst.