summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Ensure there are no duplicates in Elements.dependencies()chandan/duplicate-format-depsChandan Singh2020-05-141-4/+11
| | | | | | | | | | | | | | When we are not recursing, `Element.dependencies()` uses a much more light weight codepath since it just needs to print the direct dependencies. However, this simple codepath was not accounting for duplicates, in case something is both a build time and run time dependency. One way this manifested itself was in `bst show --format %{deps}`, but it would also affect anything that was using this method to iterate on the dependencies. Fixes #1308.
* _frontend/cli: Support "build" and "run" values for `artifact push --deps`Chandan Singh2020-05-131-1/+6
|
* _frontend/cli: Support "build" and "run" values for `artifact pull --deps`Chandan Singh2020-05-131-1/+6
|
* _frontend/cli: Support "build" and "run" values for `source fetch --deps`Chandan Singh2020-05-131-1/+12
|
* _frontend/cli: Support "build" value for `bst build --deps`Chandan Singh2020-05-131-1/+4
| | | | | | This can be quite handy when one is preparing to open a build shell. This originally came up in https://gitlab.com/BuildStream/buildstream/-/issues/685#note_105460896.
* utils.py: Improve error handling of _parse_version().Tristan Van Berkom2020-05-131-4/+4
| | | | | | | This was not reporting errors if not given a string, since we don't only pass strings parsed from project.conf but also pass plugin defined Plugin.BST_MIN_VERSION definitions, we should be more fault tolerant here.
* _sandboxbuildboxrun.py: Pass --no-logs-capture to buildbox-runjuerg/no-logs-captureJürg Billeter2020-05-121-0/+4
| | | | | | buildbox-common master no longer forwards stdout/stderr of the action command by default. The buildbox-run capabilities mechanism is used to support old and new versions.
* source.py: Allow access to element's variableBenjamin Schubert2020-05-124-7/+16
| | | | | This automatically expands the variables from the element into the sources config
* source.py: Don't re-declare __init__ in source implementationsBenjamin Schubert2020-05-122-14/+7
| | | | | | | We explicitely ask plugin authors not to do this in our documentation, we should therefore also not do it unless there is a real need. For this cases, just pass the default values as class variables.
* buildelement: Ensure command-subdir is part of the cache keyChandan Singh2020-05-121-3/+7
| | | | | | | | | | `command-subdir` was previously missing from the cache key. This patch makes it a part of the cache key _if_ it was specified. It means that the cache key will not change for elements that had not defined a `command-subdir`. However, it will change for every element that did define it. Fixes #1295.
* option.py: Remove 'transform' flag. It is not needed anymoreBenjamin Schubert2020-05-126-21/+10
| | | | | Now that we handle variable transformation more globally, we don't need the transform value anymore
* element.py: Always expand all variables at element creationBenjamin Schubert2020-05-127-52/+51
| | | | | This will allow all users to not have to care about whether the option is expanded or not, making it easier to use variables everywhere
* testing.py: Add a new `check_cache_key_stability` helperbschubert/cache-key-helperBenjamin Schubert2020-05-123-0/+237
| | | | | This allows plugin authors to implement cache keys tests more easily
* Update all packages requirementsBenjamin Schubert2020-05-113-3/+3
| | | | Also fix linting errors coming with new version of pylint
* lint: Stop using mutable objects for default argumentsBenjamin Schubert2020-05-113-6/+9
|
* pip.py: Remove the pip element, it is in experimentalBenjamin Schubert2020-05-112-87/+0
| | | | | The pip element was copied already to bst-plugins-experimental. We don't need to have two copies of it.
* Return names of grpc errorstraveltissues/grpccodesDarius Makovsky2020-05-113-11/+15
|
* 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
|