summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test: Add tests that bzr workspace initialization acts as expectedjonathan/bzr-source-methodJonathan Maw2018-01-171-0/+19
|
* bzr: Implement init_workspaceJonathan Maw2018-01-171-0/+15
| | | | | This will checkout a branch from the cache, and switch its parent branch to the url and ref that the source came from
* Documentation: Restructured toplevel documentationdocs-reorganizationTristan Van Berkom2018-01-175-70/+90
| | | | | | | | | | | | | | | | | | | | | This is intended to make things easier to find for the various types of people searching for stuff. o The installation instructions remain on the main page. o Three main separate pages have been created - Using BuildStream - Authoring BuildStream projects - Core API reference, for plugin authors o The "Authoring projects" section swallows the previous plugin index; so one can find the plugin one is looking for on the same page as the rest of the format docs o The plugin authoring section has been swallowed by the core API reference section, with a note that this is useful especially for plugin authors.
* Use explicit source state updatesjuerg/source-stateJürg Billeter2018-01-165-34/+30
| | | | | This adds the _update_state() method to the Source class, similar to the corresponding method in the Element class.
* Rename _force_inconsistent() to _schedule_tracking()Jürg Billeter2018-01-164-18/+18
| | | | | _force_inconsistent is too low level. Keep that detail contained in the Source class.
* _frontend/main.py: Fix `inconsistent` argumentJürg Billeter2018-01-161-2/+2
| | | | | Do not mark target element as inconsistent for `bst source-bundle` and `bst workspace open` if tracking is disabled.
* HACKING.rst: Added instructions to properly format commit messages.Tristan Van Berkom2018-01-161-0/+20
|
* Shorten the warnings raised when remote cache initialization failsSam Thursfield2018-01-163-5/+4
| | | | | | | | | | Before: [--:--:--] WARNING Failed to fetch remote refs from ssh://ostree@ostree.baserock.org:22000/cache: BuildStream did not connect successfully to the shared cache ssh://ostree@ostree.baserock.org:22000/cache: SSH error: ssh: connect to host ostree.baserock.org port 22000: Connection refused After: [--:--:--] WARNING Failed to fetch remote refs from ssh://ostree@ostree.baserock.org:22000/cache. ssh: connect to host ostree.baserock.org port 22000: Connection refused
* Delay import of pkg_resourcesGökçen Nurlu2018-01-161-1/+1
| | | | | This does not introduce a performance gain alone, but importing pkg_resources is costly at the moment and can be avoided until it is actually needed.
* Make artifact cache tests work in python3.4jonathan/fix-tests-python34Jonathan Maw2018-01-121-3/+3
| | | | | | | | A LocalPath was being passed into os.path.isabs, which failed when it tried to call the path's startswith method. Converting it to a string before using _yaml.dump seemed to solve the problem.
* element.py: Reuse dict for cache key calculationsJürg Billeter2018-01-121-20/+27
| | | | | | | Do not recalculate the shared part of cache keys. In particular, do not call get_unique_key() multiple times for a single element or source. Fixes #167
* Use explicit element state updatesJürg Billeter2018-01-127-148/+140
| | | | | | | | | | This adds the _update_state() method to the Element class to keep track of element state and avoid calculating the same cache key multiple times. This also consolidates the different get_cache_key methods into a single method that always returns the cache key calculated by _update_state(), if available. Fixes #149, #173
* buildelement.py: Remove secret undocumented command listsremove-secret-command-listsTristan Van Berkom2018-01-121-5/+17
| | | | | | | | | | | | | | | | | | Originally this was created with also `bootstrap-commands` and `test-commands` but these were never documented or used. For `bootstrap-commands`, these originated in baserock but are basically a part of the `configure-commands` stage, prepending commands to `configure-commands` is more suitable here since we now have the prepend/append list directives. For `test-commands`, these were never used and it's unclear at this time if it's the correct place for it. It would be interesting to implement `test-commands` as a separate operation which can run in parallel with reverse dependency builds (no need to block the build of a reverse dependency on failing tests, we can still fail the build as a whole based on a failing test without blocking builds).
* NEWS: Added news entry for support for multiple artifact caches.Tristan Van Berkom2018-01-121-0/+8
|
* Update copyright years of files I have touchedSam Thursfield2018-01-119-9/+9
|
* _artifactcache/ostreecache.py: Subprocesses should not return exceptionsSam Thursfield2018-01-111-10/+6
| | | | | | | | | We have a policy that subprocesses can return error messages, but not actual exceptions. In particular this allows GLib.Error exceptions to be returned, which would otherwise be silently lost due to https://gitlab.gnome.org/GNOME/pygobject/issues/145
* _artifactcache: Use pushreceive also for local artifact repositoriesJürg Billeter2018-01-112-45/+80
| | | | | This reduces the differences between local and remote artifact repositories, increasing code coverage of tests.
* _artifactcache/pushreceive.py: Flush but do not close stdoutJürg Billeter2018-01-111-1/+1
| | | | | Closing stdout will cause an exception when used with multiprocessing as that calls sys.stdout.flush() as well.
* _artifactcache/ostreecache.py: Handle ^C and shutdown child task when ↵Tristan Van Berkom2018-01-111-4/+14
| | | | | | initializing cache This fixes issue #141
* Improve error messages for SSH protocol handshakeSam Thursfield2018-01-111-15/+21
| | | | | | | | | | | | | If you have an artifact remote cache in your config using the ssh:// protocol and some SSH issue prevents us from connecting, we now show the user the stderr output from the `ssh` program, e.g. [--:--:--] WARNING Failed to fetch remote refs from ssh://artifacts@172.17.0.2:22200/artifacts/: BuildStream did not connect successfully to the shared cache ssh://artifacts@172.17.0.2:22200/artifacts/: Permission denied (publickey,keyboard-interactive). Previously we would just show the error message raised by the protocol code, which was less useful, e.g.: [--:--:--] WARNING Failed to fetch remote refs from ssh://artifacts@172.17.0.2:22200/artifacts/: BuildStream did not connect successfully to the shared cache ssh://artifacts@172.17.0.2:22200/artifacts/: Expected reply, got none
* doc: Document multiple cache supportSam Thursfield2018-01-113-20/+79
|
* tests: Exercise the new multiple cache supportSam Thursfield2018-01-115-132/+248
| | | | | | | | | | | This adds a new test for parsing artifact cache configuration, which calls the helper function from the 'artifactcache' module directly rather than trying to assert based on blind push and pull commands whether or not we got the complex precedence rules exactly right. This means frontend push/pull tests no longer need to be so thorough about testing precedence but they are instead expanded to assert that multiple caches work correctly.
* Allow push to multiple remotes, configurable on a per-remote basisSam Thursfield2018-01-117-91/+113
| | | | | | | | | | The initial multiple cache support patch implemented a rather fragile logic where we would push to the first cache in the list that used the ssh:// protocol, if any. If we implement push-over-https:// in future then this will become totally unworkable. This patch alters the logic so that each remote has a 'push' option, and BuildStream will push to any remote that has 'push: true' set.
* Add `bst push --remote` and `bst pull --remote`Sam Thursfield2018-01-112-15/+44
| | | | | | | | This allows pushing and pulling from a specific cache, ignoring what is configured. If we choose to add a --remote option to `bst build` in future that would now be simple to do.
* Add support for multiple remote cachesSam Thursfield2018-01-1113-223/+317
| | | | | | | | | | | | | | | | | | | | | | This extends the 'artifacts' configuration block such that a list of `url` mappings can be given instead of a single entry. For example: artifacts: - url: http://example.com/artifacts1 - url: ssh://ostree@example.com/artifacts2 The OSTreeCache class is updated to set up multiple remotes and query remote refs from all of them. There are no automated tests for this yet. Empty URLs ('') now raise an exception. They cause breakages internally if we allow them through, and they can only occur if the user or our tests are misconfiguring things somehow. We report failure to fetch from the cache by printing a message to stderr for now. This is because BuildStream's actual logging functionality can't be used during frontend init -- see issue #168.
* tests/frontend: Assert cached state in a single lineSam Thursfield2018-01-112-16/+8
| | | | | Minor tweak to hopefully make the test cases a bit shorter and more readable, in preparation for adding more.
* _frontend/main.py: Making error handling more consistentrefactor-error-detailsTristan Van Berkom2018-01-111-16/+27
| | | | | | | | Added app.print_error() to consistently print an error while running the pipeline stuff. Also make bst push & pull commands more consistent with the rest, and print the summary at the end as expected.
* _frontend/widget.py: Change how we format failure messages.Tristan Van Berkom2018-01-111-11/+20
| | | | | | | | | | | | | | | | o Now print the message itself on the same line in place of the abbreviated log file o When reading back the last lines of the log file, prefix that with an informative message about whence the log lines come, showing the full unabbreviated log file. o Fixed the behavior of read_last_lines() so that it works as intended, problems were: - Was prepending an additional newline when the log contains more lines than we want to print - Was not printing anything at all in the case we want to print more lines than exist in the log
* source.py: Allow specifying detailed message in SourceError()Tristan Van Berkom2018-01-111-3/+4
|
* element.py: Allow specifying detailed message in ElementError()Tristan Van Berkom2018-01-111-1/+2
|
* _exceptions.py: Added `detail` member to base BstError class.Tristan Van Berkom2018-01-111-3/+8
| | | | | | | Now any BuildStream exception can potentially add detail to the errors they raise. Allow detail strings already in PluginError()
* _pipeline.py: Only raise the error for inconsistent pipelineTristan Van Berkom2018-01-111-2/+1
| | | | | Dont make the ERROR message explicitly anymore, leave that to the frontend to sort out.
* _message.py: Remove MessageType.ERROR, we have no need for this.Tristan Van Berkom2018-01-111-2/+0
|
* _scheduler/trackqueue.py: Dont use Plugin.error(), use Plugin.warn() for now.Tristan Van Berkom2018-01-112-6/+11
| | | | | | | This is already problematic as this particular error is reported but fails to fail the session correctly. Documented this in issue #187
* plugin.py: Removing Plugin.error() while it's still early and nobody is ↵Tristan Van Berkom2018-01-111-9/+0
| | | | | | | | | | using it. Errors are fatal, as such plugins must raise either SourceError() or ElementError(). This method was never used in plugins so far, lets remove it even though we are technically breaking (unused) API for the overall betterment of the API.
* Fix inconsistency in debian stretch install instructionsJonathan Maw2018-01-101-1/+1
|
* tests/cachekey/cachekey.py: Manually create a symlink for our testsTristan Van Berkom2018-01-101-0/+10
| | | | | | | | This works around an inconsistent behavior with setuptools. Newer versions of setuptools fail to preserve symbolic links when creating a source distribution, meaning that tests run from the dist tarball will fail.
* tests/cachekey: Enhanced tests to consider local sources with multiple files.Tristan Van Berkom2018-01-1016-13/+16
| | | | | | | We had a cache key instability issue with local sources generating inconsistent cache keys due to iterating over their files in a random order. Tests did not catch this previously due to the local source sample only using one file to iterate over.
* plugins/sources/local.py: Consider symbolic link target in cache key.Tristan Van Berkom2018-01-101-1/+2
| | | | | | | | Technically this breaks cache keys for the local source, but as this comes in a branch which fixes local source cache keys to be stable (they were random before this branch), we wont bother with considering this enhancement a separate API break, the cache key breakage was inescapable anyway.
* utils.py: Make list_relative_paths() report sorted paths.Tristan Van Berkom2018-01-101-15/+26
| | | | | | | | | | | This is needed because plugins make use of this function to generate a cache key which must be stable. In addition to the above, this patch also mitigates the performance hit of sorting, and allows _process_list() to function to iterate through the generator when additional sorting is not needed. This patch is an enhanced version of Sam Thursfield's patch on MR !216
* doc/source/install.rst: BuildStream depends on 'fuse' (for fusermount) and ↵jjardon/fuseJavier Jardón2018-01-081-4/+4
| | | | libfuse
* doc/source/projectconf.rst: Documenting plugin loading section.Tristan Van Berkom2018-01-082-55/+88
| | | | | | | | | | | | | This fixes issue #183. Also move the `format-version` related documentation to the first section "Essentials", beside the project name and element path, since this is a quite global option it belongs here and not hidden away with the plugin loading documentation. Also adjust the main index.rst to include the plugins sub-section as an adjacent sub-point of the project configuration (consistent with other project configuration sections).
* HACKING.rst: Added a section on feature proposals and patch submissionTristan Van Berkom2018-01-081-68/+47
| | | | | Also removed some things which are either of little importance, not worth mentioning, or covered already by the buildstream user documentation.
* doc/source/install.rst: Add a note here about pip's `-e` developer optionTristan Van Berkom2018-01-081-1/+12
| | | | | It's more suitable to add this note here than to have a separate section in the HACKING.rst for this.
* tests/pipeline/preflight.py: Added test to ensure graceful exit at preflight ↵fix-preflight-errorsTristan Van Berkom2018-01-065-0/+69
| | | | error time
* _pipeline.py: Raise detailed pipeline error at preflight timeTristan Van Berkom2018-01-061-2/+11
| | | | | If a plugin raises an error, prepend the plugin identifier to the error message and raise PipelineError.
* _frontend/main.py: Fix issue #180 - Fail gracefully when preflight failsTristan Van Berkom2018-01-061-21/+18
| | | | | | | This also makes main.py less redundant, for some reason there was a stray call to app.pipeline.initialize() beside app.initialize() in every function, instead move that into app.initialize() where we now handle the error and exit gracefully.
* local & patch source tests: Preflight errors now report PipelineErrorTristan Van Berkom2018-01-062-3/+3
|
* tests/testutils/runcli.py: Assert that buildstream actually exited.Tristan Van Berkom2018-01-061-0/+12
| | | | | | Enhanced the error checking Result() methods to always assert that the CLI actually exited, there are no cases worth testing for where buildstream would be expected to exit on an unhandled exception.
* tests/pipeline/load.py: Removing unused tmpdir fixture from hereTristan Van Berkom2018-01-061-7/+7
|