Page MenuHomePhabricator

Add build product synchronization test
Closed, ResolvedPublic


Popups has a test to ensure that the build product is in sync with the source input files. Given a clean Git status, it is an error, often critical, for a build to generate different output than what was committed. This is because the build product is versioned alongside the source and committing files also publishes them in a sense. This task encompasses the work to add a precommit test similar to Popups. npm -s run build && git diff -q /resources/dist.

Event Timeline

Niedzielski triaged this task as High priority.Aug 24 2018, 3:21 PM
Niedzielski created this task.

Im curious if we need one.
To be honest I'd much rather explore a "as and when needed" approach to generating the dist rather than on every commit given the issues we have in Popups with rebasing.

The build is only actually needed when Selenium tests fail without it which usually relates to server side changes.

I'm down with chatting but please consider that if we're versioning build products, this doesn't affect the rebase problem. We just recently had a commit get a +1 that had a TypeError in Popups and I frequently see rebase failures creep in.

If we only build assets on a friday for example (e.g. as part of chores) we wouldn't ever get rebase problems. I've not looked into the Popups case just yet but a TypeError should really be picked up by integration or unit test.

I've not looked into the Popups case just yet but a TypeError should really be picked up by integration or unit test.

The TypeError is an example and fully accounting for it would require 100% code coverage. Additionally, erroneous code is not limited to those that throw Errors.

We talked about this in the CR session today and the idea was banded about that we attempt a new approach inside MobileFrontend - using the build process as a way of being in control of what get's deployed. Two ideas proposed were low effort - building on a certain day e.g. Monday morning or using a dev branch and building to master when needed. A third idea was to use a separate deploy repo like services do, but that one would need more discussion.

Hopefully we can delay this conversation until you get back @Niedzielski

A separate repo would be excellent!

Jdlrobson lowered the priority of this task from High to Low.Aug 30 2018, 1:30 AM
Jdlrobson closed this task as Resolved.Oct 24 2018, 5:30 PM
Jdlrobson claimed this task.

Woot. Yes we can.