Jump to content

Continuous integration/Parsoid

From mediawiki.org

The Parsoid tests are failing randomly ( bug 61351 ) this page is meant to describe the Parsoid repositories involved and what we should be testing when a patch is proposed or when it enters the gate.

The Parsoid team maintains two repositories:

mediawiki/services/parsoid
Holds the actual software and list npm package dependencies in the packages.json file
mediawiki/services/parsoid/deploy
A repository meant for deployment in production of the code + its npm packages. The repository has a submodule pointing to mediawiki/service/parsoid and its /packages.json points to the parsoid packages.json.

Use cases

[edit]

Zuul has different behaviors depending on when a change is tested or when it should eventually be merged. In both cases it takes the patchset that triggered the change and apply it to the tip of the branch (usually master) of the repository that triggered the change.

When several repositories are tightly coupled together, a script (multigit.sh), we have different behaviors:

  • for testing: the script fetch the master branch of the other repositories
  • for gating (CR+2): for each repository the script attempt to fetch a reference crafted by Zuul in case the repository has a change being tested in the gate. If you have two changes (1, 2) made on two repositories (RepoA, RepoB), the changes 2 will be tested with Repo A and Change 1 applied on it.

Below is a description of what we should tests for the mediawiki/services/parsoid and mediawiki/services/parsoid/deploy repositories.

Test pipeline

[edit]

The aim is to test each repository independently for now.

Parsoid
Code source: mediawiki/services/parsoid + patchset applied
Packages: mediawiki/services/parsoid packages.json and fetched using npm

The deploy repository is NOT used. Since npm is going to be used and fetch from npmjs, we have to run this in labs.

Deploy
Code source used: the one in submodule fetched in /src/
Packages: the expanded packages in /node_modules/

The Parsoid repository is NOT used (it is a git submodule already). NPM is NOT used, we want to make sure node_modules are fine.

Gate pipeline

[edit]
Parsoid
Code source: mediawiki/services/parsoid + patchset applied
Packages: mediawiki/services/parsoid packages.json and fetched using npm

The deploy /src/ submodule is not used. npm is not used

Deploy
Code source: uses code in /src/
Packages
/node_modules/ npm is not used

Summary

[edit]
Pipeline Repository Source node_modules NPM used?
Test Parsoid Parsoid Parsoid (npm) Yes
Deploy Deploy (/src/) Deploy (/node_modules/) No
Gate Parsoid Parsoid Parsoid (npm) Yes
Deploy Deploy (/src/) Deploy (/node_modules/) No