Page MenuHomePhabricator

Less_Exception_Compiler: variable @min-width-desktop-wide is undefined in file /srv/mediawiki/php-1.41.0-wmf.30/skins/Vector/skinStyles/ext.echo.styles.alert.less in ext.echo.styles.alert.less on line 22, column 2320
Closed, ResolvedPublicPRODUCTION ERROR

Description

NOTE: Caused by T345766
Error
labels.normalized_message
[1c996f933eac40cde5d84a80] [no req]   Less_Exception_Compiler: variable @min-width-desktop-wide is undefined in file /srv/mediawiki/php-1.41.0-wmf.30/skins/Vector/skinStyles/ext.echo.styles.alert.less in ext.echo.styles.alert.less on line 22, column 23
20
error.stack_trace
from /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Variable.php(53)
#0 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Expression.php(46): Less_Tree_Variable->compile(Less_Environment)
#1 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Value.php(25): Less_Tree_Expression->compile(Less_Environment)
#2 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Rule.php(83): Less_Tree_Value->compile(Less_Environment)
#3 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Paren.php(32): Less_Tree_Rule->compile(Less_Environment)
#4 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Expression.php(46): Less_Tree_Paren->compile(Less_Environment)
#5 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Value.php(25): Less_Tree_Expression->compile(Less_Environment)
#6 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Media.php(54): Less_Tree_Value->compile(Less_Environment)
#7 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Ruleset.php(95): Less_Tree_Media->compile(Less_Environment)
#8 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Ruleset.php(95): Less_Tree_Ruleset->compile(Less_Environment)
#9 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Tree/Ruleset.php(95): Less_Tree_Ruleset->compile(Less_Environment)
#10 /srv/mediawiki/php-1.41.0-wmf.30/vendor/wikimedia/less.php/lib/Less/Parser.php(181): Less_Tree_Ruleset->compile(Less_Environment)
#11 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/FileModule.php(1130): Less_Parser->getCss()
#12 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/FileModule.php(1013): MediaWiki\ResourceLoader\FileModule->compileLessString(string, string, MediaWiki\ResourceLoader\DerivativeContext)
#13 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/FileModule.php(989): MediaWiki\ResourceLoader\FileModule->processStyle(string, string, MediaWiki\ResourceLoader\FilePath, MediaWiki\ResourceLoader\DerivativeContext)
#14 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/FileModule.php(967): MediaWiki\ResourceLoader\FileModule->readStyleFile(MediaWiki\ResourceLoader\FilePath, MediaWiki\ResourceLoader\DerivativeContext)
#15 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/FileModule.php(406): MediaWiki\ResourceLoader\FileModule->readStyleFiles(array, MediaWiki\ResourceLoader\DerivativeContext)
#16 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/Module.php(860): MediaWiki\ResourceLoader\FileModule->getStyles(MediaWiki\ResourceLoader\DerivativeContext)
#17 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/Module.php(819): MediaWiki\ResourceLoader\Module->buildContent(MediaWiki\ResourceLoader\DerivativeContext)
#18 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/ResourceLoader.php(1258): MediaWiki\ResourceLoader\Module->getModuleContent(MediaWiki\ResourceLoader\DerivativeContext)
#19 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/ResourceLoader.php(1178): MediaWiki\ResourceLoader\ResourceLoader->addOneModuleResponse(MediaWiki\ResourceLoader\DerivativeContext, Wikimedia\Minify\IdentityMinifierState, string, MediaWiki\ResourceLoader\FileModule, array)
#20 /srv/mediawiki/php-1.41.0-wmf.30/includes/ResourceLoader/ResourceLoader.php(1111): MediaWiki\ResourceLoader\ResourceLoader->getOneModuleResponse(MediaWiki\ResourceLoader\DerivativeContext, string, MediaWiki\ResourceLoader\FileModule)
#21 /srv/mediawiki/php-1.41.0-wmf.30/extensions/WikimediaMaintenance/blameStartupRegistry.php(141): MediaWiki\ResourceLoader\ResourceLoader->makeModuleResponse(MediaWiki\ResourceLoader\DerivativeContext, array)
#22 /srv/mediawiki/php-1.41.0-wmf.30/maintenance/includes/MaintenanceRunner.php(703): BlameStartupRegistry->execute()
#23 /srv/mediawiki/php-1.41.0-wmf.30/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#24 /srv/mediawiki/multiversion/MWScript.php(159): require_once(string)
#25 {main}
Impact
Notes

