Closed Bug 1231618 Opened 9 years ago Closed 8 years ago

Set MOZ_SOURCE_{REPO,CHANGESET} for taskcluster builds because tc-vcs breaks autodetection

Categories

(Taskcluster :: Services, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: dustin)

References

(Depends on 1 open bug)

Details

(Whiteboard: [tc-vcs])

Attachments

(1 file)

The symptom is the following: try builds from taskcluster are getting wrong information about the repository they are built from. For instance, if you download a firefox tarball from a TC build, start it, and go to about:buildconfig, it will claim to have been built from mozilla-central instead of try.

How this information ends up in Firefox itself is essentially coded in config/makefiles/rcs.mk in m-c, and the core of it is just this:

> hg showconfig paths.default

And since when tc-vcs "clones" try, it starts with mozilla-central, what's left as paths.default is mozilla-central. I argue that tc-vcs should switch paths.default so that it reflects the final repo it's cloning, not the base.

This might be true of git clones too, I don't know.
Yeah, this is bad. This impacts:
* about:buildconfig
* The info in application.ini
* The source links in symbol files
* The source info files we upload next to each build (https://public-artifacts.taskcluster.net/LRLjlqenTQOS7O3yEoURPA/0/public/build/target.txt, https://public-artifacts.taskcluster.net/LRLjlqenTQOS7O3yEoURPA/0/public/build/target.json)
Blocks: bb-to-tc
Component: General → Integration
This is important to fix before we make desktop builds in TC tier 1.

Git uses

getSourceRepo = \
  $(shell cd $(topsrcdir) && $(GIT) rev-parse --verify HEAD)

which produces a sha1, not a repo.. so I guess there's nothing to fix there?
We don't actually ship builds out of git, so I'm not particularly worried about that. catlee suggested that alternately we could fix this by explicitly passing the repo + changeset in as parameters, and stop making the build system query hg directly.
Summary: tc-vcs should change paths.default in repository's hgrc → (tier1 issue) tc-vcs should change paths.default in repository's hgrc
I'm going to be working on a replacement for tc-vcs this quarter and if we can ensure that we never query the vcs directly, we can make a pretty large optimization.  If we don't do hg commands directly, we don't need to actually put the .hg or .git repository on the workers, which is a huge savings in transfer times and makes caching a lot easier.
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> We don't actually ship builds out of git, so I'm not particularly worried
> about that. catlee suggested that alternately we could fix this by
> explicitly passing the repo + changeset in as parameters, and stop making
> the build system query hg directly.

let's just do this. Can we define MOZ_BUILD_CHANGESET / MOZ_BUILD_REPO or something and have the build system use that instead of calling hg directly?
testing/docker/desktop-build/bin/checkout-sources.sh has that data in variables already.  Perhaps if those are set, the build system could just use them, and if not, query hg?

Glandium, is that something you could whip up a patch for?
Flags: needinfo?(mh+mozilla)
There's a patch in bug 1241111 that fixes this in one place for another reason--Ubuntu's Firefox builds don't build from a Hg repo and so they were missing info that Telemetry needed. I asked the patch author if they could fix the remaining locations but haven't heard back yet.
cf. comment 7.
Flags: needinfo?(mh+mozilla)
Depends on: 1241111
Assignee: nobody → dustin
This does not block tier2 tests. Removing dep.
No longer blocks: tc-linux64-debug
Based on bug 124111 is this a WONTFIX?
I think once that bug is complete, we'll set those vars in build-linux.sh.  Please let me know if I've misunderstood!
Depends on: 1243747
Whiteboard: [tc-vcs]
Attachment #8717517 - Flags: review?(ted)
Comment on attachment 8717517 [details]
MozReview Request: Bug 1231618: set MOZ_SOURCE_{REPO,CHANGESET}; r?ted.mielczarek

https://reviewboard.mozilla.org/r/34191/#review31697

Thanks! We'll still need to get that other bug fixed about fixing our Breakpad symbols to fix this 100%, but that's basically just a build system bug.
Attachment #8717517 - Flags: review?(ted) → review+
https://hg.mozilla.org/mozilla-central/rev/0bc377ee611a
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Summary: (tier1 issue) tc-vcs should change paths.default in repository's hgrc → Set MOZ_SOURCE_{REPO,CHANGESET} for taskcluster builds because tc-vcs breaks autodetection
Component: Integration → Services
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: