Page MenuHomePhabricator

Fix flaky Cite/Citoid Cypress tests running in parallel
Closed, ResolvedPublic

Description

Context

We implemented a lot of changes to improve performance on the Cypress e2e tests in Cite including running them in parallel. See T424334: Cypress vs. Selenium Performance and T414556: Investigate if Cypress tests can run faster in CI. These changes introduced a regression for Citoid that uses a different setup CI see T425847: Citoid selenium tests are failing.

Issues
  • With the fix implemented to solve the latter we're having issues running the test in parallel seemingly due to race conditions when setting up the cite-tool-definition.json on each spec.
  • If cite-tool-definition.json is not setup Citoid does not apply it's UI changes to VE even if the extension is loaded.
  • We cannot guarantee if cite-tool-definition.json is created already or not when one spec creates it but another assumes it's not there.
Possible solutions
  • Disable parallelization ( for now )
  • Find a better way to tell Cypress which UI to expect depending on a combination of Citoid being loaded and the cite-tool-definition.json created
  • Move e2e test demonstrating the essential Citoid behavior into Citoid and make sure "pure" Cite tests are not run with a Citoid setup

Event Timeline

Change #1288907 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Cypress: Disable parallel runs

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

Change #1289176 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Cypress: Streamlining some calls to open the Citoid inspector

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

Mvolz renamed this task from Fix flacky Cite/Citoid Cypress tests running in parallel to Fix flaky Cite/Citoid Cypress tests running in parallel.Tue, May 19, 9:13 AM

Change #1288907 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Cypress: Disable parallel runs

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

We're currently not working further on this. I'll left some comments on how to move forward though.

Change #1289176 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Cypress: Streamlining some calls to open the Citoid inspector

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

Change #1290516 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/extensions/Cite@master] Cypress: Move shared setup out of per-spec hooks

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

Change #1290519 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/extensions/Cite@master] Cypress: Run tests in parallel again

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

Change #1290520 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/extensions/Citoid@master] [WIP] Trigger CI to try Cite parallel runs

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

Change #1290516 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] cypress: Move shared setup out of per-spec hooks

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

Change #1290519 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] cypress: Enable parallel runs again

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

Change #1290520 abandoned by Phedenskog:

[mediawiki/extensions/Citoid@master] [WIP] Trigger CI to try Cite parallel runs

Reason:

This was a test commit

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