From e6c05965ddbf07bfd6d41c08e55ec96de4aa0022 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Wed, 23 Aug 2017 11:47:44 -0700 Subject: [PATCH] Bug 1390700 - Sparse checkout profiles for mach and taskgraph; r=dustin Mercurial's sparse checkout support allows "profile" files defining what's in sparse checkouts to be defined in-tree. This convenient feature means you simply need to point a client at a path inside the repository and it dynamically resolves what files to include in the checkout. As you update revisions, the "profile" pulls in updates to the underlying file. We introduce 2 sparse profiles: 1 for mach and another for taskgraph. The goal of the "mach" profile is to provide enough files to run `mach`. If you activate this profile and run `mach`, it runs without error. But there are practically no commands available. So it isn't terribly useful. The "taskgraph" profile allows us to run `mach taskgraph`. This profile demonstrates a sparse profile feature: including other profiles. The "taskgraph" profile is thus a union of "mach" and its own entries. There is definitely some fat in these profiles. I didn't feel like chasing the long tail and getting overly granular with the profiles. If we want to optimize later, we can do that. For reference: Full checkout: ~234,000 files mach: ~2,000 files taskgraph: ~3,600 files MozReview-Commit-ID: 7pALt0MwHfE --HG-- extra : rebase_source : 1a4ba4b8a63c522dab2841e2c0019501476da2fe --- build/sparse-profiles/mach | 12 ++++++++++++ build/sparse-profiles/taskgraph | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 build/sparse-profiles/mach create mode 100644 build/sparse-profiles/taskgraph diff --git a/build/sparse-profiles/mach b/build/sparse-profiles/mach new file mode 100644 index 000000000000..4489edcb3eb9 --- /dev/null +++ b/build/sparse-profiles/mach @@ -0,0 +1,12 @@ +[include] +# Various mach commands call config.guess to resolve the default objdir name. +path:build/autoconf/config.guess +# Used for bootstrapping the mach driver. +path:build/mach_bootstrap.py +path:build/virtualenv_packages.txt +path:mach +# Various dependencies. There is room to trim fat, especially in +# third_party/python. +path:python/ +path:testing/mozbase/ +path:third_party/python/ diff --git a/build/sparse-profiles/taskgraph b/build/sparse-profiles/taskgraph new file mode 100644 index 000000000000..faeafdc1d8ac --- /dev/null +++ b/build/sparse-profiles/taskgraph @@ -0,0 +1,24 @@ +%include build/sparse-profiles/mach + +[include] +# This file is read as part of validating the taskgraph. +path:browser/locales/all-locales + +# Lots of random files in here are read. Just pull in the whole thing. +path:build/ + +# This file is read as part of validating the taskgraph. +path:mobile/locales/l10n-changesets.json + +# The main meat of this profile. +path:taskcluster/ + +# Various files in these directories are read by taskgraph. Just pull +# them all in. +path:testing/config/tooltool-manifests/ +path:testing/mozharness/ +path:tools/lint/ + +# Tooltool manifests also need to be opened. Assume they +# are all somewhere in "tooltool-manifests" directories. +glob:**/tooltool-manifests/**