diff options
author | James Ennis <james.ennis@codethink.co.uk> | 2019-08-09 09:57:36 +0100 |
---|---|---|
committer | James Ennis <james.ennis@codethink.co.uk> | 2019-08-13 09:36:50 +0100 |
commit | 4b0b68cdff0326d2a9b3c59ad3df6f4c05218786 (patch) | |
tree | 2d1c90bb076d1a1e5a0f1dc8060f7c4378e663e3 /src/buildstream/element.py | |
parent | 05d673ff2881e0f8a177622489ead9c9158d6032 (diff) | |
download | buildstream-4b0b68cdff0326d2a9b3c59ad3df6f4c05218786.tar.gz |
element.py: Don't reset a failed (but cached) workspaced Elementjennis/fix_failed_workspaces
A workspaced element can fail to build, if this happens, we
cache the result as a failure. This patch ensures that we
do not reset the cache data if a workspace has failed to build.
An integration test has also been added which ensures that we
are able to get the log of a failed workspace build.
Closes #1096
Diffstat (limited to 'src/buildstream/element.py')
-rw-r--r-- | src/buildstream/element.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 240e8ce7d..bc8cde311 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -1199,7 +1199,7 @@ class Element(Plugin): # marked stable either when we verify that the workspace is already # cached, or when we build/pull the workspaced element. if self.__cache_keys_unstable: - if not self._cached_success(): + if not self._cached(): self.__reset_cache_data() if not self.__assemble_scheduled: self._schedule_assemble() @@ -1215,7 +1215,7 @@ class Element(Plugin): if (not self.__assemble_scheduled and not self.__assemble_done and self.__artifact and self._is_required() and - not self._cached_success() and + not self._cached() and not self._pull_pending()): self._schedule_assemble() @@ -3163,7 +3163,7 @@ class Element(Plugin): # def __update_cache_keys_stability(self): if self.__cache_keys_unstable: - if self._cached_success(): + if self._cached(): self.__cache_keys_unstable = False elif not self.__assemble_scheduled and self.__assemble_done: self.__cache_keys_unstable = False |