summaryrefslogtreecommitdiff
path: root/src/buildstream
Commit message (Collapse)AuthorAgeFilesLines
* Move make plugin to bst-plugins-experimentalcoldtom/move-makeThomas Coldrick2019-08-092-98/+0
|
* Frontend: Fix bst artifact logJames Ennis2019-08-093-23/+11
| | | | | | | | This command now fetches the absolute paths of the log files in the local CAS cache and opens a pager for each path. The test has also been updated to ensure that a log file is actually obtained.
* artifact.py,element.py: Add get_logs() methodsJames Ennis2019-08-092-0/+24
|
* cascache.py: Add new contains_file() methodJames Ennis2019-08-091-0/+12
|
* cascache.py: Fix typoJames Ennis2019-08-091-1/+1
|
* _artifact.py: Fix typo in doc comment of _get_field_digest()James Ennis2019-08-091-1/+1
|
* _frontend/app.py: Fixup node._assert_symbol_name() positional argsTom Pollard2019-08-091-1/+1
| | | | | bst init was failing due to project_name_proc() incorrectly passing args to the method, remove erroneous None.
* Move meson element to bst-plugins-experimentalThomas Coldrick2019-08-082-150/+0
|
* _loader: Detect and reject duplicated dependenciesDaniel Silverstone2019-08-081-4/+24
| | | | | | | | | | When loading an element, if it has duplicated dependencies of any kind then we reject the element with a LoadError(DUPLICATE_DEPENDENCY). This means that an element `foo.bst` can only appear once in any given dependency kind, allowing it to be both `runtime` and `build`, but not either of those twice, nor either plus `all`, nor `all` twice. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* _exception: Add DUPLICATE_DEPENDENCY to LoadErrorReasonDaniel Silverstone2019-08-081-0/+3
| | | | Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* _message.py: Use element_name & element_key instead of unique_idtpollard/messageobjectTom Pollard2019-08-0819-155/+172
| | | | | | | | | | | | | 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.
* plugin.py: cache full_name member in __init__Tom Pollard2019-08-081-7/+22
| | | | | | Once project & type are resolved, the full_name can be computed and cached for efficiency. The accessor for getting the private member should also be moved to the correct section.
* element.py: Remove redundant second call to _get_cache_key()Tom Pollard2019-08-081-1/+1
|
* cli.py: Require artifact file contents to be present for `bst show`Jürg Billeter2019-08-081-3/+0
| | | | | With blob-based expiry in buildbox-casd, the presence of the artifact proto will no longer be sufficient.
* _artifact.py: Update blob mtimes in cached()Jürg Billeter2019-08-081-1/+1
| | | | This is in preparation for blob-based expiry as used by buildbox-casd.
* cascache.py: Add update_mtime parameter to contains_directory()Jürg Billeter2019-08-081-4/+13
|
* cascache.py: Fix check_exists in _reachable_refs_dir()Jürg Billeter2019-08-081-0/+3
| | | | | If `check_exists` is set, missing directories should raise a FileNotFoundError.
* _sandboxremote.py: Fetch blobs on artifact creation, not after commandJürg Billeter2019-08-083-19/+23
| | | | | | | | | 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().
* cascache.py: Add missing remote.init() to fetch_blobs()Jürg Billeter2019-08-081-0/+2
|
* Move cmake plugin to bst-plugins-experimentalcoldtom/move-cmakeThomas Coldrick2019-08-082-146/+0
| | | | | | | | | | | | It was agreed on the mailing list to move all plugins to a single repository, before moving them into domain-specific repositories. As a result it seems reasonable to move everything to the bst-plugins-experimental repo as this stepping stone, rather than creating a whole new repo. This commit starts the process of moving things over by moving only the cmake plugin to bst-plugins-experimental, and altering the tests to reflect the new location.
* plugins/elements/junction.py: Add 'ignore-junction-remotes' optionJames Ennis2019-08-062-4/+15
| | | | | | | | This option allows us to completely ignore remotes defined in the subproject. As a user, we may not wish to interact with subproject remotes as we may not be able to trust them, for example. An appropriate test and some documentation has also been added.
* plugins/elements/junction.py: Add 'cache-junction-elements' optionJames Ennis2019-08-063-2/+15
| | | | | | | | | The 'cache-junction-elements' configuration option for junction's is a boolean which enables elements from within the junction to interact with the parent project's remote(s). A test has been added to enforce this behaviour and the BST_FORMAT_VERSION has been bumped.
* _project.py: Revert back to not caching junctioned elementsJames Ennis2019-08-062-10/+6
| | | | | | | | | | | Originally, the intended default behaviour of BuildStream was to only cache project elements in project specific remotes. This behaviour was broken by: 24c0de16faec2b8b9bd6a03504ce951dc49afbe2. Introduced in !1113. This patch reverts the behaviour and asserts that junctioned elements are not pushed to their parent's project-specific remote.
* Add Element.__update_cache_keys_stability()Darius Makovsky2019-08-061-10/+20
| | | | | | This method updates the value of Element.__cache_keys_stable which is initially set in the Element.__update_cache_keys() method.
* job: fix exception caught from enum translationBenjamin Schubert2019-07-311-1/+1
| | | | | The exception was incorrectly marked as 'KeyError', but enum throw 'ValueError' instead.
* app: Show stacktrace on exception when "--debug" is Truebschubert/debug-show-traceBenjamin Schubert2019-07-301-1/+11
| | | | | | | Previously we would have the exceptions making debugging quite harder. When requesting '--debug', it seems ok to show the stack trace that created the error
* optionpool: Use 'get_enum' for getting the option typeBenjamin Schubert2019-07-291-7/+12
| | | | This improves the consistency of our error reporting
* context: Move 'CacheBuildTrees' to a FastEnumBenjamin Schubert2019-07-294-36/+26
| | | | | | This allows removing completely the '_node_get_option_str' on context and ensures every method relying on a few set of keys set their errors consistently
* context: Move scheduler actions to an EnumBenjamin Schubert2019-07-294-6/+38
| | | | Also add helpers for the cli to be able to represent 'FastEnum' directly
* node: Add 'as_enum' on ScalarNode and 'get_enum' helper on MappingNodeBenjamin Schubert2019-07-296-13/+111
| | | | | | | | This adds a method to ensure that a value is from a set of valid values and raises an error message accordingly. - Define Enum types for each of the relevant cases - Adapt call places that were doing such things manually
* types: Mark 'Consistency' as a 'FastEnum'Benjamin Schubert2019-07-291-1/+11
| | | | | | This allows for stronger guarantees when checking the level of consistency since it will only be comparable with itself, and ensures unicity
* types: Add a 'FastEnum' implementation and replace Enum by itBenjamin Schubert2019-07-295-15/+144
| | | | | | | 'Enum' has a big performance impact on the running code. Replacing it with a safe subset of functionality removes lots of this overhead without removing the benefits of using enums (safe comparisions, uniqueness)
* Bst artifact subcommands take artifact ref names.Rebecca Grayson2019-07-263-46/+55
| | | | | | Changes made to allow artifact checkout/push/pull to take artifact references as well as element names. Added test to ensure this works
* Fix up of some spelling mistakesRebecca Grayson2019-07-262-4/+4
|
* _messenger: Fix complex objects leaking into child jobsJonathan Maw2019-07-261-0/+7
|
* Render progress information for loading and processing elementsJonathan Maw2019-07-268-61/+359
|
* loader: Move sort_dependencies to loadelement as a cython methodbschubert/optimize-loaderBenjamin Schubert2019-07-262-75/+78
|
* loadelement: Move loadelement to CythonBenjamin Schubert2019-07-262-29/+54
|
* loader: Don't pickle caches for child jobs, they are not needed thereDaniel Silverstone2019-07-261-0/+5
| | | | Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* sandbox: Add initial SandboxBuildBoxJürg Billeter2019-07-254-1/+289
|
* Mark buildbox tests as xfail if they require non implemented featuresWilliam Salmon2019-07-251-0/+1
|
* Update sandbox to use virtual directoriesWilliam Salmon2019-07-252-4/+17
|
* Fix descend can not follow symlinksWilliam Salmon2019-07-253-6/+53
|
* Implmented export_to_tar for casbaseddirectoryWilliam Salmon2019-07-251-1/+30
|
* Fix infinite recursion in _partial_import_cas_into_casWilliam Salmon2019-07-251-2/+7
|
* job: try pickling child jobs if BST_TEST_SUITEaevri/pickleAngelos Evripiotis2019-07-241-0/+7
| | | | | | | | If we're running BuildStream tests then pickle child jobs. This ensures that we keep things picklable, whilst we work towards being able to support platforms that need to use the 'spawn' method of starting processes.
* Make ChildJobs and friends picklableAngelos Evripiotis2019-07-249-1/+352
| | | | | | | | | Pave the way toward supporting the 'spawn' method of creating jobs, by adding support for pickling ChildJobs. Introduce a new 'jobpickler' module that provides an entrypoint for this functionality. This also makes replays of jobs possible, which has made the debugging of plugins much easier for me.
* node: picklable {Scalar,Mapping,Sequence}NodeAngelos Evripiotis2019-07-241-0/+18
| | | | | Make ScalarNode, MappingNode, and SequenceNode pickable by implementing `__reduce__` for them.
* optionpool: make OptionPool picklableAngelos Evripiotis2019-07-241-3/+18
| | | | | In order to enable the 'spawn' method of creating jobs, make sure that OptionPool is pickable, otherwise it cannot be sent to the job process.
* _platform: make picklable, no nested methodsAngelos Evripiotis2019-07-243-49/+53
| | | | | Make the _platform implementations pickable by moving the nested _setup_*_sandbox methods up into their enclosing classes.