diff options
author | Tristan van Berkom <tristan@codethink.co.uk> | 2020-12-01 17:14:08 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan@codethink.co.uk> | 2020-12-07 17:51:13 +0900 |
commit | 3fa8d74c3ce3d737fa602c4372a7a48bd918fbbd (patch) | |
tree | cfab6ba8acc7fd53a5b8cd8dd5226919e300d16a /tests/cachekey/project/sources/bzr1.expected | |
parent | f10feb3d024cb1b8becda17b6d25919d5042ad55 (diff) | |
download | buildstream-3fa8d74c3ce3d737fa602c4372a7a48bd918fbbd.tar.gz |
sandbox/_config.py, element.py: Refactor SandboxConfig
This commit changes SandboxConfig such that it now has a simple constructor
and a new SandboxConfig.new_from_node() classmethod to load it from a YAML
configuration node. The new version of SandboxConfig now uses type annotations.
SandboxConfig also now sports a to_dict() method to help in serialization in
artifacts, this replaces SandboxConfig.get_unique_key() since it does exactly
the same thing, but uses the same names as expected in the YAML configuration
to achieve it.
The element.py code has been updated to use the classmethod, and to
use the to_dict() method when constructing cache keys.
This refactor is meant to allow instantiating a SandboxConfig without
any MappingNode, such that we can later load a SandboxConfig from an
Artifact instead of from an parsed Element.
This commit also updates the cache keys in the cache key test, as
the cache key format is slightly changed by the to_dict() method.
Diffstat (limited to 'tests/cachekey/project/sources/bzr1.expected')
-rw-r--r-- | tests/cachekey/project/sources/bzr1.expected | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cachekey/project/sources/bzr1.expected b/tests/cachekey/project/sources/bzr1.expected index 4e66d6c12..6d194a24a 100644 --- a/tests/cachekey/project/sources/bzr1.expected +++ b/tests/cachekey/project/sources/bzr1.expected @@ -1 +1 @@ -ce45db2c82a50eec39416dc857c7a676121a5276b396ea6c7917b123a932ea34
\ No newline at end of file +4ee74db778d7d1ad83ce680320961ffa08655c87e8316aee369d8f943a56286d
\ No newline at end of file |