Page MenuHomePhabricator

[subtask] Add bundlesize tests
Closed, ResolvedPublic0 Estimated Story Points

Description

To ensure we're well aware of code size changes, we should add bundlesize minified, gzipped compressed entry size tests. E.g., see Popups and Portals.

Related Objects

StatusSubtypeAssignedTask
Resolved Jdlrobson
Resolved Jdlrobson
Resolved Jdlrobson
Resolved Jdlrobson
Resolved Jdlrobson
Resolved Jdlrobson
Resolved Jdlrobson
Resolved Jdlrobson
Resolved Jdlrobson
ResolvedABorbaWMF
DeclinedNone
Resolved Jdlrobson
DeclinedNone
Resolved Jdlrobson
ResolvedJdrewniak
Resolvedpmiazga
Resolved Jdlrobson
OpenNone
Resolved Jdlrobson
DeclinedNone
DuplicateNone
Resolved Jdlrobson
DeclinedNone
Resolved Jdlrobson

Event Timeline

Niedzielski created this task.

Change 455243 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[mediawiki/extensions/MobileFrontend@master] Hygiene: add gzipped minified bundle size tests

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

@ovasileva /cc @Jdlrobson, sorry I needed to work on this unplanned task to report on requested sizing differences in T199452. Both this task and T199452 are ready for review.

Jdlrobson renamed this task from Add bundlesize tests to [subtask] Add bundlesize tests.Aug 27 2018, 5:10 PM
Jdlrobson set the point value for this task to 0.

Change 455243 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Hygiene: add gzipped minified bundle size tests

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

Tested locally, works as expected. After a couple changes to the mobile.startup.js script started to fail that file size exceed the max size.

Are there not better ways to track changes to the filesizes, e.g. a warning comment added to the patch like is done with code coverage dropping in some repos? This makes rebasing in MF (which is already very fiddly) even harder.

Are there not better ways to track changes to the filesizes, e.g. a warning comment added to the patch like is done with code coverage dropping in some repos? This makes rebasing in MF (which is already very fiddly) even harder.

It can be run with warning code rather than error code, however we intentionally pin it to the current code value size, so that we are mindful of code changes on every patch (and whether those are desirable/acceptable). This is intentionally fiddly and has prevented a few accidental bumps in size due to badly managed webpack. Note, as we stablise this code and reduce number of modules, I expect this to become less fiddly.

I think for editing code, that's not on the critical path you might want to relax the bundle sizes to give you more leeway e.g. (kb rather than byte precision).

Note, there are 2 places we measure bundle sizes - via bundlesize and webpack. Personally I am not a fan of the webpack config bundle (which is more prone to change) although not strongly opposed to (although I know Stephen finds it important). Maybe we could consider removing those values to reduce friction?

Note, there are 2 places we measure bundle sizes - via bundlesize and webpack. Personally I am not a fan of the webpack config bundle (which is more prone to change) although not strongly opposed to (although I know Stephen finds it important).

Just wanted to chime in that I think the bundlesize tests are also important. I'd be fine with loosening the Webpack performance checks if they're blocking progress.