Page MenuHomePhabricator

Warning: Task "stylelint:src" failed due to postcss-less@1.1.4
Closed, ResolvedPublic

Description

mediawiki-core-npm-node-6-docker is failing for a couple of unrelated patches, 420785 (mediawiki-core-npm-node-6-docker/1138) and 419179 (mediawiki-core-npm-node-6-docker/1139).

...
00:00:50.203 + npm run-script test
00:00:50.770 
00:00:50.770 > @ test /src
00:00:50.770 > grunt test
00:00:50.770 
00:00:52.450 Running "eslint:all" (eslint) task
00:01:09.779 
00:01:09.779 Running "banana:core" (banana) task
00:01:20.990 >> 4445 messages checked.
00:01:20.990 
00:01:20.990 Running "banana:api" (banana) task
00:01:21.283 >> 1754 messages checked.
00:01:21.284 
00:01:21.284 Running "banana:installer" (banana) task
00:01:21.465 >> 312 messages checked.
00:01:21.466 
00:01:21.466 Running "stylelint:src" (stylelint) task
00:01:26.572 
00:01:26.572 resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
00:01:26.572  . .  .  ...            ...           
00:01:26.573  . .  .                               
00:01:26.573  . .  .                               
00:01:26.573 
00:01:26.573 resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
00:01:26.574  .. .  .  ...            ...           
00:01:26.574   . .  .                               
00:01:26.574     .  .                               
00:01:26.574 
00:01:26.574 resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ItemMenuOptionWidget.less
00:01:26.575  .. .  .  ...            ...           
00:01:26.575   . .  .                               
00:01:26.575     .  .                               
00:01:26.575 
00:01:26.575 resources/src/mediawiki.skinning/content.parsoid.less
00:01:26.576  .. ..  .  ...                                ...                                     
00:01:26.576   . .   .                                                                             
00:01:26.576         .                                                                             
00:01:26.577  .. ..  .  ...                                ...                                     
00:01:26.577   . .   .                                                                             
00:01:26.577         .                                                                             
00:01:26.577 
00:01:26.578 resources/src/mediawiki.ui/components/buttons.less
00:01:26.578  . .  .  ...            ...           
00:01:26.578  . .  .                               
00:01:26.578  . .  .                               
00:01:26.578 
00:01:26.578 resources/src/mediawiki.ui/components/inputs.less
00:01:26.579  . .  .  ...            ...           
00:01:26.579  . .  .                               
00:01:26.579  . .  .                               
00:01:26.579 
00:01:26.579 resources/src/mediawiki.ui/components/radio.less
00:01:26.580  . .  .  ...            ...           
00:01:26.580  . .  .                               
00:01:26.580  . .  .                               
00:01:26.580 
00:01:26.580 resources/src/mediawiki.widgets/mw.widgets.TitleWidget.less
00:01:26.581  .. .  .  ...            ...           
00:01:26.581   . .  .                               
00:01:26.581     .  .
00:01:26.581 
00:01:26.581 βœ– 9 problems
00:01:26.581 
00:01:26.582 Warning: Task "stylelint:src" failed. Use --force to continue.
...

Event Timeline

Restricted Application added a subscriber: Aklapper. Β· View Herald TranscriptMar 21 2018, 11:41 AM
zeljkofilipin triaged this task as Unbreak Now! priority.Mar 21 2018, 11:42 AM
Restricted Application added subscribers: Liuxinyu970226, TerraCodes. Β· View Herald TranscriptMar 21 2018, 11:42 AM
zeljkofilipin added a comment.EditedMar 21 2018, 11:45 AM

Comparing two builds (good 1129, bad 1137), looks like this is the cause (thanks to @hashar for the idea):

< β”‚ β”œβ”€β”¬ postcss-less@1.1.3 
---
> β”‚ β”œβ”€β”¬ postcss-less@1.1.4

I was able to reproduce the problem locally:

rm -rf node_modules/
npm i
npm t
$ npm ls postcss-less
/Users/z/Documents/gerrit/mediawiki/vagrant/mediawiki
└─┬ stylelint@8.2.0
  └── postcss-less@1.1.4 

stylelint/package.json

...
 "postcss-less": "^1.1.0",
...

Change 421000 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/core@master] Lock postcss-less to v1.1.3 because v 1.1.4 breaks CI

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

hashar renamed this task from Warning: Task "stylelint:src" failed to Warning: Task "stylelint:src" failed due to postcss-less@1.1.4.Mar 21 2018, 12:32 PM

Change 421000 merged by jenkins-bot:
[mediawiki/core@master] Lock postcss-less to v1.1.3 because v 1.1.4 breaks CI

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

zeljkofilipin closed this task as Resolved.Mar 21 2018, 2:35 PM

Not really resolved; we're going to have to add this hack into every repo that uses stylelint, I suppose? There's 115 of them listed on https://www.mediawiki.org/wiki/User:Legoktm/ci alone…

Aha, there's now postcss-less 1.1.5 with a fix for this: https://github.com/shellscape/postcss-less/issues/99 / https://github.com/shellscape/postcss-less/releases – so I guess a purge of the npm caches would fix this?

