Skip to content

test(ui): run the live Playwright suite in its own CI job - #2938

Draft
toreysoloio wants to merge 2 commits into
kagent-dev:mainfrom
toreysoloio:toreysoloio/uiLiveCiSplit
Draft

toreysoloio wants to merge 2 commits into
kagent-dev:mainfrom
toreysoloio:toreysoloio/uiLiveCiSplit

Conversation

@toreysoloio

@toreysoloio toreysoloio commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 written by Claude (start)

Re-lands #2874, which was reverted in #2910 because it added its minutes to test-e2e. The suite and the product fixes are unchanged from #2874. The only difference is that the browser lane now runs as its own test-e2e-ui job, in parallel with test-e2e.

Closes #2657
Closes #2828

Timings

The two jobs run in parallel. On the first run (36041949897), both started at 20:09:13, because neither needs the other.

job duration dominated by
test-e2e 10m06s the Go suite, 372s
test-e2e-ui 11m31s Install Kagent, 332s

That first run is not the steady state. test-e2e-ui has its own cache key so the two jobs don't write to one sticky disk at the same time, and a new key starts empty:

job cache key sticky disk came from cached layers Install Kagent
test-e2e kagent-e2e a commit snapshot 57 47s, 5 images
test-e2e-ui kagent-e2e-ui a base snapshot 1 332s, 3 images

For reference, test-e2e on the same runner type:

branch median range runs
main today 6m29s 5m27s – 11m29s 10
main, with the lane inside it 6m23s 5m37s – 6m54s 8
release/v0.10.x 18m51s 15m23s – 27m22s 5

The lane cost about 51s when it ran inside test-e2e, which is small next to that job's 5m27s–11m29s spread. Moving it out gives test-e2e, usually the longest job in a run, some headroom rather than a visible speed-up.

Fixture

ui/playwright/live/fixtures/cluster.yaml.tmpl builds three images (controller, UI and one runtime) instead of the five test-e2e builds. It declares three harnesses of one kind because a template applies a lone harness's labels unasked, which would stop the multi-harness path from being exercised.

Testing

  1. On the latest CI run, check that test-e2e and test-e2e-ui start together and that test-e2e falls in the 5m27s–11m29s range above.
  2. Stand up a cluster with scripts/setup-cluster/setup-cluster.sh, then apply the CI fixture:
    RUNTIME=$(kubectl get harness kagent -n kagent -o jsonpath='{.spec.workload.image}')
    KAGENT_UI_RUNTIME_IMAGE="$RUNTIME" envsubst < ui/playwright/live/fixtures/cluster.yaml.tmpl | kubectl apply -f -
  3. Run cd ui && UI_LOOP_LIVE_URL=http://localhost:8080 yarn test:pw:live.
  4. Run kubectl get agenttemplate,harness,modelconfig -A | grep e2e-live. It should return nothing.
List pages no longer show a "0 of 0" summary while their first read loads, and an app's detail page no longer says "No such app" before its lookup finishes.

🤖 written by Claude (end)

kagent-dev#2874 was reverted for making test-e2e too long. It put the browser lane inside
that job, so its minutes landed in series on the job everything else waits on.

This restores the work and moves the lane out. test-e2e-ui stands up its own
cluster and runs beside test-e2e rather than after it, so a lane of about five
minutes hides inside one of about ten instead of extending it. test-e2e is
byte-identical to main again, ui.replicas=0 and five images included.

The second cluster costs a runner, not wall-clock. The job is also cheaper than
the one it left: three images where test-e2e builds five - controller, UI, and
one runtime for the harnesses to point at - because the harness kinds that job
needs differ in ways no browser journey can see.

It brings its own fixture rather than borrowing the Go suite's. Three harnesses,
all of one kind, so the template form still meets a cluster with more than one:
that is the branch where it applies no labels unasked, and a single-harness
fixture would have retired it silently. Verified by applying the fixture to a
dev cluster and running the suite against the three-harness shape - 13 passed,
including the admission journey.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Torey Scheer <[email protected]>
@github-actions github-actions Bot added testing Additional testing required and removed testing Additional testing required labels Sep 24, 2026
The first CI run measured the new job at 11m31s against test-e2e's 10m06s,
which the README's "hides inside" claim does not survive. The cause is its own
Blacksmith cache-key: the sticky disk came from a base snapshot with 1 cached
layer, where test-e2e's came from a commit snapshot with 57, so it built three
images from nothing - 332s for the step against 47s on the warm key.

A separate key is still right, since the two jobs now run at the same time and
would otherwise write one disk. What was wrong was a README that described the
steady state as though it were the first run.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Torey Scheer <[email protected]>
@github-actions github-actions Bot added testing Additional testing required and removed testing Additional testing required labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Additional testing required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: track the deferred Playwright coverage in DEFERRED.md [FEATURE] Run the live UI Playwright suite in CI against the built UI image

1 participant