From d2a4416275c96bb35d52eb10f92e32eed7fe02c6 Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Fri, 20 Sep 2019 14:07:38 -0700 Subject: [PATCH] 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 --- build/fbcode_builder/getdeps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index 0cb2ed8fd..f9ba16216 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -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)