Page MenuHomePhabricator

QUnit tests for ContentTranslation fail - unable to merge commits
Closed, ResolvedPublic

Description

https://integration.wikimedia.org/ci/job/mwext-ContentTranslation-qunit/1688/console for https://gerrit.wikimedia.org/r/#/c/198544/:

09:35:47 Chromium 41.0.2272 (Ubuntu) ext.uls Common languages FAILED
09:35:47 	Died on test #1
09:35:47 Chromium 41.0.2272 (Ubuntu): Executed 291 of 291 (1 FAILED) (16.41 secs / 16.295 secs)
09:35:47 Warning: Task "karma:main" failed. Use --force to continue.
09:35:47 
09:35:47 Aborted due to warnings.

Event Timeline

Nemo_bis created this task.Mar 22 2015, 9:38 AM
Nemo_bis updated the task description. (Show Details)
Nemo_bis raised the priority of this task from to High.
Nemo_bis added a subscriber: Nemo_bis.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 22 2015, 9:38 AM
Krinkle set Security to None.
Nikerabbit renamed this task from Chromium 41.0.2272 (Ubuntu) ext.uls Common languages FAILED to QUnit tests for ContentTranslation fail - unable to merge commits.Mar 23 2015, 8:50 AM
Nikerabbit updated the task description. (Show Details)
Nikerabbit raised the priority of this task from High to Unbreak Now!.
Nikerabbit removed subscribers: Nikerabbit, hashar, KartikMistry.

There are errors such as ERROR: '[earthquake] Url exceeds maximum length' in the log but I am not sure if those are the cause, and if they are, I don't think it is related to any code change in CX. We need help to figure out what is causing the failures.

PS: Phabricator doesn't handle edit conflicts at all it seems.

ext.uls Common languages FAILED

Would it mean it is an issue in ULS? The console log shows an TypeError: undefined is not a function, might be some api change? Please try to reproduce it locally with ContentTranslation and ULS installed.

The TypeError: undefined is not a function refers to checkCssHandles in mediawiki.js. No very recent changes in that file either.

I am not able to reproduce this locally. Tests are passing.

Krinkle added a comment.EditedMar 24 2015, 5:04 AM

Approaching what Jenkins does (latest master of: MediaWiki core, ContentTranslation, UniversalLanguageSelector, EventLogging) I can reproduce the error.

Running Special:JavaScriptTest/qunit passes, but Special:JavaScriptTest/qunit/plain shows the failure.

Most likely there is an accidental link between test code and something the Skin or OutputPage provides (instead of mocking, stubbing or using an html fixture).

Test failure: ext.uls: Common languages

> TypeError: mw.uls.getFrequentLanguageList is not a function
>    at Object.<anonymous>
> (http://mediawiki.dev/extensions/UniversalLanguageSelector/tests/qunit/ext.uls.tests.js:87:26)

So it seems the error is caused by UniversalLanguageSelector (which ContentTranslation uses).

Searching for it: getFrequentLanguageList @wikimedia shows it is defined in ext.uls.init.js; which is part of module "ext.uls.interface".

This module is not loaded by the test suite according to a search for "ext.uls.interface".

The test should either not depend on this init code (preferable), or add a dependency on this module in test suite registration.

Change 199193 had a related patch set uploaded (by Santhosh):
Add missing RL dependency ext.uls.init to test module ext.uls.tests

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

Change 199193 merged by jenkins-bot:
Add missing RL dependency ext.uls.init to test module ext.uls.tests

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

santhosh claimed this task.Mar 24 2015, 5:40 AM
santhosh closed this task as Resolved.

Change 199207 had a related patch set uploaded (by KartikMistry):
Add missing RL dependency ext.uls.init to test module ext.uls.tests

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

Change 199208 had a related patch set uploaded (by KartikMistry):
Add missing RL dependency ext.uls.init to test module ext.uls.tests

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

Thank you @Krinkle for the investigation!

Change 199207 merged by jenkins-bot:
Add missing RL dependency ext.uls.init to test module ext.uls.tests

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

Change 199208 merged by jenkins-bot:
Add missing RL dependency ext.uls.init to test module ext.uls.tests

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

Is that still an issue?

I haven't seen that error in a while, if that is what you are asking.

Sorry I have missed the fact this task has been closed by Santhosh back on March 24th