Bug 1503756 - Inherit from working desktop1604-test image to work around non-deterministic rebuilding; r=dustin
The desktop1604-test image doesn't build deterministically, primarily
due to not pinning APT package indices. Rebuilding it from scratch
today results in at least 2 problems causing test failures. One has
to do with a renamed media device. Another is not yet determined but
is causing the Android emulator to fail.
Various people have spent several hours trying to debug the failures.
There are some leads. But no obvious solution is in sight. Various
code landings are blocked on this.
Enough is enough.
This commit modifies desktop1604-test so it inherits from a base image
that contains the last good build of the image. Other minimal
modifications were made to enable the image to build with a populated
base image.
This is a gross hack. It is equivalent to sweeping dust under the rug.
But it gets the job done. It should unblock various code landings.
The base image was imported from task K-qJkvIqQQ-EFK8-4zg_nA.
The intent is to undo this hack ASAP by fixing the base image. This is
tracked by bug 1511527.
As part of developing this patch, I ran into at least two different
issues building the Docker image using the last known good image as a
base.
On my desktop machine using btrfs for Docker storage, the image failed to
build due to a "failed to export image: failed to create image: failed
to get layer XXX: layer does not exist" error.
In CI, I ran into separate issues where some rm invocations didn't
work. Why, I have no clue.
I ran a docker export | docker import of a running container with
the good image to produce a new Docker image with just the filesystem
contents. This had the effect of squashing the original Docker image
into a single layer. For reasons I can't explain, this made the image
build in CI. Welcome to the wonderful world of Docker bugs, everyone.
Differential Revision: https://phabricator.services.mozilla.com/D13600