summaryrefslogtreecommitdiff
path: root/src/buildstream/sandbox
Commit message (Collapse)AuthorAgeFilesLines
* sandbox/_sandbox*.py: Ensure missing-command is a SandboxCommandErrorDaniel Silverstone2019-08-144-16/+16
| | | | | | | | So that, should a sandbox be missing a command such as `sh`, we cache failures to build, ensure that each sandbox which checks for the command raises SandboxCommandError instead of SandboxError. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* sandbox/sandbox.py: Allow SandboxCommandError to have different reasonsDaniel Silverstone2019-08-141-2/+3
| | | | | | | | | In order to properly support caching failures to build when a sandbox is missing a command, we need to permit SandboxCommandError to take a reason parameter. We default that to that which it previously forced in order to reduce the need to add a reason code to every raise. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* _message.py: Use element_name & element_key instead of unique_idtpollard/messageobjectTom Pollard2019-08-082-13/+12
| | | | | | | | | | | | | Adding the element full name and display key into all element related messages removes the need to look up the plugintable via a plugin unique_id just to retrieve the same values for logging and widget frontend display. Relying on plugintable state is also incompatible if the frontend will be running in a different process, as it will exist in multiple states. The element full name is now displayed instead of the unique_id, such as in the debugging widget. It is also displayed in place of 'name' (i.e including any junction prepend) to be more informative.
* _sandboxremote.py: Fetch blobs on artifact creation, not after commandJürg Billeter2019-08-082-19/+21
| | | | | | | | | We need to ensure artifact files are available locally also for elements that don't run any commands (e.g., compose elements). It's also not necessary to fetch file blobs after every command. This moves file blob fetching from SandboxRemote.process_job_output() (part of Sandbox.run()) to a separate fetch_missing_blobs() method, which is invoked by Element._cache_artifact().
* sandbox: Add initial SandboxBuildBoxJürg Billeter2019-07-253-1/+264
|
* Update sandbox to use virtual directoriesWilliam Salmon2019-07-251-4/+8
|
* _exceptions.py: Align LoadError() parameter orderingtpollard/loaderrorTom Pollard2019-07-181-9/+7
| | | | | | All of the errors which subclass from BstError have their first positional argument as message, LoadError should follow this ordering for consistency.
* _yaml: Split Node-related parts into 'node.pyx'Benjamin Schubert2019-07-151-1/+2
| | | | | This makes the 'Node' API public, and available for use directly for plugins.
* _yaml: Mark 'strip_node_info' as buildstream-privateBenjamin Schubert2019-07-151-1/+1
|
* _yaml: Remove 'node_get_provenance' and add 'Node.get_provenance'Benjamin Schubert2019-07-151-3/+3
| | | | | | | | This replaces the helper method by adding a 'get_provenance' on the node directly - Adapt all call sites - Delay getting provenance wherever possible without major refactor
* _yaml: Remove 'node_validate' and replace by 'MappingNode.validate_keys'Benjamin Schubert2019-07-151-4/+4
| | | | - adapt all call sites to use the new API
* _yaml: Create 'from_dict' on Node and remove node creation methodsBenjamin Schubert2019-07-151-1/+1
| | | | | | | Using 'Node.from_dict({})' can replace new_empty_node, and the rest is not needed anymore. - Adapt all call sites
* _yaml: remove node_sanitizeBenjamin Schubert2019-07-151-1/+2
| | | | | | | | | Some call places do not need calls to 'node_sanitize' anymore, therefore removing the call entirely. Other still use it for convenience, but that doesn't seem the right way to do it for consistency. Those places have been replaced by calls to 'Node.strip_node_info()'.
* _yaml: Remove 'node_set'. Now use __setitem__Benjamin Schubert2019-07-151-1/+1
| | | | | | - Implement __setitem__ on 'MappingNode' - Implement __setitem__ on 'SequenceNode' - Adapt all call sites to use the new calling way.
* _yaml: Remove 'node_get' and migrate all remaining calls to new APIBenjamin Schubert2019-07-151-1/+1
|
* _yaml: add 'get_mapping()' to MappingNodeBenjamin Schubert2019-07-151-3/+3
| | | | | | | | This allows to get a mapping node from another 'MappingNode', replacing 'node_get(my_mapping, key, type=dict)' Also changes all places where 'node_get' was called like that by the new API.
* sandbox/_sandboxbwrap.py: Fix fuse import issuechandan/fix-fuse-checkChandan Singh2019-07-141-1/+6
| | | | | | | This will fix an issue where BuildStream currently throws an exception when running on Linux without fuse. Fixes #1081.
* Refactor of Platform and SandboxWilliam Salmon2019-07-123-8/+112
|
* Refactor, use context.messenger directlyAngelos Evripiotis2019-07-052-5/+5
| | | | | | Instead of having methods in Context forward calls on to the Messenger, have folks call the Messenger directly. Remove the forwarding methods in Context.
* _sandboxremote.py: Guard against gRPC channels in the main processjuerg/grpcJürg Billeter2019-06-191-0/+3
|
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-219-0/+2468
This was discussed in #1008. Fixes #1009.