Page MenuHomePhabricator

mwext-qunit-jessie Jenkins job fails for MultimediaViewer (Share/Embed button not working)
Closed, ResolvedPublic

Description

While working on T180878, I have created 395025 patch for MultimediaViewer. The patch only updates some Ruby dependencies.

mwext-qunit-jessie job failed.

...
09:21:43   mmv.ui.reuse.Dialog
09:21:43     ✔ Sanity test, object creation and UI construction
09:21:43     ✖ handleOpenCloseClick():
09:21:43     ✖ handleTabSelection():
09:21:43     ✖ default tab:
09:21:43     ✖ attach()/unattach():
09:21:43     ✖ start/stopListeningToOutsideClick():
09:21:43     ✔ set()/empty() sanity check:
09:21:43     ✖ openDialog()/closeDialog():
09:21:43     ✔ getImageWarnings():
...
09:21:43 Finished in 11.545 secs / 11.303 secs @ 09:21:42 GMT+0000 (UTC)
09:21:43 
09:21:43 SUMMARY:
09:21:43 ✔ 648 tests completed
09:21:43 ✖ 6 tests failed
...

This was a surprise because the patch does not touch any code.

I have searched phabricator for MultimediaViewer mwext-qunit-jessie and MultimediaViewer handleOpenCloseClick but I did not find anything relevant.

There are 25 open MultimediaViewer patches in gerrit. I have run the job for 4 recent open patches: 364175, 378499, 163032, 389542. The job fails with the same qunit failures.


From T182658:

load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=09ih577:52 Uncaught TypeError: Cannot read property 'css' of undefined
    at OoUiMenuSelectWidget.OO.ui.mixin.FloatableElement.computePosition (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=09ih577:52)
    at OoUiMenuSelectWidget.OO.ui.mixin.ClippableElement.getHorizontalAnchorEdge (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=09ih577:58)
    at OoUiMenuSelectWidget.OO.ui.mixin.ClippableElement.clip (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=09ih577:60)
    at OoUiMenuSelectWidget.OO.ui.mixin.ClippableElement.toggleClipping (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=09ih577:57)
    at OoUiMenuSelectWidget.OO.ui.MenuSelectWidget.toggle (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=09ih577:96)
    at Dialog.DP.initTabs (load.php?debug=false&lang=en&modules=mmv&skin=vector&version=04n1lym:40)
    at Dialog.DP.toggleDialog (load.php?debug=false&lang=en&modules=mmv&skin=vector&version=04n1lym:41)
    at load.php?debug=false&lang=en&modules=mmv&skin=vector&version=04n1lym:37
    at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=1b46sjy:46)
    at Object.fireWith [as resolveWith] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=1b46sjy:47)

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptDec 8 2017, 9:53 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
zeljkofilipin triaged this task as Low priority.Dec 8 2017, 10:00 AM
zeljkofilipin updated the task description. (Show Details)
zeljkofilipin moved this task from Backlog 🔙 to Watching 👀 on the User-zeljkofilipin board.
zeljkofilipin updated the task description. (Show Details)

@matthiasmullie, @Framawiki, @MarkTraceur, @Volker_E: you are the owners of the recent patches. Do you know what went wrong?

It appears that OOJS-UI (now) has a hard requirement for a $floatableContainer in oo.ui.MenuOptionWidget.

In mmv.ui.reuse.dialog.js, L66, a $floatableContainer should be added to that config.
Or maybe OOJS-UI should not require it (since apparently this has worked just fine for some time, it could be a regression)

I don't know either of the codebases (OOJS-UI or MMV) well enough to know what exactly the correct fix would be.
I'll investigate next week, though someone who knows more about it can probably fix it easily (ping @Volker_E, @matmarex, who have touched relevant code in OOJS-UI recently)

In mmv.ui.reuse.dialog.js, L66, a $floatableContainer should be added to that config.
Or maybe OOJS-UI should not require it (since apparently this has worked just fine for some time, it could be a regression)

Yep! See T182658: MultimediaViewer: Share/Embed button not working.

Sorry for late reply. $floatableContainer is not supposed to be required.

matmarex claimed this task.Dec 12 2017, 8:33 PM
matmarex renamed this task from mwext-qunit-jessie Jenkins job fails for MultimediaViewer to mwext-qunit-jessie Jenkins job fails for MultimediaViewer (Share/Embed button not working).Dec 12 2017, 8:56 PM
matmarex updated the task description. (Show Details)
matmarex added a subscriber: gerritbot.

Change 397914 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] ClippableElement: Handle failures in FloatableElement#computePosition

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

As a side note, this interface should probably be using an IndexLayout (https://doc.wikimedia.org/oojs-ui/master/demos/#IndexLayout) to build the tabs, or at least use a TabSelectWidget instead of MenuSelectWidget with weird custom overrides. It would be more consistent and probably it'd take less code. (This probably didn't exist when this code was written though.)

Current interfaceStandard interface

This snippet actually amused me a lot:

		// MenuSelectWidget has a nasty tendency to hide itself, maybe we're not using it right?
		this.reuseTabs.toggle( true );
		this.reuseTabs.toggle = $.noop;

The fix is in OOUI, and it will be released no sooner than next Tuesday, and I suppose you might want this fixed faster. I'll prepare a manual backport to MediaWiki too (but I'm leaving it for Multimedia folks to review and deploy this).

Change 397926 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] OOjs UI: Backport Ibb4a81f4eabda8bffa44ae1629031ac9192c94e5

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

The fix is in OOUI, and it will be released no sooner than next Tuesday

The next release of OOUI is planned for January…

Right. Someone should probably merge and deploy that backport then ;)

Volker_E moved this task from Backlog to Doing on the OOUI board.Dec 12 2017, 11:22 PM
matmarex updated the task description. (Show Details)Dec 14 2017, 10:48 PM

This is the same issue as T182359, which had a patch proposed and merged last night, so I'll abandon mine and backport that instead.

Change 397914 abandoned by Bartosz Dziewoński:
ClippableElement: Handle failures in FloatableElement#computePosition

Reason:
Superseded by https://gerrit.wikimedia.org/r/#/c/398207/

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

Change 397926 abandoned by Bartosz Dziewoński:
OOjs UI: Backport Ibb4a81f4eabda8bffa44ae1629031ac9192c94e5

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

Change 398384 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] OOjs UI: Backport Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988

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

matmarex raised the priority of this task from Low to High.Dec 14 2017, 11:00 PM
matmarex removed a project: Patch-For-Review.

Change 398384 merged by jenkins-bot:
[mediawiki/core@master] OOjs UI: Backport Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988

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

Change 398386 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@wmf/1.31.0-wmf.11] OOjs UI: Backport Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988

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

Change 398387 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@wmf/1.31.0-wmf.12] OOjs UI: Backport Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988

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

Change 398387 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.12] OOjs UI: Backport Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988

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

Change 398386 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.11] OOjs UI: Backport Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988

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

Stashbot added a subscriber: Stashbot.

Mentioned in SAL (#wikimedia-operations) [2017-12-15T00:25:06Z] <catrope@tin> Synchronized php-1.31.0-wmf.12/resources/lib/oojs-ui/oojs-ui-core.js: Backport OOjs UI fix for T182359, T182395 (duration: 00m 57s)

matmarex closed this task as Resolved.Dec 15 2017, 12:31 AM
matmarex removed a project: Patch-For-Review.

Fixed and deployed.