Page MenuHomePhabricator

ContentTranslation ext.cx.publish test failing
Closed, ResolvedPublicPRODUCTION ERROR

Description

Since 5-6 hours ago, the wmf-quibble-vendor-mysql-hhvm-docker job is failing for every submission due to the same test, see for instance here:

19:28:19   ext.cx.publish
19:28:19     ✖ Publishing with Captcha handling
19:28:19 27 01 2019 18:28:19.199:DEBUG [middleware:source-files]: Requesting /extensions/ContentTranslation/tests/qunit/data/draft-sample-1.html /
19:28:19 27 01 2019 18:28:19.199:DEBUG [middleware:source-files]: Fetching /extensions/ContentTranslation/tests/qunit/data/draft-sample-1.html
19:28:19 27 01 2019 18:28:19.200:DEBUG [proxy]: proxying request - /extensions/ContentTranslation/tests/qunit/data/draft-sample-1.html to 127.0.0.1:9412

and then below

19:28:30 FAILED TESTS:
19:28:30   ext.cx.publish
19:28:30     ✖ Publishing with Captcha handling
19:28:30       HeadlessChrome 0.0.0 (Linux 0.0.0)
19:28:30     Test took longer than 60000ms; test timed out.
19:28:30         at node_modules/qunit/qunit/qunit.js:3582:7

This should be addressed ASAP (at least by disabling the test per standard practice), due to its impact.

Event Timeline

Daimona triaged this task as Unbreak Now! priority.Jan 27 2019, 6:38 PM

This is weird, though: no suspect changes to ContentTranslation in the meanwhile, so it appears to have been triggered by something external.

Change 486820 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ContentTranslation@master] Temporarily disable failing test

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

Change 486834 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/ContentTranslation@master] ext.cx.publish: Make qunit test less fragile

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

Change 486820 merged by Gergő Tisza:
[mediawiki/extensions/ContentTranslation@master] Temporarily disable failing test

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

With the above patch we now have a much more useful error:

ext.cx.publish
  ✖ Publishing with Captcha handling
  Promise rejected during "Publishing with Captcha handling": query-missing

This indicates that the postWithToken call (from mw.cx.Publish#publish) is not finding the CSRF token in the mw.Api cache, and thus fetching a new one, which then fails because the mock HTTP responses prepared by this test only expect the cx-api modules to be called. Which makes sense, because this token is meant to be cached already.

The test is passing for me locally, which suggests it might be a race condition specific to the CI environment (e.g. Chrome version, Apache/MW config, or another mw-api call causing an issue).

Krinkle lowered the priority of this task from Unbreak Now! to High.Jan 28 2019, 1:02 AM

Change 487561 had a related patch set uploaded (by Jforrester; owner: Gergő Tisza):
[mediawiki/extensions/ContentTranslation@wmf/1.33.0-wmf.14] Temporarily disable failing test

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

Change 487561 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@wmf/1.33.0-wmf.14] Temporarily disable failing test

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

Krinkle renamed this task from wmf-quibble-vendor-mysql-hhvm-docker failing due to broken QUnit test to ContentTranslation ext.cx.publish test failing.Feb 10 2019, 6:48 AM

Change 486834 abandoned by Krinkle:
ext.cx.publish: Make qunit test less fragile

Reason:
Okay, I didn't know it was deprecated.

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

Krinkle claimed this task.

Per https://gerrit.wikimedia.org/r/486834 there are no plans to improve or reactivate the failing test (the underlying feature is deprecated). Hence closing this task given the disabling of the test was likely the final change in that matter.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM