Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
Gregory Szorc 02d1cf283b Bug 1391789 - Improve cache coherence via run-task integration; r=dustin
Today, cache names are mostly static and are brittle as a result.

In theory, when a backwards incompatible change is performed on
something that touches a cache, the cache name needs to be changed
to ensure tasks running the old code don't see cached data from the
new task. (Alternatively, all code is forward compatible, but that is
hard to implement in practice.)

For many things, the process works as planned. However, not everyone
knows that cache names need changed. And, it isn't always obvious
that some things require fresh caches. When mistakes are made, tasks
break intermittently due to cache wonkiness.

One area where we get into trouble is with UID and GID mismatch.
Task A will use a Docker image where our standard "worker" user/group
is UID/GID 1000:1000. Then Task B will use UID/GID 500:500. (This is
common when mixing Debian and RedHel based distros.) If they use the
same cache, then Task B needs to chown/chmod all files in the cache
or there could be a permissions problem. This is exactly why
run-task recursively chowns certain paths before dropping root
privileges.

Permissions setting in run-task solves permissions problems. But
it doesn't solve content incompatibility problems. For that, you
need to change cache names, not use caches, or blow away content
when incompatibilities are detected.

This commit starts the process of adding a little bit more coherence
to our caching story.

There are two main features in this commit:

1) Cache names tied to run-task content
2) Cache validation in run-task

Taskgraph now detects when a task is using caches with run-task. When
caches and run-task are both being used, the cache name is adjusted to
contain a hash of run-task's content. When run-task changes, the cache
name changes. So, changing run-task ensures that all caches from that point
forward are "clean." This frees run-task and any functionality related
to run-task (such as maintaining version control checkouts) from
having to maintain backwards or forwards compatibility with any other
version of run-task. This does mean that any changes to run-task
effectively wipe out caches. But changes to run-task tend to be
seldom, so this should be acceptable.

The second part of this change is code in run-task to record per-cache
properties and validate whether a populated cache is appropriate for
use. To enable this, taskgraph passes a list of cache paths via an
environment variable. For each cache path, run-task looks for a
well-defined file containing a list of "requirements." Right now,
that list is simply a version string. But other features will be
worked into it. If the cache is empty, we simply write out a new
requirements file and are done. If the file exists, we compare
requirements and fail fast if there is a mismatch. If the cache
has content but not this special file, then we abort (because this
should never happen).

The "requirements" validation isn't very useful now because the only
entry comes from run-task's source code and modifying run-task will
change the hash and cause a new cache to be used. The implementation
at this point is more demonstrating the concept than doing anything
terribly useful with it.

MozReview-Commit-ID: HtpXIc7OD1k

--HG--
extra : rebase_source : 2424696b1fde59f20152617a6ebb2afe14b94678
2017-08-18 14:07:03 -07:00
.cargo Bug 1277338 - Part 1: Turn js/src into the mozjs-sys crate; r=sfink 2016-10-13 16:12:42 -07:00
.vscode Bug 1377937 - Fix VSCode tasks on Windows (NPOTB, DONTBUILD). r=gps 2017-07-03 21:55:07 +03:00
accessible Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
addon-sdk Bug 1390106 - Stop using versioned scripts in addon-sdk. r=mossop 2017-08-14 20:38:59 +09:00
browser Bug 1392221 - FeedWriter doesn't implement nsINavHistoryObserver nor does it need to - so remove it from the QI definition. r=standard8 2017-08-21 16:27:19 +01:00
build Merge inbound to m-c, a=merge 2017-08-19 15:29:10 -07:00
caps Bug 1391720 remove _blank support for background pages, r=kmag 2017-08-18 11:30:01 -07:00
chrome Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm. 2017-08-16 13:58:35 +10:00
config Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
db Bug 1371364 - Upgrade to SQLite 3.19.3. r=mak 2017-06-08 15:23:34 -04:00
devtools Bug 1389803 - Scroll the console to the bottom on Evaluation result. r=bgrins 2017-08-18 17:46:52 +02:00
docshell Bug 1383845 - Enable tests disabled for bug 1383845. r=TYLin 2017-08-17 10:51:59 +10:00
dom Bug 1390443. P3 - rewrite the logic about mWaitingForKey. r=cpearce 2017-08-17 10:47:07 +08:00
editor Bug 1381541 - queryCommandState should consider that parent node of selection is null. r=masayuki 2017-08-18 14:48:39 +09:00
embedding Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
extensions Bug 1379345 - Transmit permissions for view-source URIs, r=ehsan 2017-08-18 12:38:04 -04:00
gfx Bug 1391855 - OTS: Match signedness in GlatEntry loop. r=jfkthame 2017-08-19 15:26:11 -07:00
gradle/wrapper Bug 1300094 - Update Gradle to 2.14.1 and Gradle Plugin to 2.1.3 r=sebastian 2016-09-22 14:31:01 -07:00
hal Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
image Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
intl Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
ipc Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
js Merge inbound to m-c, a=merge 2017-08-19 15:29:10 -07:00
layout merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-08-21 13:41:46 +02:00
media Merge inbound to central, a=merge 2017-08-18 15:53:07 -07:00
memory Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
mfbt Backed out 7 changesets (bug 1390386) for Android crashes in testSettingsPages 2017-08-17 21:06:05 -07:00
mobile Bug 1390791 - Adjust text size in tab counter dynamically. r=nechen,walkingice 2017-08-21 09:27:32 +08:00
modules Merge inbound to m-c, a=merge 2017-08-19 15:29:10 -07:00
mozglue Bug 1361410: Don't hook BaseThreadInitThunk when WRusr.dll is loaded, mitigating a crash; r=dmajor 2017-08-17 15:05:17 +02:00
netwerk Merge inbound to m-c, a=merge 2017-08-19 15:29:10 -07:00
nsprpub UPGRADE_NSPR_RELEASE This is a temporary change to the nspr code in mozilla-central. We believe we have identified a fix to TCP Fast open feature crashes. We would like to verify the fix before making changes in nspr and investing time in doing a proper fix in nspr. The issue has been discussed over e-mails and this push is justifiable before commiitting changes to nspr. Overwriting this push by a new nspr release will not break mozilla-central it will only disable the TCP fast open feature. Patch has been reviewed in bug 1384633. r=mcmanus r=:kaie: r=mayhemer a=jduell a=mcmanus 2017-08-10 23:25:31 +02:00
other-licenses Bug 1381916 - Remove support for plugins on Android r=jchen,bsmedberg 2017-07-31 12:25:16 -05:00
parser Backed out changeset 8f191f6eec22 (bug 1387569) 2017-08-19 20:21:49 +02:00
probes Bug 1344878 - add BUG_COMPONENT to probes/* files. r=Ms2ger 2017-03-24 09:50:48 -04:00
python Bug 1392304 - fix typo in mozversioncontrol for git; r=gps 2017-08-18 21:06:08 -04:00
rdf Merge inbound to central, a=merge 2017-08-18 15:53:07 -07:00
security merge autoland to mozilla-central. r=merge a=merge 2017-08-20 23:21:44 +02:00
services Bug 1368951 - add x-if-unmodified-since support to the sync test server. r=tcsc 2017-05-31 18:42:45 +10:00
servo servo: Merge #18169 - Add whitespace before line number in grid line (from upsuper:write-css-fix); r=nox 2017-08-21 07:49:11 -05:00
startupcache Bug 1386825 - Part 4: Remove remaining instances of MOZ_B2G. r=froydnj 2017-08-08 14:41:09 -07:00
storage Bug 1390147 - Remove getProperty Class hook from StatementJSHelper and AsyncStatementJSHelper. r=mrbkap 2017-08-15 16:16:07 +02:00
taskcluster Bug 1391789 - Improve cache coherence via run-task integration; r=dustin 2017-08-18 14:07:03 -07:00
testing Backed out 10 changesets (bug 1391691) for wpt failures a=backout 2017-08-21 09:19:10 -07:00
third_party Bug 1341102: Revendor rust dependencies on a CLOSED TREE. r=me 2017-08-18 16:39:58 +02:00
toolkit Bug 1391647 - Fix header title in about:telemetry r=chutten 2017-08-21 11:42:04 +02:00
tools Merge inbound to m-c, a=merge 2017-08-19 15:29:10 -07:00
uriloader Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
view Backed out changeset 497dbf087ad5 (add diagnostic asserts) (bug 1354933) 2017-07-07 14:54:55 -05:00
widget Merge inbound to central, a=merge 2017-08-18 15:53:07 -07:00
xpcom Bug 1373046 - Use idle dispatch for IncrementalFinalizeRunnable. r=billm 2017-08-15 17:30:24 +08:00
xpfe Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
.clang-format Backed out changeset b14cbbf5256a (bug 1378250) on request from sylvestre 2017-07-05 16:55:27 +02:00
.clang-format-ignore Bug 1391233 - [clang-format] Ignore the tests in the reformat r=gps 2017-08-17 14:57:03 +02:00
.clang-tidy Bug 1319396 - Update the list of checkers in the .clang-tidy file r=Ehsan 2016-11-22 12:30:19 +01:00
.cron.yml Backed out 7 changesets (bug 1387862) for yaml linting failures. 2017-08-09 21:31:30 -04:00
.eslintignore Bug 1386684 - Enable ESLint for toolkit/components/url-classifier (automatic fixes). r=hchang 2017-08-02 16:12:07 +01:00
.eslintrc.js Bug 1359011 - Make the mozilla/recommended eslint configuration the default for the whole tree. r=mossop 2017-04-25 20:12:21 +01:00
.flake8 Bug 1288432 - Use new mozlint configuration for flake8 linter, r=bc 2017-06-02 09:46:01 -04:00
.gdbinit Bug 1317802 - don't stop for SIGSYS in .gdbinit; r=jld 2016-11-16 01:13:22 -05:00
.gdbinit_python Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted 2017-05-25 11:48:03 -04:00
.gitignore Bug 1382304: hg/gitignore captures/ dir. r=nalexander 2017-07-19 11:08:06 -07:00
.hgignore Bug 1387265 - Expand talos tp6 to macosx; r=jmaher 2017-08-15 15:30:23 -04:00
.hgtags No bug - Tagging mozilla-central 320642944e42a889db13c6c55b404e32319d4de6 with FIREFOX_BETA_56_BASE a=release DONTBUILD CLOSED TREE 2017-08-02 08:35:53 +01:00
.inferconfig Bug 1357629 - Add httpclientandroidlib to .inferconfig ignore list r=nalexander,njpark 2017-04-18 20:05:25 -07:00
.lldbinit Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted 2017-05-25 11:48:03 -04:00
.taskcluster.yml Bug 1389850: use per-level decision and image workers; r=bstack 2017-08-16 13:23:13 +00:00
.ycm_extra_conf.py Bug 1293534: Fix .ycm_extra_conf after bug 1195748. r=gps 2016-08-09 10:30:58 -07:00
AUTHORS Bug 1111333 - Enable double-tap-drag to zoom. r=kats 2017-05-23 19:53:06 +02:00
CLOBBER Bug 1340910 - pt 2+3 - Import Brotli 0.6.0 from upstream, and Gecko updates required to work with Brotli 0.6.0 API changes. r=glandium 2017-08-09 11:45:39 +01:00
GNUmakefile
LEGAL
LICENSE
Makefile.in Backed out 4 changesets (bug 1259832) for apparently scheduling nightlies on every push/platform a=backout 2017-08-16 17:26:08 -07:00
README.txt Bug 1349108 - Update links in README.txt to HTTPS r=RyanVM 2017-03-21 00:11:02 -04:00
aclocal.m4 Bug 1363992 - Remove jemalloc 4. r=njn 2017-05-11 13:23:07 +09:00
build.gradle Bug 1255227 - Part 1: Stop using deprecated android-sdk-manager Gradle plugin. r=sebastian 2017-07-18 09:46:09 -07:00
client.mk Bug 1386739 - Only pass --output-sync=line to make in automation. r=gps 2017-08-15 12:30:28 -07:00
client.py
configure.in Bug 1295751 - Make it possible to copy configure.in to configure. r=gps 2016-08-16 19:35:00 -07:00
configure.py Bug 1316140 - Allow use of multiprocessing from config.status on windows. r=mshal 2016-12-21 16:28:28 -08:00
gradle.properties
gradlew
mach Bug 1316140 - Allow use of multiprocessing from config.status on windows. r=mshal 2016-12-21 16:28:28 -08:00
moz.build Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
moz.configure Bug 1385380 - Detect watchman more resiliently; r=glandium 2017-07-28 16:11:22 -07:00
mozilla-config.h.in Bug 1371266 - libpng should be built with -std=c89. r=glennrp 2017-06-08 06:29:03 -07:00
npm-shrinkwrap.json Bug 1388215 - Fix broken browser.js after merge. r=bustage-fix on a CLOSED TREE 2017-08-10 18:23:23 +02:00
old-configure.in Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
package.json Bug 1380956 - List only the directly required dependencies for ESLint in the top-level package.json. r=ahal 2017-07-14 12:21:54 +01:00
settings.gradle Backed out 2 changesets (bug 1355625) for causing bustage a=backout 2017-06-22 12:05:56 -07:00
test.mozbuild

README.txt

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    https://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    https://developer.mozilla.org/en/docs/Creating_a_patch
    https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

You can download nightly development builds from the Mozilla FTP server.
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy. Firefox nightlies, for example, can be found at:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://nightly.mozilla.org/