summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* _sandboxremote.py: Add sigterm handler that sends CancelOperation725-job-cancellation-on-remote-buildsRaoul Hidalgo Charman2018-11-201-2/+29
|
* Merge branch 'aevri/prompt-config' into 'master'Angelos Evripiotis2018-11-206-14/+108
|\ | | | | | | | | Add 'prompt.*' config options to buildstream.conf See merge request BuildStream/buildstream!887
| * Add prompt.workspace-... optionsAngelos Evripiotis2018-11-204-6/+39
| | | | | | | | | | | | | | | | | | | | Provide options in project.conf to disable the 'Are you sure ...' prompts when making destructive changes: - Add prompt.really-workspace-close-remove-dir - Add prompt.really-workspace-reset-hard Add a NEWS item for these.
| * Add prompt.auto-init buildstream.conf optionAngelos Evripiotis2018-11-204-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide an option in buildstream.conf to disable the 'Would you like to ...' prompt when we cannot resolve a project. Some users prefer not to be interrupted by such prompts, so pave the way to creating options to disable all those that might get in the way. Follow the example of the advice.* options 'git-config', and create a namespace for these UI options grouped by behaviour, rather than an over-reaching 'ui.*' namespace. In later work perhaps we'll also add 'advice.*' options. Add a NEWS item for this.
| * _context: refactor, extract _node_get_option_strAngelos Evripiotis2018-11-201-8/+29
| | | | | | | | | | | | | | | | | | Use a new helper function to simplify working with nodes that can only accept certain strings. This will be used when adding the prompt.* config options. In later work we can see if this function would be useful elsewhere, and could be added to '_yaml.py'.
| * _context: allow 'terminate' for scheduler.on-errorAngelos Evripiotis2018-11-201-1/+1
| | | | | | | | | | | | | | | | | | Enable this option of 'terminate', which is mentioned in userconfig.yaml and handled in _frontend/app.py:_handle_failure(). It appears to have been left out of the valid_actions as an oversight. Originally introduced in https://gitlab.com/BuildStream/buildstream/commit/2622d5da9bd9fefd87436613d6e3e9770fdd0f28
| * _yaml: document node_get()'s default_value argAngelos Evripiotis2018-11-201-0/+1
|/
* Merge branch 'juerg/context-default-values' into 'master'Jürg Billeter2018-11-199-55/+38
|\ | | | | | | | | _context.py: Drop duplicated default values for user configuration See merge request BuildStream/buildstream!953
| * _context.py: Drop duplicated default values for user configurationJürg Billeter2018-11-191-13/+15
| | | | | | | | | | | | The default values are in userconfig.yaml, together with the documentation. The default values should not be duplicated in _context.py.
| * tests/plugins/pipeline.py: Load context default valuesJürg Billeter2018-11-191-1/+2
| |
| * tests/testutils/artifactshare.py: Do not create a fake contextJürg Billeter2018-11-191-5/+2
| | | | | | | | | | | | The fake context did not set the cache quota, triggering an error. With CASCache now separate from ArtifactCache, we can instantiate a CASCache without context.
| * CasBasedDirectory: Change constructor to take a CASCache instead of a ContextRichard Maw2018-11-196-36/+19
|/ | | | | The Context was only used to obtain a reference to the CASCache and set the unused cas_directory field.
* Merge branch 'chandan/source-checkout-news' into 'master'Chandan Singh2018-11-191-0/+2
|\ | | | | | | | | NEWS: Add entry for the new source-checkout command See merge request BuildStream/buildstream!960
| * NEWS: Add entry for the new source-checkout commandChandan Singh2018-11-191-0/+2
|/ | | | | | `bst source-checkout` command was recently added in https://gitlab.com/BuildStream/buildstream/merge_requests/820. Add a NEWS entry for the new command.
* Merge branch 'bschubert/dont-cache-errors-from-host-tools' into 'master'Benjamin Schubert2018-11-193-97/+141
|\ | | | | | | | | | | | | Don't cache sandbox failures Closes #727 See merge request BuildStream/buildstream!895
| * element.py: Only cache on element error or successBenjamin Schubert2018-11-191-19/+6
| | | | | | | | | | | | Reverse the way we were handling caching by only caching when we know it's a problem with the build or the build is a success in order not to cache transient errors.
| * Don't cache sandbox errorsBenjamin Schubert2018-11-193-90/+147
|/ | | | | | | | | | Sandbox errors (like missing host tools) are dependent on the host system and rarely on what is actually done. It is therefore better to not cache them as they are subject to change between two runs. Also add test to ensure sandbox failure are not cached
* Merge branch 'abderrahim/cmake-variable-types' into 'master'Valentin David2018-11-192-3/+3
|\ | | | | | | | | | | | | plugins/elements/cmake.yaml: always specify variable types Closes #761 See merge request BuildStream/buildstream!947
| * plugins/elements/cmake.yaml: always specify variable typesAbderrahim Kitouni2018-11-192-3/+3
|/ | | | | | | cmake sometimes misinterprets relative paths as relative to the current directory if this is not specified. See freedesktop-sdk/freedesktop-sdk#431 adjust tests/format/variables.py accordingly.
* Merge branch 'chandan/source-checkout' into 'master'Chandan Singh2018-11-197-28/+285
|\ | | | | | | | | Add `bst source-checkout` command See merge request BuildStream/buildstream!820
| * Add `bst source-checkout` commandChandan Singh2018-11-197-27/+284
| | | | | | | | | | | | | | | | | | | | | | | | As discussed in https://mail.gnome.org/archives/buildstream-list/2018-September/msg00064.html, add `bst source-checkout` command. This will allow users to checkout sources for a given target. * _frontend/cli.py: Add source-checkout command * _pipeline.py: Add assert_sources_cached() method * _stream.py: Add source_checkout method, abstract out __check_location_writable() method that used to part of checkout()
| * buildstream/_pipeline.py: Simplify error message for assert_consistent()Chandan Singh2018-11-191-1/+1
|/ | | | | | | | | | | | | | | Currently, `Pipeline.assert_consistent()` prints an error message like the one below when certain elements have inconsistent sources: ``` ... Element: hello.bst is inconsistent Source tar source at hello.bst [line 16 column 2] is missing ref ... ``` Drop the word "Source" from the beginning of the message as "Source <source-kind> source ..." is kind of awkward to read.
* Merge branch 'bschubert/fix-atomic-move-git-repo' into 'master'Benjamin Schubert2018-11-196-31/+147
|\ | | | | | | | | Fix os.rename in git source element to correctly handle error codes See merge request BuildStream/buildstream!938
| * sources/pip.py: Use move_atomic instead of manual os.renameBenjamin Schubert2018-11-191-7/+7
| | | | | | | | | | This uses move_atomic insteand of the manual os.rename and manual error checking and throws a SourceError for consistency with other modules.
| * cascache.py: use move_atomic instead of manual error checkingBenjamin Schubert2018-11-191-10/+5
| |
| * Extract atomic move function to utils.pyBenjamin Schubert2018-11-194-81/+137
| | | | | | | | | | | | | | | | Moving atomically a file/directory can be tricky since different errors might be raised for the same underlying problem. Having a utility function to reduce this discrepancies will help in ensuring we have correct behavior
| * Fix os.rename in git source element to correctly handle error codesBenjamin Schubert2018-11-192-16/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation (https://www.unix.com/man-page/POSIX/3posix/rename/), when the directory already is there, either EEXIST or ENOTEMPTY could be thrown. Previously only ENOTEMPTY was checked. Done: - Separated the move into its own function - Check for both errors - Create unit tests for it, covering most test cases
| * tests/frontend/buildtrack.py: check for success after invocationBenjamin Schubert2018-11-191-0/+1
|/ | | | | | | | Previously the result of the first call in test_build_track was not checked to be successful, which would lead to potential erros later on that were hard to debug. Let's check it everytime
* Merge branch 'bschubert/fix-pip-python' into 'master'Benjamin Schubert2018-11-191-0/+1
|\ | | | | | | | | | | | | plugins/sources/pip.py: also look for python version named "python" Closes #758 See merge request BuildStream/buildstream!942
| * plugins/sources/pip.py: also look for python version named "python"Benjamin Schubert2018-11-191-0/+1
|/ | | | | | | | In some virtual environments, we might not have the binary with the exact python version, which would lead the current pip plugin to fail to find a working pip version. This adds "python" at the start of the list of valid python versions
* Merge branch 'tpollard/494' into 'master'Jürg Billeter2018-11-1712-62/+393
|\ | | | | | | | | Don't pull artifact buildtrees by default See merge request BuildStream/buildstream!786
| * Don't pull artifact build trees by default.tpollard/494Tom Pollard2018-11-177-60/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The addition of cached build trees being included in element artifacts has led to mostly redundant download overheads when pulling from a remote artifact server. As such the default behaviour of pull shouldn't fetch the build tree object if available. element.py: extend relevant pull logic for specified subdir consideration and ensure push logic does not lead to partial artifact pushes. Change assumption that the buildtree can be extracted if artifact is cached. __cached_buildtree() and __pull_directories() helpers added. _artifactcache/: artifactcache.py & cascache.py inclusion of helper functions for subdir artifact checking & fetching, fetch logic extended to only pull required artifact directories. extract & checkout updated to handle full/partial operation. tests/: addition of integration test pullbuildtrees.py, buildtrees.py adapted cli options, testutils/artifactshare.py has_artifact changed to return artifact digest on true condition.
| * Add cli main and user config option for 'pull-buildtrees' context.Tom Pollard2018-11-175-2/+15
|/ | | | | | | | | | | | _context.py: Add pull_buildtrees global user context, the default of which is set to False via the addition of pull-buildtrees to userconfig.yaml cache group. _frontend/app.py & cli.py: Add --pull-buildtrees as a bst main option, which when passed will override the default or user defined context for pull_buildtrees. tests/completions/completions.py: Update for the added flag.
* Merge branch 'aevri/unit_tests' into 'master'Jürg Billeter2018-11-151-0/+18
|\ | | | | | | | | contributing: add guidance on unit tests See merge request BuildStream/buildstream!943
| * contributing: add guidance on unit testsAngelos Evripiotis2018-11-151-0/+18
|/ | | | | Decrease uncertainty around whether unit tests are welcome in the project or not.
* Merge branch 'richardmaw/distinguish-sandboxing-build-fail' into 'master'richardmaw-codethink2018-11-148-42/+136
|\ | | | | | | | | | | | | Distinguish between bubblewrap sandboxing failure and command failure Closes #286 See merge request BuildStream/buildstream!868
| * tests/integration/sandbox-bwrap.py: Test distinguishing sandbox exit code ↵Richard Maw2018-11-144-1/+58
| | | | | | | | from command
| * tests/testutils/site.py: Check for bwrap supporting --json-status-fdRichard Maw2018-11-141-1/+3
| |
| * buildstream/sandbox/_sandboxbwrap.py: Distinguish sandbox failure from ↵Richard Maw2018-11-142-20/+52
| | | | | | | | | | | | | | | | | | | | | | command failure If `bwrap` fails to set up the sandbox and start the payload command it won't write an exit-code in --json-status-fd, so we can report if it was a sandboxing failure if we don't get exit-code status and a payload command failure if we do and it's non-zero. Closes https://gitlab.com/BuildStream/buildstream/issues/286
| * _platform/linux.py: Move get_bwrap_version into _site.pyRichard Maw2018-11-142-20/+23
|/ | | | | It's inconvenient to have to create a Linux platform to parse the bwrap version and we want to get the version in a consistent manner.
* Merge branch 'valentindavid/integration-tests-aarch64' into 'master'Javier Jardón2018-11-1412-17/+72
|\ | | | | | | | | | | | | Run tests on aarch64 Closes #369 and #755 See merge request BuildStream/buildstream!948
| * Test aarch64 only overnightValentin David2018-11-141-3/+11
| |
| * Add support for aarch64 in a testValentin David2018-11-141-1/+1
| |
| * Disable tests on example on other architectures than x86_64Valentin David2018-11-146-6/+32
| |
| * Disable cachekey tests on other architectures than x86_64Valentin David2018-11-142-1/+5
| |
| * Run tests on aarch64Valentin David2018-11-143-7/+24
|/ | | | Fixes #755
* Merge branch 'element-path_not_validated' into 'master'Jürg Billeter2018-11-123-10/+33
|\ | | | | | | | | Element path not validated before use See merge request BuildStream/buildstream!937
| * tests/frontend: Add test for invalid element-pathelement-path_not_validatedPhillip Smyth2018-11-122-0/+17
| |
| * _project.py: Validate nodes early in Project._loadPhillip Smyth2018-11-121-10/+16
|/ | | | | | _project.py: Added validate_nodes() helper function to prevent duplicate lists element-path was being used before node validation resulting in uncaught errors
* Merge branch 'bschubert/fix-silence-stopiteration-pep-0479' into 'master'richardmaw-codethink2018-11-121-20/+22
|\ | | | | | | | | source.py: don't let StopIteration propagate to silence() contextmanager See merge request BuildStream/buildstream!945