Page MenuHomePhabricator

Beta launch: User can see install progress when installing a k8s-environment
Closed, ResolvedPublic3 Estimated Story Points

Description

Patchdemo shows streaming install logs while waiting for a vhost-environment to become ready. We want a similar behaviour for a k8s-environment.

AS a patchdemo user
GIVEN I have enabled the header to see Catalyst features
WHEN I launch a new environment with Catalyst backend
THEN I am directed to a page that streams logs of the installation progress

Related Objects

Event Timeline

jnuche edited projects, added Catalyst (AGL); removed Catalyst.
jnuche set the point value for this task to 3.
jnuche subscribed.

The container that needs to be streamed from is the init container "install-mediawiki"

jnuche updated Other Assignee, added: EBomani.
jnuche renamed this task from User can see install progress when installing a k8s-environment to Beta launch: User can see install progress when installing a k8s-environment.Sep 9 2024, 2:08 PM
thcipriani updated Other Assignee, added: SDunlap; removed: EBomani.
thcipriani added a subscriber: jeena.

This has vexed us for a bit because there is/was a timing component to when the Catalyst API would allow you to stream logs (i.e. the pod that to be running). This meant that patchdemo had to divine when it would be safe to stream the results. What was worse is that, except when the pod was ready to stream logs, it's response would not be text/event-stream which would cause the PHP http clients to throw and exception. We're still working on smoothing out this integration.

thcipriani updated Other Assignee, removed: SDunlap.
thcipriani added a subscriber: EBomani.
thcipriani subscribed.

After patchdemo connects to catalyst-api logs endpoint (logs/streaming), under some circumstances the endpoint returns a 200 OK without streaming anything.

So that's what remains on this task.

To reproduce:

  • Use staging or prod cluster
  • Diagnosed via manual requests to catalyst api during deployment

Note: this features streams multiple containers; could descope and stream logs from just init.

Jeena's back! Reassigning.

A new MR for catalyst-api addresses the race condition encountered by reviewers.

An additional thing I noticed is that if logs have begun to stream and then the container is stopped (in my case there was no space on the cluster), the kubernetes log stream will not return any error and the log stream will finish as a 200, so the UI would announce the wiki is ready when it wasn't. Maybe in another task, after the logs finished, we could do another request to confirm the wiki is running to determine what result to announce.