I guess we can revert the workaround https://gerrit.wikimedia.org/r/421000 ?

Not until the caches are purged; right now lots of repos are still failing because they have postcss-less version 1.1.4 loaded.

Change 421192 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/CodeEditor@master] HACK: Force downgrade of postcss-less so CI will pass

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

Jdforrester-WMF reopened this task as Open.Mar 21 2018, 11:16 PM
Jdforrester-WMF lowered the priority of this task from Unbreak Now! to High.

Re-opening, de-prioritising as it's only breaking some repos, not all.

Change 421192 merged by jenkins-bot:
[mediawiki/extensions/CodeEditor@master] HACK: Force downgrade of postcss-less so CI will pass

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

At least on CirrusSearch https://gerrit.wikimedia.org/r/#/c/419804/ postcss-less@1.1.5 still cause some spurious issues.

zeljkofilipin removed zeljkofilipin as the assignee of this task.Mar 22 2018, 3:16 PM

Removed myself from assignee since I am not working on this.

Change 421345 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/extensions/CirrusSearch@master] Pin postcss-less to 1.1.3

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

Change 421345 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Pin postcss-less to 1.1.3

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

Not until the caches are purged; right now lots of repos are still failing because they have postcss-less version 1.1.4 loaded.

@hashar let's pair on this? I can revert, but I am not sure how to purge caches. πŸ˜„

I am not sure which caches is being refereed to. The node_modules directory is deleted before running npm install.

Change 422125 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/core@master] Revert "Lock postcss-less to v1.1.3 because v 1.1.4 breaks CI"

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

I have reverted 421000 with 422125. I have compared two mediawiki/core builds, 1230 (ok, postcss-less@1.1.3) and 1231 (failed, postcss-less@1.1.5):

< β”œβ”€β”¬ postcss-less@1.1.3 
...
> β”‚ β”œβ”€β”¬ postcss-less@1.1.5

Looks like postcss-less@1.1.5 does not fix the problem.

Which problem? It doesn't fix the dotdotdot issue, but seems to fix the bogus errors. In ULS we had to fix some actual issues that were detected by 1.1.5 for some reason.

Which problem?

The problem of a silent upgrade from 1.1.3 to 1.1.4/1.1.5 breaking the build. :)

It doesn't fix the dotdotdot issue, but seems to fix the bogus errors. In ULS we had to fix some actual issues that were detected by 1.1.5 for some reason.

I am not familiar with the tool or files it checks, so it is hard for me to say if the upgrade introduces problems or just finds problems that were previously there but not detected.

zeljkofilipin lowered the priority of this task from High to Normal.Mar 30 2018, 11:07 AM

Update: It wasn't postcss-less but lodash (masked by swapping, I'd guess). See T190072 and https://github.com/wikimedia/grunt-stylelint/issues/49 – I've worked around this with a new release.

zeljkofilipin removed zeljkofilipin as the assignee of this task.Apr 5 2018, 2:27 PM

I am un-assigning myself since I do not know how to fix this.

@Jdforrester-WMF, @Nikerabbit: I guess you are more likely to be able to fix this. Is there somebody else I should cc, so this gets fixed?

I see now that @Jdforrester-WMF has updated 422125. Jenkins looks happy with the patch. Thanks!

There is possible still an issue in GettingStarted:
https://integration.wikimedia.org/ci/job/mwgate-npm-node-6-docker/33366/console

07:38:00 Running "stylelint:all" (stylelint) task
07:38:02 
07:38:02 resources/lightbulb/lightbulb.flyout.less
07:38:02  .. .  .  ...                              ...        
07:38:02   . .  .                                              
07:38:02     .  .                                              
07:38:02  .. .  .  ...                              ...        
07:38:02   . .  .                                              
07:38:02     .  .
07:38:02 
07:38:02 βœ– 2 problems

Please have look if a new version unbreak this also. Thanks.

hashar added a comment.Apr 6 2018, 7:59 PM

Le 06/04/2018 Γ  10:16, Umherirrender a Γ©critΒ :

There is possible still an issue in GettingStarted:
https://integration.wikimedia.org/ci/job/mwgate-npm-node-6-docker/33366/console
07:38:00 Running "stylelint:all" (stylelint) task
07:38:02
07:38:02 resources/lightbulb/lightbulb.flyout.less
07:38:02 .. . . ... ...
07:38:02 . . .
07:38:02 . .
07:38:02 .. . . ... ...
07:38:02 . . .
07:38:02 . .
07:38:02
07:38:02 βœ– 2 problems
Please have look if a new version unbreak this also. Thanks.

That one got filled as T190072. I think that requires stylelint
packages to be upgraded to a newer version.

Change 422125 merged by jenkins-bot:
[mediawiki/core@master] build: Bump postcss-less up to 1.1.5 from 1.1.3

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

zeljkofilipin closed this task as Resolved.Apr 10 2018, 9:18 AM
zeljkofilipin claimed this task.
mmodell changed the subtype of this task from "Task" to "Production Error".Wed, Aug 28, 11:09 PM