Commit 5dec9568 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

fix calculation of whether a project is cachable

Summary:
Never cache first-party projects that use ShipIt.  Previously the code checked
the `shipit_fbcode_builder` property, which controlled whether or not
the `fbcode_builder` sources should be included in the project's ShipIt
mapping.  This setting is enabled for most but not all projects that use
ShipIt.

This resulted in projects that use ShipIt but that do not include the fbcode
builder sources being incorrectly cached.  This caused getdeps.py to not
run the SimpleShipitTransformerFetcher properly when their sources changed.

Reviewed By: wez

Differential Revision: D17493522

fbshipit-source-id: 57be5ac94ae44f56ccb3ce60ba23fac5d68bce0f
parent bb96fea7
......@@ -188,7 +188,7 @@ class CachedProject(object):
def is_cacheable(self):
""" We only cache third party projects """
return self.cache and not self.m.shipit_fbcode_builder
return self.cache and self.m.shipit_project is None
def download(self):
if self.is_cacheable() and not os.path.exists(self.inst_dir):
......@@ -211,7 +211,7 @@ class CachedProject(object):
return False
def upload(self):
if self.cache and not self.m.shipit_fbcode_builder:
if self.is_cacheable():
# We can prepare an archive and stick it in LFS
tempdir = tempfile.mkdtemp()
tarfilename = os.path.join(tempdir, self.cache_file_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment