summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* element.py: Fix documentation around `node` usagebschubert/fix-node-docsBenjamin Schubert2020-05-112-2/+2
|
* downloadablefilesource.py: Make it publicly accessiblebschubert/make-downloadable-filesource-publicBenjamin Schubert2020-05-095-11/+39
| | | | | This is now part of the BuildStream public API and can be used to implement new plugins
* junction.py: Call node.validate_keys() in Plugin.configure()Tristan Van Berkom2020-05-061-0/+3
|
* _downloadablefilesource.py: Set user agentWilliam Salmon2020-05-051-0/+1
| | | | | | | The default user-agnet for urllib is widely used for many bots and so is blocked by many servers. Buy using our own then we we are not blocked by gitlab.com etc and are also able to identify buildstream request to servers.
* casdprocessmanager.py: Check if buildbox-casd process is alive while waiting ↵ctolentino/casd-timeoutctolentino82020-05-051-2/+12
| | | | for connection
* casdprocessmanager.py: Relax timeout for establishing buildbox-casd connectionctolentino82020-05-051-2/+3
|
* _pluginfactory/pluginfactory.py: Implement error reporting for pip originsTristan Van Berkom2020-05-041-2/+27
| | | | | | | | | For plugins loaded from the pip origin, we now support specifying constraints. This is a non-breaking change and only involves specifying a package with constraints when specifying the 'package-name', however there are a few errors errors which can occur as a result, this patch tries to handle them all cleanly and provide the user with useful error messages.
* _pluginfactory/pluginorigin.py: Store provenance of origins for error reportingTristan Van Berkom2020-05-041-0/+2
|
* plugin.py: Rework how deprecation warnings are configured.Tristan Van Berkom2020-05-047-48/+107
| | | | | | | | | | | | | | | | | This is mostly a semantic change which defines how deprecation warnings are suppressed in a more consistent fashion, by declaring such suppressions in the plugin origin declarations rather than on the generic element/source configuration overrides section. Other side effects of this commit are that the warnings have been enhanced to include the provenance of whence the deprecated plugins have been used in the project, and that the custom deprecation message is optional and will appear in the message detail string rather than in the primary warning text, which now simply indicates that the plugin being used is deprecated. Documentation and test cases are updated. This fixes #1291
* _pluginfactory/pluginfactory.py: Add provenance to missing plugin errorsTristan Van Berkom2020-05-035-8/+19
| | | | | | | | | So far we were only reporting "No Source plugin registered for kind 'foo'", without specifying what bst file with line and column information, this commit fixes it. Additionally, this patch stores the provenance on the MetaSource to allow this to happen for sources.
* _stream.py: Fetch sources while launching build shellschandan/build-shell-fetchChandan Singh2020-04-301-7/+5
| | | | | | | Part of https://gitlab.com/BuildStream/buildstream/-/issues/1068. Make behavior of `shell` command similar to other commands that need sources like `build`, `workspace open`, `source checkout` etc.
* plugin.py/pluginfactory.py: Implementing BST_MIN_VERSIONTristan Van Berkom2020-04-2921-3/+119
| | | | | | | | | | | | | | The BST_MIN_VERSION guards assert that the BuildStream core which loaded the plugin is compatible with the plugin itself. This commit adds BST_MIN_VERSION to the base plugin.py with documentation informing Plugin authors how to set the minimum version, and also adds the assertions at plugin loading time in pluginfactory.py. This commit also: * Adds the BST_MIN_VERSION specification to all current core plugins * Adds the BST_MIN_VERSION specification to plugins used in test cases
* tests/plugins/loading.py: New test replaces removed internal testTristan Van Berkom2020-04-291-4/+8
| | | | | | | | | This test tests some of the basic failure modes of plugin loading, which used to be written as internal tests but is not implemented as a proper end-to-end test. This commit also adds some machine readable reason codes to pluginfactory.py so that we can assert the errors more specifically.
* Plugin loading refactor, removing all versioningTristan Van Berkom2020-04-298-216/+219
| | | | | | | | | | | | | | | | Plugin format versioning was decided to be removed for local plugins and any plugins for which we do not load an explicitly provided plugin. For pip, this will be handled with a standard distutils/setuptools approach, allowing users to specify pip style version boundaries in the plugin origins. This patch refactors plugin loading so that all related code goes into the private _pluginfactory module, a new small PluginOrigin type was added to better manipulate loaded origins. Test cases have been removed and will be readded in a following commit, adjusted to new expectations.
* Switch preferred sandbox from bwrap to buildbox-runJürg Billeter2020-04-283-11/+8
| | | | | This also enables local builds on non-Linux platforms, if a buildbox-run implementation is available.
* testing/_utils/site.py: Check that buildbox-run has all dependenciesJürg Billeter2020-04-281-1/+2
|
* _platform.py: Reset Sandbox._dummy_reasons in _check_sandbox()Jürg Billeter2020-04-281-0/+1
| | | | This fixes an isolation issue in the test suite.
* element.py: Drop BST_VIRTUAL_DIRECTORYJürg Billeter2020-04-2810-45/+0
| | | | `Sandbox.get_directory()` no longer exists.
* sandbox: Remove Sandbox.get_directory()Jürg Billeter2020-04-282-36/+4
| | | | Require element plugins to use `Sandbox.get_virtual_directory()`.
* node.pyx: Add '__str__' to 'Node'William Salmon2020-04-271-0/+3
|
* storage: Add Directory.rename() methodJürg Billeter2020-04-273-0/+32
|
* storage: Add Directory.remove() methodJürg Billeter2020-04-273-7/+44
|
* storage: Add Directory.readlink() methodJürg Billeter2020-04-273-0/+24
|
* storage: Add Directory.file_digest() methodJürg Billeter2020-04-273-0/+25
|
* directory.py: Add isfile(), isdir() and islink() methodsJürg Billeter2020-04-271-0/+49
|
* storage: Add Directory.stat() methodJürg Billeter2020-04-273-25/+76
|
* storage: Implement __iter__ in Directory classesJürg Billeter2020-04-272-0/+6
|
* storage: Directory.open_file(): Allow w+ and x+ modesJürg Billeter2020-04-272-2/+2
|
* _filebaseddirectory.py: Fix mode="x" in open_file()Jürg Billeter2020-04-271-0/+7
|
* _casbaseddirectory.py: Validate path componentsJürg Billeter2020-04-271-0/+8
| | | | This catches incorrect use of the `Directory` API.
* _casbaseddirectory.py: Remove unused _copy_link_from_filesystem()Jürg Billeter2020-04-271-3/+0
|
* element.py: Create destination directory in stage_artifact()Jürg Billeter2020-04-271-1/+1
|
* _stream.py: shell(): Require sources only for build shellsjuerg/shell-sysrootJürg Billeter2020-04-251-1/+1
|
* Remove bst shell --sysrootJürg Billeter2020-04-254-81/+42
| | | | This is no longer needed now that we support caching buildtrees in CAS.
* Remove documentation references to format_versionTristan Van Berkom2020-04-257-48/+12
| | | | | | | | | | | With BuildStream 2.0, we start with a fresh API, everything that is present at the time of the 2.0 release can implicitly be considered to be available since 2.0. In the future, we will be expressing new API additions using the min-version semantic versioning style instead of format version too (so new YAML configurations will be expressed as "since: 2.2" and so on).
* Replace format-version with min-versionTristan Van Berkom2020-04-2512-106/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "min-version" is specified as a <major>.<minor> point version and uses the installed BuildStream version instead of having a separate versioning number for the format. * The presence of "format-version" is now used to indicate that we might be loading a BuildStream 1 project. * For now, where parsing the version at startup is concerned, and also where `bst init` is concerned, we artificially bump the detected BuildStream version to 2.0 if we detect a version < 2.0, these exceptions can be removed once 2.0 is tagged and released. Summary of changes: _project.py: Now parse "min-version" and detect "format-version" to warn about loading a BuildStream 1 project _versions.py: Remove obsolete BST_FORMAT_VERSION numbers from here data/projectconfig.yaml: Remove old "format-version" from defaults utils.py: Added new private _parse_version() helper function, and another _get_bst_api_version() to get an adjusted API version. frontend/app.py, frontend/cli.py: Updated `bst init` implementation testing (buildstream.testing): Updated testing utilities to generate and use projects with min-version instead of format-version. tests and examples: Updated to use min-version across the board.
* types.py: Add a __str__ to PipelineSelection to fix man pagesbschubert/fix-manpagesBenjamin Schubert2020-04-231-0/+3
| | | | | This ensures that we get as 'default' what the user needs to enter in the command in the manpages
* _exceptions.py: Propagate `temporary` to the base classjuerg/temporary-failureJürg Billeter2020-04-211-3/+3
| | | | The parameter value should not be ignored.
* Fix typo namspaceing -> namespacingSean Borg2020-04-211-1/+1
|
* src: Removing all pre 2.x "Since" documentation annotations.Tristan Van Berkom2020-04-216-55/+8
| | | | | | | | | | | | | | | This does not make sense to keep in the public API surface documentation. As we are heading towards a release of 2.0, this represents a "reset" in public API, and older annotations only serve to clutter the documentation with information that is not relevant to the reader. Everything which is public at the time of the 2.0 release can be considered available "Since: 2.0" implicitly (as this is going to be the starting point of this new stable API). It will make sense to start adding these annotations again for any added API in 2.2 and forward.
* pip source plugin: Add support for python 3.8tristan/pip-source-3.8Tristan Van Berkom2020-04-201-0/+1
| | | | | | | | | | For some reason, the pip source plugin appears to pass tests in master when testing python 3.8 without this change, however it does not pass tests without this change on the bst-1 branch. Adding this change to master for consistency across branches for now, and in the off chance that this fixes the pip source plugin in some python 3.8 environments.
* _artifact.py: Don't cache the proto of incomplete artifactsJürg Billeter2020-04-201-10/+14
| | | | | | | We need to make sure that we read the new proto after a fresh build. And there is no need to keep the proto around for an incomplete artifact. This fixes `FileNotFoundError` of CAS blob on push after rebuild.
* _casbaseddirectory.py: Fix temp file permissions in open_file()Jürg Billeter2020-04-201-0/+2
| | | | This is required when buildbox-casd is running as separate user.
* _cas/cascache.py: Drop unused contains_file()Jürg Billeter2020-04-201-12/+0
|
* _artifact.py: Don't consider an artifact cached if logs are missingJürg Billeter2020-04-201-12/+7
| | | | | | | | | Artifact push and pull operations currently fail if logs are missing. We don't currently have a config option to control how long artifact logs should be kept in the cache. Until this changes, we should be conservative and consider logs to be an essential part of artifacts, keeping them from getting expired before the rest of the artifact.
* _cas/cascache.py: Add contains_files() methodJürg Billeter2020-04-201-5/+17
| | | | Like `contains_file()` but checks multiple files in a single request.
* cascache.py: Add allow_partial parameter to fetch_blobs()Jürg Billeter2020-04-204-15/+9
| | | | This fixes handling of missing blobs in `ArtifactCache.pull()`.
* _artifactcache.py: Handle BlobNotFound error in pull()Jürg Billeter2020-04-201-0/+5
|
* _artifactcache.py: Fix misleading log message when pulling artifactsJürg Billeter2020-04-201-2/+1
| | | | | Do not print message "Pulled artifact" when pulling the artifact proto without data. This matches the log messages in `SourceCache`.
* element.py: Tweak cache key calculation for `BST_STRICT_REBUILD`Jürg Billeter2020-04-161-1/+1
| | | | | Include the project name and element name of dependencies in all cache key variants as the dependency names are stored in the artifact proto.