diff options
author | Darius Makovsky <traveltissues@protonmail.com> | 2019-10-07 11:06:13 +0100 |
---|---|---|
committer | Darius Makovsky <traveltissues@protonmail.com> | 2019-10-08 11:55:13 +0100 |
commit | 3d9458605ca87a87c9170d80cee4fecac19a0a67 (patch) | |
tree | 55394906f333e61e286fc20e207bd20f19c927dc /src/buildstream/source.py | |
parent | 97cd51d6d018c43d32ca433f0bcad7cf0dd77ca0 (diff) | |
download | buildstream-3d9458605ca87a87c9170d80cee4fecac19a0a67.tar.gz |
Defer committing workspace files to cachetraveltissues/1159
Remove XFAIL mark from test_workspace_visible and remove the explicit
SourceCache.commit() in the workspace source plugin. Allow buildstream
to handle the commit logic.
Add handling for non-cached workspace sources in
`source.Source._generate_keys()`.
Diffstat (limited to 'src/buildstream/source.py')
-rw-r--r-- | src/buildstream/source.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildstream/source.py b/src/buildstream/source.py index cea68d57e..f4b682616 100644 --- a/src/buildstream/source.py +++ b/src/buildstream/source.py @@ -1082,6 +1082,12 @@ class Source(Plugin): self.__key = generate_key(keys) + sourcecache = self._get_context().sourcecache + if self.get_kind() == 'workspace' and not sourcecache.contains(self): + sourcecache.commit(self, []) + sourcecache.cas.close_channel() + assert not sourcecache.cas.has_open_grpc_channels() + @property def _key(self): return self.__key |