diff options
author | Jürg Billeter <j@bitron.ch> | 2019-03-26 09:43:16 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-04-12 11:17:33 +0200 |
commit | 30769028860da65af8967250cdf7679bbcc0c7b1 (patch) | |
tree | dabdbf38595ccf57fc97b3bed6eb4ff98f6b44fe | |
parent | 4c391dd6bd549c349870758b14b84c8aef48953c (diff) | |
download | buildstream-30769028860da65af8967250cdf7679bbcc0c7b1.tar.gz |
element.py: Drop remote execution fallback for incompatible plugins
Element plugins will be required to support virtual directories before
the next major version. Drop support for fallback from remote to local
execution as this blocks partial CAS.
-rw-r--r-- | buildstream/element.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index 5c28b4753..0dbb91148 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -2348,7 +2348,7 @@ class Element(Plugin): # supports it. # def __use_remote_execution(self): - return self.__remote_execution_specs and self.BST_VIRTUAL_DIRECTORY + return bool(self.__remote_execution_specs) # __sandbox(): # @@ -2376,6 +2376,11 @@ class Element(Plugin): if directory is not None and allow_remote and self.__use_remote_execution(): + if not self.BST_VIRTUAL_DIRECTORY: + raise ElementError("Element {} is configured to use remote execution but plugin does not support it." + .format(self.name), detail="Plugin '{kind}' does not support virtual directories." + .format(kind=self.get_kind())) + self.info("Using a remote sandbox for artifact {} with directory '{}'".format(self.name, directory)) sandbox = SandboxRemote(context, project, @@ -2390,12 +2395,6 @@ class Element(Plugin): yield sandbox elif directory is not None and os.path.exists(directory): - if allow_remote and self.__remote_execution_specs: - self.warn("Artifact {} is configured to use remote execution but element plugin does not support it." - .format(self.name), detail="Element plugin '{kind}' does not support virtual directories." - .format(kind=self.get_kind()), warning_token="remote-failure") - - self.info("Falling back to local sandbox for artifact {}".format(self.name)) sandbox = platform.create_sandbox(context, project, directory, |