Open Bug 1429502 Opened 7 years ago Updated 3 years ago

Provide an easy way to set MOZ_BUILD_DATE for try pushes

Categories

(Firefox Build System :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: ted, Unassigned)

Details

Firefox builds are almost 100% reproducible, in that you can get the same exact binaries out given the same sources. This is useful for validating changes to the build environment/build options: you can do a build with your changes and diff the resulting binaries. Unfortunately one large source of differences in our builds is the build id (MOZ_BUILD_DATE): it gets baked into the binaries and a bunch of other places. It's not hard to override it, but it would be nice if there was a simple way to force it to a specific value when pushing to try. It gets set in the decision task nowadays here: https://dxr.mozilla.org/mozilla-central/rev/c38d22170d6f27e94c3c53093215d20255fab27a/taskcluster/taskgraph/decision.py#206 and propagated down to actual build tasks in transforms. If we had something like `mach try --with-build-id=20180101123456 ...` that would be great. Even nicer would be a parameter that took a link to a push (maybe a treeherder URL?) and fetched info about that push to generate builds with a matching build id.
It looks like the end result of those transforms is that the buildid ends up in the MOZ_BUILD_DATE environment variable. This means you should already be able to override it with: ./mach try --env MOZ_BUILD_DATE=20180101123456 This should at least work with |mach try fuzzy|, not sure about try syntax (but it probably would there too).
Should we use the timestamp from the Mercurial changeset to derive MOZ_BUILD_DATE? We may have to ignore the try changeset. But we could look at its first parent.
Then pushing with/without your changes would produce different buildids anyway. This might be something we could tie into bug 1425313 though. This bug and that both want to use a previous push as a baseline.
This is what I did to make a try push mimic another: https://reviewboard.mozilla.org/r/211664/diff/1-2/
This worked too: https://hg.mozilla.org/try/rev/ee432477de4f1baad73050dfadc2016f51de4510 (running mach try fuzzy --env MOZ_BUILD_DATE=20180101020304 --env MOZ_SOURCE_CHANGESET=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --env MOZ_SOURCE_REPO=https://hg.mozilla.org/try)
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.