Page MenuHomePhabricator

Speed up oojs/ui CI job/tests
Closed, ResolvedPublic

Description

oojs-ui-npm-run-jenkins-node-6-docker takes ~ 20 minutes and often times out at 30 minutes.

T155483 consolidated the CI jobs to save up Nodepool instances and to consolidate the test/demos/doc jobs that essentially did the same. Notably npm install / svgDists.

The job invokes npm run-script jenkins which breaks down to:

  • npm test
    • grunt test
  • jsduck
  • npm run postdoc
    • grunt copy:jsduck

The Gruntfile.js has a lot of tasks and can certainly be optimized.

Notably:

Karma runs Chromium/Firefox tests serially. Probably we could run them in parallel. Some seems to time out reaching the browsers but that might be unrelated.

image:distSvgs takes 3 minutes, image:distPngs ~ 90 seconds. I don't think thoses are strictly needed to run tests.

exec:composer we added it to the npm job to save a Nodepool instance ( https://gerrit.wikimedia.org/r/#/c/345284/ ). That is now a duplicate of the other Jenkins jobs that run composer test on php5/php7/hhvm.

I have created a dummy Gerrit change that adds grunt-timer. The module reports the duration of each grunt task. Filtering out anything that took less than 10 seconds:

TaskDuration, 2018-03Duration, 2019-05
svg2png:dist1 minute 0 second48 seconds
karma:main (Chromium)1 minute 52 seconds2 minutes 15 seconds
karma:other (Firefox)4 minutes 1 second(skipped except on merge) *
image:distSvgs3 minutes 49 seconds3 seconds (now svgmin:distSvgs) *
image:distPngs2 minutes 3 seconds35 seconds (now imagemin:distPngs) *
Total13 minutes 45 seconds4 minutes 58 seconds
  • == now only runs on CI

Event Timeline

Jdforrester-WMF subscribed.

Nowadays this runs significantly faster (though almost twice as fast on my local machine as on CI, sadly). I think we can deem this Resolved?

@hashar Any more things to do here/to leave this open?

hashar claimed this task.

Yup that followed up an incident which overloaded CI when "too many" oojs patches got send at the same time. But yeah it is faster now.

Eventually the jobs being triggered and the tasks they run might need to be revisited. Each job is probably doing more or less the same thing. But that is not anywhere important right now. We can just use another more up to date task later!