summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Provide configuration for the optional creation of buildtreestpollard/896Tom Pollard2019-02-134-14/+216
| | | | | | | | | | | | | | | | | | | | | Artifacts can be cached explicitly with an empty `build tree` when built via the cli main options or user config for all or only successful build artifacts. Default behaviour is to still create and cache all expected buildtrees. element.py: _cache_artifact() Check if context for cache_buildtrees has been set to always or failure with a corresponding build result, if not skip attempting to export the build-root. Element types without a build-root are cached with an empty buildtree regardless. Update _stage_sources_at() to warn the user that the buildtree import is empty. tests/integration: Add test to artifact.py for the optional caching of buildtree content from bst build. Rename build-tree.py to shellbuildtrees.py to reflect included test cases, add test for empty buildtree warning and failure option. NEWS: Add entry for new option.
* _frontend/cli.py: Ensure failed buildtree warning is correctTom Pollard2019-02-131-1/+2
| | | | | | not _cached_sucess() could resolve to true if the element wasn't cached at all. switch to _cached_failure() to ensure condition reflects expected artifact state
* Add cli main & user conf option for 'cache-buildtrees' contextTom Pollard2019-02-135-2/+24
| | | | | | | | | | | | | _context.py: Add cache_buildtrees global user context, the default of which is set to by default to 'always' via the addition of cache-buildtrees to userconfig.yaml cache group. 'failure' & 'never' can be given as valid options. app.py & cli.py: Add --cache-buildtrees as a bst main option, which when passed with a valid option can override the default or user defined context for cache_buildtrees. tests/completions/completions.py: Update for the added flag.
* Merge branch 'juerg/list-all-directories' into 'master'Jürg Billeter2019-02-1333-41/+44
|\ | | | | | | | | Return all directories in list_relative_paths() See merge request BuildStream/buildstream!1139
| * _casbaseddirectory.py: Return all directories in list_relative_paths()Jürg Billeter2019-02-131-4/+4
| | | | | | | | This matches the change in utils.list_relative_paths().
| * utils.py: Return all directories in list_relative_paths()Jürg Billeter2019-02-1315-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning only empty directories leads to inconsistencies when computing a manifest by combining results from multiple list_relative_paths() calls as done by the compose plugin. I.e., the same directory may be empty in one dependency and non-empty in another dependency. The merged file list will still contain that directory even though it's no longer empty. This inconsistency causes problems when calculating differences between manifests. Returning all directories fixes these inconsistencies. This is a change in API behavior.
| * tests/integration/project: Add tests directory to split ruleJürg Billeter2019-02-131-0/+2
| | | | | | | | | | This is required to fix tests with the following commit that changes list_relative_paths() to return all directories.
| * projectconfig.yaml: Consistently include directories in split rulesJürg Billeter2019-02-1330-29/+35
|/ | | | | | | | | Most split rules already included the relevant directories themselves in addition to the directory contents. Add the missing bin, sbin, and libexec directories. This is required to fix tests with the following commit that changes list_relative_paths() to return all directories.
* Merge branch 'jennis/refactor_artifact_log' into 'master'James Ennis2019-02-1311-200/+375
|\ | | | | | | | | Refactor artifact log command See merge request BuildStream/buildstream!1101
| * _stream.py: _classify_artifacts() should be able to handle globsjennis/refactor_artifact_logJames Ennis2019-02-131-13/+11
| | | | | | | | | | | | | | | | | | _classify_artifacts() no longer filters glob expressions by first obtaining a list of ALL refs locally cached. We now only obtain refs specified by the glob expression. Furthermore, the Project.element_path is used to start searching for globbed elements as opposed to the Project.directory.
| * cascache.py: Allow CASCache.list_refs() to handle globsJames Ennis2019-02-132-7/+24
| | | | | | | | | | This commit ensures that CASCache.list_refs(), and ArtifactCache.list_artifacts(), can both handle glob expressions.
| * cli.py: Remove _classify_artifacts() methodJames Ennis2019-02-131-33/+0
| | | | | | | | This method has been moved to Stream, where is it used there exclusively.
| * cli.py: Move artifact ref handling logic to streamJames Ennis2019-02-132-47/+43
| | | | | | | | | | The loading of elements and the handling of artifacts does not belong in this module. Such logic should be invoked using the Stream API
| * _artifactcache.py: Add get_artifacts_log() methodJames Ennis2019-02-131-0/+17
| | | | | | | | | | | | | | A CasBasedDirectory object of an artifacts logs can be obtained with ArtifactCache.get_artifacts_log(). This ultimately calls CASCache.get_top_level_dir() to obtain a CasBasedDirectory of an artifact's subdirectory (or subdirectories).
| * _stream.py: Allow loading to handle artifact refsJames Ennis2019-02-131-14/+32
| |
| * _stream.py: Modify behaviour of _classify_artifacts()James Ennis2019-02-131-17/+23
| | | | | | | | | | | | * There is no need for this method to use a cas object. * Search for artifact globs in the project's element path * An artifact key is always 64 chars long
| * _stream.py: Add the _classify_artifacts() helperJames Ennis2019-02-131-0/+45
| |
| * _project.py: Add create_artifact_element() methodJames Ennis2019-02-131-0/+14
| |
| * _artifactelement.py: New ArtifactElement object (derived from Element)James Ennis2019-02-132-0/+97
| | | | | | | | | | | | This object should be used when we want to handle artifact refs directly from the command line. An ArtifactElementError has also been added to _exceptions.py
| * metaelement.py: Provide constructor with default keyword argumentsJames Ennis2019-02-131-9/+9
| |
| * element.py: Return early in __init_defaults if no plugin configJames Ennis2019-02-131-0/+2
| |
| * element.py: Make calculate_cache_key() API privateJames Ennis2019-02-131-40/+39
| |
| * element.py: Lift ArtifactCache.get_artifact_fullname() to hereJames Ennis2019-02-134-49/+48
|/ | | | | | | | This commit removes the method ArtifactCache.get_artifact_fullname() and replaces it with Element.get_artifact_name() Given a key, we are now able to construct the full name of any of an element's artifacts.
* Merge branch 'valentindavid/pull-chmod-bug' into 'master'Valentin David2019-02-122-5/+88
|\ | | | | | | | | buildstream/_cas/cascache.py: Set 0644 rights to pulled files See merge request BuildStream/buildstream!1144
| * buildstream/_cas/cascache.py: Set 0644 rights to pulled filesvalentindavid/pull-chmod-bugValentin David2019-02-122-5/+88
|/ | | | This was broken by 5ef19a0b31df84caed1e41719ef7ea5c6bd8a8bc.
* Merge branch 'jonathan/junction-no-tmpdir' into 'master'Jonathan Maw2019-02-122-44/+17
|\ | | | | | | | | | | | | Stage junctions into .bst instead of a tmpdir Closes #895 See merge request BuildStream/buildstream!1134
| * Remove cleanup functionality from loaderJonathan Maw2019-02-122-41/+6
| | | | | | | | | | | | | | | | | | | | | | | | Since junction check-outs are now persistent, there is no need to clean up temporary directories once finished. Now, junction checkouts are stored within the top-level project dir and will be cleaned-up when that directory is removed. This involves changes in: * loader.py: Remove cleanup logic and passing-around of tmpdir. * _project.py: Remove passing around tmpdir and calling loader's cleanup.
| * loader.py: Load junction from workspace if one's openJonathan Maw2019-02-121-1/+6
| |
| * loader.py: Stage junctions into .bst instead of a tmpdirJonathan Maw2019-02-121-4/+7
|/
* Merge branch 'danielsilverstone-ct/further-optimisations' into 'master'Benjamin Schubert2019-02-122-30/+101
|\ | | | | | | | | Further optimisations See merge request BuildStream/buildstream!1131
| * _context.py: Cache result of get_strict()Daniel Silverstone2019-02-121-6/+9
| | | | | | | | | | | | | | | | | | While get_strict() doesn't look expensive per-se, it is called so many times that it is valuable to cache the result once computed. Since I don't think it can change once it is computable, cache it immediately that becomes possible and we save 20s in my test case. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * _yaml.py: Reduce cost of node_final_assertionsDaniel Silverstone2019-02-121-5/+13
| | | | | | | | | | | | | | | | | | By re-using the isinstance replacements from earlier commits and using a tuple of the string constants for checking for composition markers, we reduce the cost of node_final_assertions by two thirds in basic testing. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * _yaml.py: Remove use of isinstance() in `{node,list}_{chain_,}copy`Daniel Silverstone2019-02-121-15/+57
| | | | | | | | | | | | | | | | A non-trivial proportion of time pre-scheduler in `bst build` is spent copying (or chain-copying) nodes. Approximately a quarter of the time spent in that effort is in `isinstance()`. This removes that CPU load. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * _yaml.py: Reduce use of `isinstance()` in `node_sanitize()`Daniel Silverstone2019-02-121-3/+21
| | | | | | | | | | | | | | | | | | | | We know that nodes are typically one of: str, list, dict, bool, tuple, NoneType or our ChainMap Of these, dict and ChainMap are Mapping, only list is list and the rest are returned unchanged. We can reduce/defer our use of isinstance here, dramatically, improving performance. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * _yaml.py: Only retrieve provenance in node_get() when neededDaniel Silverstone2019-02-121-1/+1
|/ | | | | | | | | | We were indiscriminately retrieving the node's provenance data in the `node_get()` function which was accounting for approximately a third of the total runtime of `node_get()` which dominates pre-scheduler time in `bst build`. This change ameliorates that situation by only retrieving the provenance data when it's actually needed. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Merge branch 'jjardon/fedora_29' into 'master'Javier Jardón2019-02-121-15/+10
|\ | | | | | | | | .gitlab-ci.yml: Test with current fedora release: 29 See merge request BuildStream/buildstream!1137
| * .gitlab-ci.yml: Remove "tests-python-3.7-stretch" jobJavier Jardón2019-02-121-10/+0
| | | | | | | | Fedora 29 includes python 3.7 so this is not needed anymore
| * .gitlab-ci.yml: run all generic fedora test in current stable version:29Javier Jardón2019-02-121-5/+5
| |
| * .gitlab-ci.yml: Add job to run test in current Fedora:29Javier Jardón2019-02-121-0/+5
|/
* Merge branch 'chandan/deps' into 'master'Chandan Singh2019-02-1224-22/+77
|\ | | | | | | | | | | | | _frontend: Allow printing dependencies using `bst show` Closes #890 See merge request BuildStream/buildstream!1121
| * Re-generate man pageschandan/depsChandan Singh2019-02-1221-21/+27
| |
| * _frontend: Allow printing dependencies using `bst show`Chandan Singh2019-02-123-1/+50
|/ | | | | | | | | | | | | | | | | | At present, there isn't an easy way to print anything from `bst show` that would give the users an idea of what the dependency graph looks like. One could use things like `--deps build`, but that will just print a list, without any information about the dependency edges. Add `%{deps}`, `%{build-deps}` and `%{runtime-deps}` format strings to `bst show` that would simply print the list of all dependencies, build dependencies and runtime dependencies respectively. Summary of changes: * buildstream/_frontend/cli.py: Add help for new format symbols. * buildstream/_frontend/widget.py: Add support for new format symbols for dependencies. * tests/frontend/show.py: Add tests for new format symbols.
* Merge branch 'juerg/buffer-size' into 'master'Jürg Billeter2019-02-122-3/+5
|\ | | | | | | | | Increase read buffer size to improve performance See merge request BuildStream/buildstream!1142
| * _cas/cascache.py: Increase buffer size in add_object()Jürg Billeter2019-02-121-2/+4
| | | | | | | | | | Increasing buffer size from 4 kB to 64 kB speeds up read() bandwidth by factor 4, according to a very simple benchmark.
| * utils.py: Increase buffer size in sha256sum()Jürg Billeter2019-02-121-1/+1
|/ | | | | Increasing buffer size from 4 kB to 64 kB speeds up read() bandwidth by factor 4, according to a very simple benchmark.
* Merge branch 'jjardon/allow_fail_WSL' into 'master'Jürg Billeter2019-02-111-0/+1
|\ | | | | | | | | .gitlab-ci.yml: allow "test-wsl" to fail until runner problems are sorted out See merge request BuildStream/buildstream!1145
| * .gitlab-ci.yml: Do not automatically run "test-wsl" until runner problems ↵jjardon/allow_fail_WSLJavier Jardón2019-02-111-0/+1
|/ | | | are sorted out
* Merge branch 'aevri/include-error' into 'master'Jürg Billeter2019-02-112-11/+68
|\ | | | | | | | | More user-friendly reporting on include errors See merge request BuildStream/buildstream!891
| * tests/format/include: remove unused tmpdir'saevri/include-errorAngelos Evripiotis2019-02-111-6/+6
| | | | | | | | | | Don't create and remove temp dirs unnecessarily when they are not used, looks like these were just copy-pastes without intended side-effects.
| * _includes: re-use file_path variableAngelos Evripiotis2019-02-111-1/+1
| | | | | | | | Avoid an unnecessary call to os.path.join().