mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
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
This commit is contained in:
parent
9f983bae37
commit
7bb6c2a19e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user