Bug 1391476 - Print cache info; r?dustin draft
authorGregory Szorc <gps@mozilla.com>
Tue, 22 Aug 2017 16:48:03 -0700
changeset 651405 7fffb68dbea357488558dc329e44bf36064da14f
parent 651404 8775a6b4512196dfb0fdd116eb51e74dd9f96018
child 651406 4a610f3d8a9269bc1b2c977e5e9d3a3b90359ff1
push id75721
push usergszorc@mozilla.com
push dateWed, 23 Aug 2017 17:48:59 +0000
reviewersdustin
bugs1391476
milestone57.0a1
Bug 1391476 - Print cache info; r?dustin For forensic purposes. MozReview-Commit-ID: 6pcOm90cPdw
taskcluster/docker/recipes/run-task
--- a/taskcluster/docker/recipes/run-task
+++ b/taskcluster/docker/recipes/run-task
@@ -292,28 +292,34 @@ def main(args):
             print('cache %s is not a directory; this should never happen')
             return 1
 
         requires_path = os.path.join(cache, '.cacherequires')
 
         # The cache is empty. No validation necessary. Just set up our
         # requirements file.
         if not os.listdir(cache):
+            print_line(b'cache', b'cache %s is empty; writing requirements: '
+                       b'%s\n' % (cache, b' '.join(sorted(our_requirements))))
+
             with open(requires_path, 'wb') as fh:
                 fh.write(b'\n'.join(sorted(our_requirements)))
 
             # And make it read-only as a precaution against deletion.
             os.chmod(requires_path, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
 
         # The cache has content and we have a requirements file. Validate
         # requirements alignment.
         elif os.path.exists(requires_path):
             with open(requires_path, 'rb') as fh:
                 wanted_requirements = set(fh.read().splitlines())
 
+            print_line(b'cache', b'cache %s exists; requirements: %s\n' % (
+                       cache, b' '.join(sorted(wanted_requirements))))
+
             missing = wanted_requirements - our_requirements
             if missing:
                 print('requirements for populated cache %s differ from '
                       'this task' % cache)
                 print('cache requirements: %s' % ' '.join(sorted(
                     wanted_requirements)))
                 print('our requirements:   %s' % ' '.join(sorted(
                     our_requirements)))