Page MenuHomePhabricator

Wikifunction's Gerrit runs end-to-end tests run against a Catalyst environment
Closed, ResolvedPublic5 Estimated Story Points

Description

This is a "white glove" kind of story where we aim to get wikilambda CI working with Catalyst. The goal is to:

  1. set up e2e CI with catalyst for wikilambda on gerrit
  2. learn the steps to set this up
  3. make a write-up of the steps in this task for us to write formal documentation later

AS an Abstract Wikipedia engineer
WHEN I push a new wikilambda patch to Gerrit
THEN I see that a Catalyst environment is being provisioned

AS an Abstract Wikipedia engineer
WHEN I wait for the end-to-end test to finish
AND the end-to-end tests finish
THEN I see whether the tests passed or failed
AND I see a link to the environment

Event Timeline

This would involve adding a step to the test pipeline in zuul/layout.yaml. And defining a test to run somewhere in JJB within that same repo.

We can start by defining a docker image that makes the Catalyst calls we need. This will eventually live in integration/config's dockerfile directory but it should inherit from one of our CI-base images; e.g. ci-bookworm.

Secrets for jobs are stored within Jenkins itself and there are several patterns for getting those secrets into jobs. In general, environment variables work.

thcipriani edited projects, added Catalyst (Fork around 🍴); removed Catalyst.
thcipriani set the point value for this task to 5.
thcipriani moved this task from Backlog to Ready on the Catalyst (Fork around 🍴) board.

So far, the WIP has these working scripts:

create
Instructs environments endpoint to create a mediawiki/wikilambda instance

list
Shows instances created with the specified token (token lives in ./env)

remove
Passed the id of an instance to remove (can get the instance from list output)

wait
Pops open a browser window (using open on macOS host) once the instance is serving up pages

Implemented these to ensure I could bring things up/down

Next step is wiring up the Dockerfile

Sweet.

We want to run selenium tests against the environment: example of how it runs.

To do this, follow the example in the integration/config repo: node22-test-browser.

Our pattern for running docker images in Jenkins is you'll get a few directories mounted to your container:

  • /src -- The source code for the WikiLambda extension.
  • /log -- An empty directory that will be saved as artifacts.
  • /cache -- A directory that may be re-used from run to run to speed up builds by preserving dependencies/cache directories.

Perfect thanks!! Will jump back on this post-sprinthackular

Mhurd removed Mhurd as the assignee of this task.EditedFeb 18 2025, 5:33 PM
Mhurd subscribed.

I would still love to work on this, but we've had so many Pixel fires to put out lately (most of last week, now again today) that I have to focus on getting it back up since other teams depend on it

Change #1130722 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):

[integration/config@master] WIP: Add wikilamba end-to-end selenium testing

https://gerrit.wikimedia.org/r/1130722

Change #1130722 merged by jenkins-bot:

[integration/config@master] Add wikilamba end-to-end selenium testing

https://gerrit.wikimedia.org/r/1130722

Change #1131097 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):

[integration/config@master] Update wikilambda e2e test parameters

https://gerrit.wikimedia.org/r/1131097

Change #1131097 merged by jenkins-bot:

[integration/config@master] Update wikilambda e2e test parameters

https://gerrit.wikimedia.org/r/1131097

Change #1131121 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):

[integration/config@master] Remove wikilambda e2e test parameter

https://gerrit.wikimedia.org/r/1131121

Change #1131121 merged by jenkins-bot:

[integration/config@master] Remove wikilambda e2e test parameter

https://gerrit.wikimedia.org/r/1131121

@vaughnwalters we're closing out the initial work to get this stood up in Gerrit, but if you have followups (i.e., something not working like it should) let us know and we can add new tasks to our backlog.

Change #1135094 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):

[integration/config@master] Catalyst: Make npm args to catalyst variable

https://gerrit.wikimedia.org/r/1135094

Change #1135098 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):

[integration/config@master] dockerfiles/catalyst: make npm args variable

https://gerrit.wikimedia.org/r/1135098

Change #1135094 abandoned by Jeena Huneidi:

[integration/config@master] Catalyst: Make npm args to catalyst variable

Reason:

splitting docker and jjb changes

https://gerrit.wikimedia.org/r/1135094

Change #1135099 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):

[integration/config@master] wikilambda-catalyst e2e: Use new docker image

https://gerrit.wikimedia.org/r/1135099

Change #1135098 merged by jenkins-bot:

[integration/config@master] dockerfiles/catalyst: make npm args variable

https://gerrit.wikimedia.org/r/1135098

Change #1135123 had a related patch set uploaded (by Brennen Bearnes; author: Brennen Bearnes):

[integration/config@master] catalyst: add https to MW_SERVER URL

https://gerrit.wikimedia.org/r/1135123

Change #1135123 merged by jenkins-bot:

[integration/config@master] catalyst: add https to MW_SERVER URL

https://gerrit.wikimedia.org/r/1135123

Mentioned in SAL (#wikimedia-releng) [2025-04-08T22:02:53Z] <brennen> Updating docker-pkg files on contint primary for T383065

Change #1135128 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):

[integration/config@master] dockerfiles/catalyst: Configurable MW env vars

https://gerrit.wikimedia.org/r/1135128

Change #1135128 merged by jenkins-bot:

[integration/config@master] dockerfiles/catalyst: Configurable MW env vars

https://gerrit.wikimedia.org/r/1135128

Change #1135099 merged by jenkins-bot:

[integration/config@master] wikilambda-catalyst e2e: Use new docker image

https://gerrit.wikimedia.org/r/1135099