diff options
author | Jürg Billeter <j@bitron.ch> | 2020-08-04 16:02:27 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-08-06 07:10:28 +0200 |
commit | 6a84970155e69ca554453b56f5d6da3fa1710f31 (patch) | |
tree | 4b786d8114e98589e943856fe361b29fb0740347 | |
parent | 5c1468e7ebfeddb695eb754b606099468dcea98a (diff) | |
download | buildstream-6a84970155e69ca554453b56f5d6da3fa1710f31.tar.gz |
element.py: Drop cache checks from `_tracking_done()`
This was a workaround for inconsistent error handling in the frontend.
As the error handling is now fixed, drop these cache checks after
tracking.
-rw-r--r-- | src/buildstream/element.py | 7 | ||||
-rw-r--r-- | tests/frontend/track.py | 5 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 4c3f239a1..5782ae4af 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -1232,13 +1232,6 @@ class Element(Plugin): # source state. We need to update source state. self.__update_resolved_state() - # Check whether sources are now cached. - # This is done here so that we don't throw an exception trying to show the pipeline at the end - # This has for side-effect to cache this fact too, which will change the object's state. - # This is done here rather than later so we can validate that the sources are valid locally - self._has_all_sources_in_source_cache() - self._has_all_sources_cached() - # _track(): # # Calls track() on the Element sources diff --git a/tests/frontend/track.py b/tests/frontend/track.py index 2ebaae81f..5fe9bbde6 100644 --- a/tests/frontend/track.py +++ b/tests/frontend/track.py @@ -209,8 +209,7 @@ def test_track_consistency_error(cli, datafiles): # Track the element causing a consistency error result = cli.run(project=project, args=["source", "track", "error.bst"]) - result.assert_main_error(ErrorDomain.STREAM, None) - result.assert_task_error(ErrorDomain.SOURCE, "the-consistency-error") + result.assert_main_error(ErrorDomain.SOURCE, "the-consistency-error") @pytest.mark.datafiles(os.path.join(TOP_DIR, "consistencyerror")) @@ -221,7 +220,7 @@ def test_track_consistency_bug(cli, datafiles): result = cli.run(project=project, args=["source", "track", "bug.bst"]) # We expect BuildStream to fail gracefully, with no recorded exception. - result.assert_main_error(ErrorDomain.STREAM, None) + result.assert_main_error(ErrorDomain.PLUGIN, "source-bug") @pytest.mark.datafiles(DATA_DIR) |