Two log errors which originate from mwmaint2002 when running MediaWiki-extensions-WikimediaMaintenance script blameStartupRegistry.php.

I don't know how the less variable @min-width-desktop-wide ends up not being defined, but that looks like something that should be caught by CI ahead of time?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Introduced in rSVEC8a88f61e89f9: Introduce media query breakpoint variables and replace all media query usage… (T310536: Fix inconsistent media query usage to avoid 1px viewport bugs), though probably caused by rSVECfd046f3258b9: Use skin variables instead of local variables where possible?

diff --git a/skinStyles/ext.echo.styles.alert.less b/skinStyles/ext.echo.styles.alert.less
index c0326d8..a9303a9 100644
--- a/skinStyles/ext.echo.styles.alert.less
+++ b/skinStyles/ext.echo.styles.alert.less
@@ -1,4 +1,4 @@
-@import '../resources/common/variables.less';
+@import 'mediawiki.skin.variables.less';
 
 /** Mixin for collapsing the Echo new messages alert */
 .echo-alert-collapse() {

Change 964966 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Fixes Echo skin style for user message bar

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

Jdlrobson triaged this task as Unbreak Now! priority.Oct 10 2023, 6:59 PM

Presumably this would be a deployment blocker given the warnings and the fact it breaks the yellow bar of doom (you have new messages alert).

How it should look and how it's looking:

Screenshot 2023-10-10 at 12.03.30 PM.png (417×887 px, 63 KB)

Screenshot 2023-10-10 at 12.03.35 PM.png (210×887 px, 38 KB)

Change 964966 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fixes Echo skin style for user message bar

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

Change 964600 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@wmf/1.41.0-wmf.30] Fixes Echo skin style for user message bar

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

This was caught by Pixel regression tests, but presumably missed because of yesterday's holiday:
https://pixel.wmcloud.org/reports/echo/index.html

I am wondering why that was not caught by CI tests when the patch got proposed? MediaWiki core has a structure test suite which runs for all extensions and skins and should probably have caught it, most probably via tests/phpunit/structure/ResourcesTest.php. Then it doesn't look like any test triggers a Less compilation which is unfortunate.

hashar renamed this task from [1c996f933eac40cde5d84a80] [no req] Less_Exception_Compiler: variable @min-width-desktop-wide is undefined in file /srv/mediawiki/php-1.41.0-wmf.30/skins/Vector/skinStyles/ext.echo.styles.alert.less in ext.echo.styles.alert.less on line 22, column 2320 to Less_Exception_Compiler: variable @min-width-desktop-wide is undefined in file /srv/mediawiki/php-1.41.0-wmf.30/skins/Vector/skinStyles/ext.echo.styles.alert.less in ext.echo.styles.alert.less on line 22, column 2320.Oct 11 2023, 7:15 AM

Change 964600 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.41.0-wmf.30] Fixes Echo skin style for user message bar

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

Mentioned in SAL (#wikimedia-operations) [2023-10-11T08:00:02Z] <hashar@deploy2002> Synchronized php-1.41.0-wmf.30/skins/Vector: Backports for Vector styling issues T348572 T348530 (duration: 06m 16s)

@Jdlrobson as a follow up can you check why the missing variable in less hasn't been caught by tests/CI? I thought we had a structure tests in mediawiki/core to compile the less files provided by the ResourceLoader. But maybe I misremember :)

As another task of course! Thank you :]

Change 997866 had a related patch set uploaded (by Paladox; author: Jdlrobson):

[mediawiki/skins/Vector@REL1_41] Fixes Echo skin style for user message bar

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

Change 997866 merged by jenkins-bot:

[mediawiki/skins/Vector@REL1_41] Fixes Echo skin style for user message bar

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