summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* _artifactcache/ostreecache.py: Allow explicit disabling of pushesuser-namespace-fallbackTristan Van Berkom2017-10-311-1/+14
| | | | | | This is used by the platform to disable pushing explicitly in the case that we're falling back to not using user namespaces, in which case we dont entirely trust the artifacts we create.
* sandbox/_sandboxbwrap.py: Dont use user namespaces if they are unavailableTristan Van Berkom2017-10-311-1/+6
| | | | Part of the fix for #92
* _platform/linux.py: Add preflight check to detect user namespacesTristan Van Berkom2017-10-311-1/+40
| | | | | | | | | | | | Here we check if `bwrap --ro-bind / / --unshare-user --uid 0 --gid 0 whoami` returns successfully and prints 'root', to check if we are indeed capable of creating user namespaces on the host. If we are unable, then we save that state in the platform allowing buildstream to behave differently, and print an informative startup warning about this. This fixes issue #92
* _scheduler/job.py: Ensure messages are logged to the correct log fileTristan Van Berkom2017-10-311-1/+4
| | | | | Dont use the plugin which the message originates from, use the plugin associated with the child task.
* doc: Explain how to configure project optionsMathieu Bridon2017-10-311-0/+5
|
* _frontend/main.py: Hold on to unconditional startup messagesTristan Van Berkom2017-10-311-0/+8
| | | | | | | | | | | We avoid printing regular start/success/status messages etc at startup time in advance of the heading, this would introduce a lot of noise while interrogating source plugins for consistency state. This patch holds on to important errors and warnings which might be raised by core components at startup time, and prints them immediately after printing the heading.
* Catch attempts to compose a listSam Thursfield2017-10-314-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to compose a list property would result in an unhandled exception: AttributeError: 'CommentedSeq' object has no attribute 'get' We now at least detect the situation and produce an exception that the frontend will report neatly: Error loading pipeline: element.bst [line 11 column 4]: Only values of type 'dict' can be composed. I was getting this error from an attempt to conditionally extend the sources list: sources: (?): arch == "x86_64": - url: http://example.com/x86_64 The correct way to do this is to move the conditional into the parent dict, e.g.: (?): arch == "x86_64": sources: - url: https://example.com/x86_64 It would be nice if the error message could hint at how the user can do what they want, but it doesn't seem possible in this case.
* context.py: Fixed project override validation to allow new 'strict' keywordTristan Van Berkom2017-10-301-1/+1
|
* utils.list_relative_paths: Clarify empty dirs noteAngelos Evripiotis2017-10-301-1/+2
|
* utils.list_relative_paths: avoid os.path.relpathAngelos Evripiotis2017-10-301-6/+9
| | | | | | | | | | Profiling suggested that the cumulative time spent in os.path.relpath() was the dominant cost of utils.list_relative_paths(). Try to call this only once per directory walked. In Python 3.5, we can optimise further by using os.scandir() and maintaining relative paths as we go.
* _pipeline.py: No except_ argument in source_bundleTristan Van Berkom2017-10-302-4/+2
| | | | | | | This is deadcode, except_ is already calculated before we get here. Updated some internal comments to reflect this, and updated the frontend to not pass the useless except_ parameter.
* _frontend/widget.py: Prettier formatting of messages with no associated pluginTristan Van Berkom2017-10-301-9/+11
| | | | | These come exclusively from the frontend or _pipeline.py code, we just avoid printing an element name or cache key for these messages.
* _pipeline.py: The toplevel message() function no longer takes an element.Tristan Van Berkom2017-10-301-35/+32
| | | | | | | | | | | | | | | | | | | Instead, use None as the unique ID. This will help with messaging when we allow invoking multiple targets and the element would have been ambiguous - this also consequently fixes issue #137. The reason for the hangs with #137 is because: o When you --except a base element, reverse dependencies cannot calculate a cache key o When you track, cache keys are intentionally reset at startup time, because we know they are going to change o At the end of tracking, we make one attempt to print the toplevel cache key This operation is insanely expensive, because we never cache a cache key because it logically cannot ever be resolved in this situation. This fix is basically a workaround to the above.
* tests/frontend/track.py: Added tests for recursive tracking and --exceptTristan Van Berkom2017-10-301-10/+103
|
* tests/testutils/runcli.py: get_element_state() now uses --downloadableTristan Van Berkom2017-10-291-0/+1
| | | | | | | | This wont take any additional time because if there is a remote artifact share configured in the pytest suite, it can only be a locally created one - this makes the push/pull tests work after recently making downloading of remote refs optional for the sake of issue #140.
* _frontend/main.py: Fetch remote refs in a few placesTristan Van Berkom2017-10-291-6/+9
| | | | | | | | | | | | | | o bst build o bst push o bst pull o bst show --downloadable This adds a `--downloadable` option to `bst show`, if this is specified then buildstream will spend some time trying to download the remote artifact share's refs and refresh the local downloadable state. This fixes #140
* _pipeline.py: Make fetching of remote refs optionalTristan Van Berkom2017-10-291-1/+3
| | | | Default is not to fetch them, we only need them in a few cases.
* Updated documentation about strict mode user configurationTristan Van Berkom2017-10-272-0/+50
|
* _artifactcache: Adapt to new Element api _get_strict()Tristan Van Berkom2017-10-272-4/+4
|
* element.py: Adapt to new Context api _get_strict()Tristan Van Berkom2017-10-271-3/+16
|
* context.py: Moving strict mode configuration to be project specificTristan Van Berkom2017-10-272-27/+22
|
* Issue #107: Stop attaching the child watcher multiple timesTristan Maat2017-10-262-1/+3
|
* Update documentation to refer to new home of dpkg and x86image elementsjonathan/external-pluginsJonathan Maw2017-10-262-3/+5
|
* Remove dpkg-build test from integration-testsJonathan Maw2017-10-2618-237/+0
| | | | It has been moved to an external repository.
* Remove dpkg and x86image elementsJonathan Maw2017-10-266-805/+0
|
* _pipeline.py: Improve error message when --except fails.Tristan Van Berkom2017-10-261-1/+1
| | | | This is an interim step for issue #131.
* test/format/projectoverrides.py: Test project wide element type overrides128-status-ticker-fails-to-update-periodically-on-some-buildsTristan Van Berkom2017-10-253-0/+38
| | | | | | First case simply asserts that prepending to configure-commands from the project.conf works as intended, ensuring we dont regress issue #127
* project.py: Fetch element type overrides before assertionsTristan Van Berkom2017-10-251-3/+5
| | | | | | | | | | | The element overrides are intended for later recomposition onto the element type specific yaml files, so it is incorrect to assert that array composition is complete at this stage. Instead remove the element overrides and store those seperately before making our final yaml assertions. This fixes issue #127
* _pipeline.py: Give the correct artifact pull URL in remote tickerSam Thursfield2017-10-251-1/+1
| | | | | | | | | | I was seeing messages like this: Fetching artifact list from None However, the artifact cache did have the correct pull URL set -- the issue was that I had overridden it my own config, and the string we sent to the ticker didn't take that override into account.
* Issue #124: Add test for staging to element build directory124-test-that-an-error-is-raised-when-staging-to-the-elements-build-directoryTristan Maat2017-10-234-0/+35
|
* _options/optionpool.py: Be strict with evaluation of undefined variables.Tristan Van Berkom2017-10-231-3/+7
| | | | And also ensure that expression errors are reported with provenance.
* tests/format: Test proper failure of reference to undefined optionsTristan Van Berkom2017-10-233-0/+29
| | | | | When using an undefined option in a conditional expression, buildstream should error out and print a good message about it.
* _frontend/main.py: Consistent exit code when exceptions occur.Tristan Van Berkom2017-10-231-5/+5
|
* exceptions.py: _get_last_exception() clear the exception after fetching itTristan Van Berkom2017-10-231-1/+5
| | | | Ensure test cases dont have remnent exceptions from a previous test.
* integration-tests: Updating results now that we compress debug symbols by ↵125-regression-after-handling-c-in-bst-shellTristan Van Berkom2017-10-2317-0/+0
| | | | default
* tests/cachekey: Fixing cache key test after changing default strip commandsTristan Van Berkom2017-10-232-2/+2
|
* data/projectconfig.yaml: Issue #106 - Compress debug symbols by defaultTristan Van Berkom2017-10-231-8/+19
| | | | | | | | | | Deconstructed the default strip-commands to declare some objcopy and strip arguments separately, so it's easier to override these in the case that you are building with an older toolchain which does not support compression of debug symbols (or if you want to strip them with something in a more exotic way). By default pass --compress-debug-sections to objcopy.
* tests/cachekey: Refactoring to now include an automatic updaterTristan Van Berkom2017-10-232-15/+78
| | | | | | | | When cache key tests fail, and when it is intentional that the keys have changed, then run ./tests/cachekey/update.py to update the keys. This is also useful whenever adding new tests.
* tests/testutils/runcli.py: Optionally make the runner not verboseTristan Van Berkom2017-10-231-8/+10
| | | | This is so that we can use it in other contexts than running tests
* _platform/platform.py: Removing executable permissionTristan Van Berkom2017-10-221-0/+0
|
* tests/frontend: Removing messTristan Van Berkom2017-10-223-16/+0
| | | | | | | | | Here would be the right place to test that an error is raised when staging files to the build directory. These files here, would be good for that purpose, however they are just deadcode which somehow got added to the git history, no tests use them.
* tests/sources/generic.py: Removing test, no tests should ever be added hereTristan Van Berkom2017-10-224-37/+0
| | | | | | | | | New tests only via the frontend cli, never mucking about with source APIs directly, this whole directory needs to eventually be removed. This test was also testing the wrong condition, it's okay that a source stage to a non-empty directory, it's not okay that an element stages it's group of sources to a non-empty directory.
* element.py: Raise an error if the source staging directory is non-emptyTristan Van Berkom2017-10-221-0/+4
| | | | | This is the correct place for the check, once for each element in the overall source staging directory.
* source.py: Dont error out if staging directory is not empty.Tristan Van Berkom2017-10-221-3/+0
| | | | | This is the wrong place for the check, it needs to be done once for the toplevel staging directory, not for each source.
* utils.py: Fix regression, build directories not being removed.Tristan Van Berkom2017-10-211-3/+3
| | | | | utils._force_rmtree() was overwriting it's path directory, and then only recursively removing the last entry which was walked.
* tests/frontend/buildcheckout.py: Assert that build directories are removedTristan Van Berkom2017-10-211-0/+5
| | | | After successful builds.
* setup.cfg: Ignore .eggs directory for pep8 linterTristan Van Berkom2017-10-211-0/+1
| | | | | | | For some reason, an undesired .eggs/ directory gets created at times by the incomprehensible pip/setuptools machinery. This makes sure it doesnt cause noise in our tests.
* tests/cachekey: Fixing cache key test after modifying project.conf default ↵Tristan Van Berkom2017-10-2122-36/+22
| | | | environment
* data/projectconfig.yaml: Fixes #105 - Set SOURCE_DATE_EPOCH to constant valueTristan Van Berkom2017-10-201-0/+2
|
* .gitlab-ci.yml: Drop root privileges for some tests102-run-ci-as-non-root-userTristan Maat2017-10-201-3/+16
|