Enable sparse checkout in macOS worker hrgc
Categories
(Infrastructure & Operations :: RelOps: Puppet, task)
Tracking
(Not tracked)
People
(Reporter: chmanchester, Assigned: dragrom)
References
Details
Attachments
(1 file)
55 bytes,
patch
|
chmanchester
:
feedback+
dhouse
:
checked-in+
|
Details | Diff | Splinter Review |
Comment 1•6 years ago
|
||
connor, what's the hgrc magic for sparse checkouts (and is there a minimum hg version)? also, yay!
Comment 2•6 years ago
|
||
Enabling the extension is just
[extensions]
sparse =
The minimum version that includes sparse is 4.3. All CI clients should be on that version or newer.
Once the extension is enabled, the invocation of robustcheckout
needs to include --sparseprofile <profile path>
. Profiles are checked in to central at build/sparse-profiles
.
Sparse checkouts come with the requirement that all consumers of that given checkout be sparse as well. From a comment in robustcheckout
:
Refuse to enable sparse checkouts on existing checkouts. The reasoning
here is that another consumer of this repo may not be sparse aware. If we
enabled sparse, we would lock them out.
There is a hint attached to the raised error that says "use a separate working directory to use sparse". So I think you will also need to switch the cache over to a sparse cache within the task definition.
I have yet to use sparse checkouts/profiles/etc for anything so I don't know too much about them. Taking a look through the sparse profiles checked in to central, it doesn't look like there are any existing profiles that would be useful for speeding up build tasks. The existing profiles are used for things like only checking out mach
, or only checking out the taskgraph generation code. Can you expand on what you'd like to use sparse checkouts for? If you're looking to speed up builds, I'm pretty sure you will need to use the full checkout. :/
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Connor Sheehan [:sheehan] from comment #2)
Enabling the extension is just
[extensions] sparse =
The minimum version that includes sparse is 4.3. All CI clients should be on
that version or newer.Once the extension is enabled, the invocation of
robustcheckout
needs to
include--sparseprofile <profile path>
. Profiles are checked in to central
atbuild/sparse-profiles
.Sparse checkouts come with the requirement that all consumers of that given
checkout be sparse as well. From a comment inrobustcheckout
:Refuse to enable sparse checkouts on existing checkouts. The reasoning
here is that another consumer of this repo may not be sparse aware. If we
enabled sparse, we would lock them out.There is a hint attached to the raised error that says "use a separate
working directory to use sparse". So I think you will also need to switch
the cache over to a sparse cache within the task definition.I have yet to use sparse checkouts/profiles/etc for anything so I don't know
too much about them. Taking a look through the sparse profiles checked in to
central, it doesn't look like there are any existing profiles that would be
useful for speeding up build tasks. The existing profiles are used for
things like only checking outmach
, or only checking out the taskgraph
generation code. Can you expand on what you'd like to use sparse checkouts
for? If you're looking to speed up builds, I'm pretty sure you will need to
use the full checkout. :/
I'd like to use sparse checkout for the pgo profiling run, which needs a mach environment, the profile server script, and some test pages checked in to the tree. It should be able to run without any source files or regular test files so I expect a big improvement in checkout time.
Reporter | ||
Comment 4•6 years ago
|
||
Hi :fubar, do you know who might be able to take this? Thank you
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
I applied changes on t-yosemite-r7-380.test.releng.mdc1.mozilla.com.
:chmanchester You can use this worker to test sparse extension
Reporter | ||
Comment 8•6 years ago
|
||
(In reply to Dragos Crisan [:dragrom] from comment #7)
I applied changes on t-yosemite-r7-380.test.releng.mdc1.mozilla.com.
:chmanchester You can use this worker to test sparse extension
Thank you for doing so. Excuse my ignorance, but can you direct me on how to connect to this worker? I tried simply pushing to try, but I get the same error.
Assignee | ||
Comment 9•6 years ago
|
||
Pushed some tests on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7112f6a9ee7fef7ceeb4c044ac72644b68da6eaa
Assignee | ||
Comment 10•6 years ago
|
||
(In reply to Chris Manchester (:chmanchester) from comment #8)
(In reply to Dragos Crisan [:dragrom] from comment #7)
I applied changes on t-yosemite-r7-380.test.releng.mdc1.mozilla.com.
:chmanchester You can use this worker to test sparse extension
Thank you for doing so. Excuse my ignorance, but can you direct me on how to connect to this worker? I tried simply pushing to try, but I get the same error.
You can redirect your pushed jobs to run on staging environment. To do this you can follow the documentation:
https://wiki.mozilla.org/ReleaseEngineering#Run_the_tasks_to_staging_pools_.28OSX.2FLinux.29
Reporter | ||
Comment 11•6 years ago
|
||
I was able to specify a build with a sparse profile without it rejecting the configuration, but I don't think it succeeded in making the checkout any faster. Connor, can you take a quick look at https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=225288340&revision=a4caf114351ffd3d9cef3c94c4ca9c0b7871171b and maybe tell me where I'm going wrong here? Thanks!
Comment 12•6 years ago
|
||
Twenty minutes in that task are spent cloning off hgmo due to not using a repo cache on the worker. The sparse checkout seems to work, as you only update 11k files instead of the ~250k in-tree.
Unless the MacOS workers don't use shared storage for some reason, I think the task is just incorrectly specifying the cache path. By using a local path we end up looking for a cache in the task-specific directory (/Users/cltbld/tasks/task_1548950850/checkouts/hg-shared
). I think you want to point them at /builds/hg-shared
(that seems to be the common location from a brief scan of central). I don't know much about how the macOS workers are configured, though.
Reporter | ||
Comment 13•6 years ago
|
||
Ok, thanks Connor. I'll take a look. In the meantime sparse-checkout has been correctly configure here.
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Comment 14•6 years ago
|
||
:dhouse Can you please land this PR Monday morning and close the bug?
Assignee | ||
Updated•6 years ago
|
Comment 15•6 years ago
|
||
Thx Dragos. I was late to merge this one!
I confirmed the sparse line is added on ~cltbld/.hgrc on the mac workers (all but a few problem ones that haven't run puppet).
Description
•