summaryrefslogtreecommitdiff
path: root/buildstream
Commit message (Collapse)AuthorAgeFilesLines
* sandbox.py: Use _root in _has_commandjmac/virtual_directoriesJim MacArthur2018-08-011-2/+2
| | | | | | | This will need more attention when we bring in another virtual directory backend, however, we've said it is acceptable for the sandbox itself to access the underlying directory, and this is the best fix in the meantime.
* compose.py: Remove unused getmtime()Jim MacArthur2018-08-011-7/+0
|
* scriptelement.py: Convert to virtual directoriesJim MacArthur2018-08-011-5/+4
|
* plugins/elements/stack.py: Convert to virtual directoriesJim MacArthur2018-08-011-6/+5
|
* sandbox: Remove instances of get_directoryJim MacArthur2018-08-012-2/+5
| | | | | sandbox/_mount.py, sandbox/_sandboxbwrap.py: Remove instances of get_directory
* plugins/elements/import.py: Convert to virtual directoriesJim MacArthur2018-08-011-13/+10
|
* plugins/elements/compose.py: Convert to virtual directoriesJim MacArthur2018-08-011-25/+13
|
* element.py: Conversion to use virtual directoriesJim MacArthur2018-08-011-51/+62
|
* _stream.py: Convert to virtual directories.Jim MacArthur2018-08-011-43/+9
| | | | | This removes _add_directory_to_tarfile since it is now implemented in _filebaseddirectory.py.
* sandbox.py: Add function to get virtual directory.Jim MacArthur2018-08-011-0/+15
|
* storage: Add __init__.pyJim MacArthur2018-08-011-0/+22
|
* Add the virtual directory class 'Directory' and one implementation.Jim MacArthur2018-08-014-1/+372
| | | | | | buildstream/storage/Directory.py: New file. buildstream/storage/_filebaseddirectory.py: New file. buildstream/_exceptions.py: New VIRTUAL_FS exception source.
* Sandbox.py: Rename __root to _root.Jim MacArthur2018-08-012-5/+6
| | | | | | | | This is to allow to allow its use by subclasses. Since access to get_directories is now blocked for some plugins, and the subclasses of Sandbox do not have configuration defined by YAML files, they need another way to get at the root directory.
* utils.py: add getmtime() and magic_timestampJim MacArthur2018-08-011-5/+13
| | | | | magic_timestamp is moved into file scope so other classes can use it.
* Add BST_VIRTUAL_DIRECTORY flag for element pluginsJim MacArthur2018-08-012-4/+19
|
* complete.py: Ensure paths get completed from 'element-path'mablanch/448-autocompletion-broken-defaultsMartin Blanchard2018-08-011-3/+4
| | | | | | | | Element paths should always be completed from the root element folder defined by the element-path key in project.conf. Fix complete_path() to always search into its given base_directory argument. See issue BuildStream/buildstream#448
* Added the missing `_get_build_log` functionknownexus2018-07-311-1/+6
|
* _scheduler/queues: Add failed builds to "done" queueRichard Maw2018-07-312-1/+4
| | | | | | | This allows the scheduler to move jobs from the current queue to the next. As a result of this change later queues than the build queue mustn't skip a cached failure, so the logic is specialised to build queues only.
* _scheduler/queues/buildqueue.py: Skip rebuilding cached failuresRichard Maw2018-07-311-0/+35
| | | | | This flags up a failure and if run in an interactive prompt permits the user to attempt a rebuild.
* Cache failed buildsRichard Maw2018-07-313-85/+98
| | | | | | | | | This creates an artifact when element assembly fails too, and if it's the right kind of exception uses the now-included install directory similarly to if it had returned successfully. If there's a failure during install the artifact contains any installed files, but may contain nothing at all.
* _frontend/widget.py: Render cached failures differently to successesRichard Maw2018-07-311-1/+3
|
* Convert call-sites of Element._cached() that assume successRichard Maw2018-07-314-8/+8
| | | | When we later add cached failures it needs to not treat them as successes.
* element.py: Add metadata to distinguish between successful and failed buildsRichard Maw2018-07-311-0/+84
| | | | | This just puts the metadata in place, we're adding code paths to add failed builds later.
* element.py: Cache the result of checking whether an artifact is cached weaklyRichard Maw2018-07-311-5/+20
| | | | | | | | | | | Normally we'd only need it in the case of scheduling a weakly cached build, but to allow caching of failed builds we need to be able to distinguish between cached successes and cached failures for both strong and weak cache keys. To allow other cache lookup codepaths to look up via the weak key requires changes through the call stack to consult which key to use, and cache invalidation of the saved state when it changes.
* widget.py: Limit failure summary to currently failing elementstpollard/386Tom Pollard2018-07-301-3/+6
| | | | | | Change widget.py print_summary() to only print the failure messages of elements in the Failure Summary that failed on the current try.
* git.py: Handle concurrent download completions properlyTristan Van Berkom2018-07-291-4/+15
| | | | | | | | | | | | | | | | | | Use os.rename() to rename the cloned temporary repository into place in the source cache, and issue a STATUS message when discarding a duplicate clone, in the case where the same repository is cloned twice in parallel. The problem with using shutil.move() is that it will create the source directory in a subdirectory of the destination when the destination exists, so it's behavior depends on whether the destination exists. This shutil.move() behavior has so far hidden the race condition where a duplicate repo is created in a subdirectory, as you need to have three concurrent downloads of the same repo in order to trigger the error. This fixes issue #503
* source.py: Bring down since version for source mirroring APIsTristan Van Berkom2018-07-291-4/+4
| | | | | Since we have now backported this to `bst-1.2`, the APIs have been introduced in 1.2 and not 1.4
* buildelement.py: Only display one activity message (#507)Tristan Maat2018-07-291-12/+13
|
* _context.py: Cache size is now restricted to available disk spaceQinusty/491Josh Smith2018-07-272-17/+64
| | | | | | | | | | | | This address issue #491. When attempting to run buildstream with a configuration specifying a cache quota larger than your available disk space, buildstream will alert the user and exit. Note: This takes into consideration your current cache usage and therefore restricts the overall size of your artifact cache folder.
* doc: Add documentation for source mirroringJonathan Maw2018-07-271-0/+27
|
* git.py: Improve mirror supportJonathan Maw2018-07-271-45/+49
| | | | | | | | | | | | When implementing fetching from mirrors, I encountered some problems with the git source: 1. The mirror URL was using translate_url()'s output, so if a different alias was used, then fetching from the mirror would go to a different directory, and be inaccessible. 2. After fixing that, fetching was unable to pull from a URL other than the one used at repository creation, meaning it wouldn't actually pull from the mirror.
* bzr.py: Improve mirror supportJonathan Maw2018-07-271-4/+7
| | | | | | | This fixes: * Bzr repositories pulling from the branch they were created with. * Bzr's _ensure_mirror() not actually checking that it successfully mirrored the ref.
* Add mirrored source trackingJonathan Maw2018-07-271-1/+28
|
* Set default mirror via command-line or user configJonathan Maw2018-07-274-4/+11
| | | | | | | In user config (buildstream.conf), it is set with the "default-mirror" field. On the command-line, it is set with "--default-mirror"
* source: When fetching, try to fetch from mirrors firstJonathan Maw2018-07-273-4/+118
| | | | | | | | | | | **KLUDGE WARNING**: This involves making the source store its "meta" object so that it's possible to create a copy of the source inside the fetch queue, instead of back when the pipeline was being loaded. This adds the SourceFetcher class, which is intended for sources that fetch from multiple URLs (e.g. the git source and its submodules) Fix when fetching
* source: Store the url aliases or use an overrideJonathan Maw2018-07-271-4/+55
| | | | | | | | | | | | | This is part of a later plan to implement mirroring without forcing everyone to update their sources. We use the expected calls to Source.translate_url() when running Source.configure() to extract the aliases from the URL. Multiple aliases must be extracted because sources exist that may fetch from multiple aliases (for example, git submodules) Later, we want to substitute another URI where the alias normally reads from the project - We accomplish this by re-instantiating the Source with the alias overrides passed as an argument to the constructor.
* Move _ALIAS_SEPARATOR into utilsJonathan Maw2018-07-272-5/+6
| | | | The separator is useful in source files other than _project.py
* project: Parse and store mirrorsJonathan Maw2018-07-272-3/+50
|
* cascache.py: Raise ArtifactError on grpc errorQinusty/502Josh Smith2018-07-271-1/+3
| | | | This aims to fix issue #502.
* element.py, source.py, plugin.py: Adjusting API version since annotations.Tristan Van Berkom2018-07-273-4/+4
| | | | | | Since we backported the temporary/permanent failures patch for #397 into the `bst-1.2` branch, we need to adjust the since versions in master down to 1.2.
* git.py: Update git plugin to fail temporarily on clone failuresJosh Smith2018-07-272-4/+8
| | | | | The git plugin will now make use of the fail_temporarily parameter to Plugin.call(), allowing failures to trigger a retry.
* plugin.py: Extend Plugin.call() APIJosh Smith2018-07-272-8/+13
| | | | | | | | Plugin.call() now takes fail_temporarily as an optional parameter, when supplied it will cause subsequent failures to trigger temporary errors as opposed to permanent errors. This also extends Plugin.check_output() which makes use of Plugin.call()
* cascache.py: Update cache push/pull errors to be temporaryJosh Smith2018-07-272-3/+3
| | | | Further work needs to be done for the current grpc exceptions which are reraised.
* _downloadablefilesource.py: Update network errors to be temporaryJosh Smith2018-07-271-2/+2
| | | | This follows the change in 67ecd97a05279a3b7570ad59f05bf0a5973ef04c.
* _exceptions.py: Modify BstError API to allow optional retryJosh Smith2018-07-274-13/+40
| | | | | | | | | | | | job.py: Changes to the logic surrounding retry attempts and child process return codes element.py, source.py: ElementError and SourceError also implement this change. These exceptions now have an optional parameter of temporary which defaults to false. This will potentially break backwards compatibility where exceptions were previously raised and a retry was intended. To trigger a retry, one must now raise their SourceError or ElementError with temporary=True. This aims to fix #397.
* Provide explicit reason for SourceError exception on pathEd Baunton2018-07-261-1/+2
| | | | When the user provides a path for the filename parameter, provide a reason
* Add remote source pluginEd Baunton2018-07-252-1/+81
| | | | | | | | Add a plugin that supports downloading files verbatim from a source with an optional overridable filename and destination directory. Bumps bst format version to 10. Fixes #163
* _stream.py: Added functionality for workspace open -fPhillip Smyth2018-07-251-1/+5
| | | | tests/frontend/workspace.py: Added tests
* app.py: Handle exception thrown when recursion limit is exceededphil/203-BuildStream-crashes-when-dependency-tree-too-deepPhil Dawson2018-07-251-0/+4
| | | | | Because the RecursionError exception was introduced in Python 3.5, until we drop support for for Python 3.4, we must use RuntimeError.
* cascache.py: Remove misleading info messageJosh Smith2018-07-251-1/+0
| | | | This addresses issue #501.