Skip to content

Commit

Permalink
Bug 1290516 - Remove {{project}} from cache path for decision and act…
Browse files Browse the repository at this point in the history
…ion tasks; r=dustin

Currently, the gecko-decision and action tasks maintain a separate cache
for each "project" (Firefox repo) source checkout. In my opinion, this
is not necessary.

Separate caches/source checkouts mean a lower chance for a cache hit:
a lower chance that any given worker will have a source checkout readily
available for the "project" being built. They also mean workers store
more data and files in caches.

By using a shared cache for source checkouts, workers will ideally
only have a single source checkout cache and will be pretty much
guaranteed to have a checkout readily available (the main exception
being the first task on a freshly-provisioned worker).

A downside of a shared cache is that workers may spend more time doing
`hg update` operations. e.g. if the last task was from mozilla-release
and the current task is from mozilla-central, thousands of files will
be updated. However, I believe we will still be better off because
separate caches *increase* the probability for a full checkout, which
involves writing ~150,000 files! So I believe this change will lower
the overall amount of VCS work done by workers while possibly
sacrificing the lowest possible execution time (which is achieved by
minimizing the `hg update` work).

It's worth noting that `hg robustcheckout` (which is used by these
tasks) does the equivalent of an `hg purge --all`. This ensures that all
untracked and ignored files from previous tasks are deleted. So there
should be no contamination from previous tasks.

MozReview-Commit-ID: I5Ng3xFEfou

--HG--
extra : rebase_source : db423e5005d1e26d7dfebbbfa28893fc32caef6f
  • Loading branch information
indygreg committed Jul 29, 2016
1 parent 6542d1b commit a91e4e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ tasks:
cache:
level-{{level}}-hg-shared: /home/worker/hg-shared
level-{{level}}-{{project}}-gecko-decision: /home/worker/workspace
level-{{level}}-gecko-decision: /home/worker/workspace

features:
taskclusterProxy: true
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/taskgraph/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ payload:
cache:
level-{{level}}-hg-shared: /home/worker/hg-shared
level-{{level}}-{{project}}-gecko-decision: /home/worker/workspace
level-{{level}}-gecko-decision: /home/worker/workspace

features:
taskclusterProxy: true
Expand Down

0 comments on commit a91e4e1

Please sign in to comment.