Commits on Source (70)
-
Martin Blanchard authored
The REAPI allows a client to reconnect to an ongoing operation stream by providing a WaitExecution(). If implemented on server side, BuildStream will try to recover from connection errors using it. #630
-
Jim MacArthur authored
Handle connection losses during remote build execution See merge request !806
-
Angelos Evripiotis authored
-
Angelos Evripiotis authored
_downloadablefilesource: handle ValueError-s Closes #452 See merge request !893
-
James Ennis authored
-
James Ennis authored
-
James Ennis authored
Improve our documentation for configuring an artifact server See merge request !899
-
Daniel Silverstone authored
This pointless bare `return` was causing modern pylint to raise an error. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The python `for`/`else` construct only makes sense if the `for` loop body has a `break` statement. Otherwise the use of `else` causes pylint to raise an error. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
In `_parse_workspace_config` there was a chained version comparison which is simplified in this commit to quieten a pylint issue. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Where we use a construct `val == foo or val == bar` we can instead use `val in (foo, bar)` which pylint prefers. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
For Python before 3.6, `path.resolve()` could not take the `strict` keyword argument. Linting on such Python versions will raise an unnecessary issue given the check present. As such, quieten that lint. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The correct file path was computed but never returned. This was never caught because of a test missing consumption of one of its parameters. This commit resolves the bug mentioned in #722 leaving the test to be amended by a future commit. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
This braino would mean that we'd fail to raise the right exception if we failed to find the right project object when unpickling the yaml cache. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The imports of _cachekey and utils were unused. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Unfortunately elements don't override `__init__` in general, so we have to quieten pylint here. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Where we have conditions of the form `var == foo or var == bar` it can be simplified to `var in (foo, bar)` which pylint prefers. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Unfortunately pylint can't understand that we'll always use subclasses of Element and as such complains of a no-return function (`assemble()`) having its return value used. This quietens that warning. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Pylint recommends the use of dict.get() rather than a multi-line if statement for handling optional keyword arguments. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
A number of times, abstract methods are called which pylint cannot possibly understand will only ever happen in subclasses which implement the abstract methods. This silences those specific warnings Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Remove `source_kind` as it was unused. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Remove the `context` variable which was unused. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
We use `preexec_fn` in our use of Popen. Since there are threads in the codebase, this is not necessarily safe. However we go to great lengths to ensure that the main process doesn't spawn threads (they're used in gRPC a lot) and so it should be safe for our use. As such, we disable the lint here. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The imports of `stat` and `S_ISDIR` from `stat` should be grouped to satisfy pylint. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The pylint report dislikes the superfluous parens which used to be here in this assert. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The pylint tool is unable to understand that the abstract methods in the artifact cache will only be called when there's concrete implementations behind them. Silence the lint errors for these specific calls. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The `resource` import was unused. Removed. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The `curses` import is "standard" whereas `click` is not. As such, despite alphabetical order normally being the rule, `curses` must come before `click`. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Since default values in arguments to functions and methods are created once at the compilation of the code, it is dangerous to include list and dict literals in them. This changes the use of {} to None. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Unfortunately pylint can't tell this is an abstract method which will only ever end up invoked from a class which concretises it. As such we need to silence this warning. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The pylint tool prefers that conditions of the form "var == foo or var == bar" be refactored into "var in (foo, bar)". Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
An otherwise empty __init__ passing no arguments to super.__init__ is worthless. Remove it. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The import of `resource` was unused. The import of `PlatformError` was unused. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The imports of `Message` and `MessageType` were unused. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The linter dislikes an if/return/else/return where it can be simplified to a return of the if condition. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The linter cannot detect abstract methods the way we use them, so this silences the warning which ensues. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The `done()` method does not return anything anywhere else. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The `SourceError` import was never used Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The `assert_ref_in_track()` method's return value was never used so rationalise it to never return a value. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The use of dictionary literals in argument defaults is disrecommended due to the way that they are static and thus potentially very confusing. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
In Python 3, inheriting from `object` explicitly is pointless. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Sometimes `dict.get()` is preferable, in this instance it's less clear so we'll disable that lint Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The variable was unused, remove it. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
We are super-careful to not use threads in places where we might use Popen and as such this warning is save to quash. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Sometimes `dict.get()` is preferable to an `if` statement, but this time it's clearer if we keep the structure. As such, silence the warning. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Correct some multi-line conditional indentation by slight refactor if necessary. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The lint tool dislikes the use of `if len(SEQ) == 0` type statements because nominally `len(SEQ)` may be more expensive than `bool(SEQ)`. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
Python linters prefer that attributes are defined in __init__ rather than left to later routines. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
The imports of `Message` and `MessageType` were unused. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
In order to quieten the linter, and to make a more correct comparison, we switch to using the `Code.OK` enumeration from `google.rpc.Code` Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
We need to do this so that the new linting errors pop up
-
Daniel Silverstone authored
Versioneer needs to be in the MANIFEST.in and its .pyc needs to be ignored in the .gitignore. Also much docs were not being included, nor conftest.py. Much of the test suite data files needed including, so changed that to a raw include of everything in the tests/ tree. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
We need to alter how coverage data is recovered in order to work with newer coverage tooling. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Chandan Singh authored
Fix lint issues See merge request !892
-
Chandan Singh authored
Instead of redundantly documenting "directory" configuration option in each source plugin, refer to the built-in functionality documentation of the Source class. * source.py: Add anchor for built-in functionality. * sources/plugins/*.py: Remove directory config option, and add reference to Source's built-in functionality. Fixes #713.
-
Chandan Singh authored
For each element plugin derived from BuildElement, add reference to the built-in functionality documentation of BuildElement. * buildelement.py: Add anchor for built-in functionality. * plugins/elements/*.py: Add refence to BuildElement's built-in functionality for each build element. Related to #713.
-
Chandan Singh authored
plugins: Don't redundantly document common configurations Closes #713 See merge request !896
-
Daniel Silverstone authored
We were unconditionally inserting into the yaml cache anything we had retrieved from the yaml cache. This had the side-effect of being expensive on re-runs of commands where yaml hadn't changed. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Jonathan Maw authored
_yaml.py: Do not insert into cache if retrieved from cache See merge request !902
-
Currently we would make sure the sandbox had a command before converting it to a list if it was given as a string. That meant that a string command would never exist and the check be invalid. This also adds the same logic in the dummy sandbox for consistency.
-
Benjamin Schubert authored
Check is command is a str and replace by list before checking existence Closes #728 See merge request !898
-
In cases where elements end up with large numbers of dependencies, the n-squared performance in `_extract_depends_from_node` can produce significant delays during project load. This patch corrects that. In addition we were double-retrieving provenance which was unnecessary. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Phil Dawson authored
_loader/loadelement.py: Use enumerate() in dependency extraction See merge request !901
-
James Ennis authored
-
James Ennis authored
-
James Ennis authored
More information regarding the use of systemd to manage the cache See merge request !904
-
Daniel Silverstone authored
The `_sentinel` in `utils.py` was used only for yaml node tracking. As such, simplify matters by removing it from `utils.py` and move it to `_yaml.py` which means that we no longer need to try and avoid a circular import issue by means of runtime importing. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
James Ennis authored
Move _sentinel from utils.py to _yaml.py See merge request !903
-
Chandan Singh authored
Currently, `Pipeline.assert_consistent()` prints an error message like the one below when certain elements have inconsistent sources: ``` ... Element: hello.bst is inconsistent Source tar source at hello.bst [line 16 column 2] is missing ref ... ``` Drop the word "Source" from the beginning of the message as "Source <source-kind> source ..." is kind of awkward to read.
-
Chandan Singh authored
As discussed in https://mail.gnome.org/archives/buildstream-list/2018-September/msg00064.html, add `bst source-checkout` command. This will allow users to checkout sources for a given target. * _frontend/cli.py: Add source-checkout command * _pipeline.py: Add assert_sources_cached() method * _stream.py: Add source_checkout method, abstract out __check_location_writable() method that used to part of checkout()
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- .gitlab-ci.yml 8 additions, 8 deletions.gitlab-ci.yml
- MANIFEST.in 15 additions, 7 deletionsMANIFEST.in
- buildstream/_artifactcache/artifactcache.py 4 additions, 4 deletionsbuildstream/_artifactcache/artifactcache.py
- buildstream/_artifactcache/cascache.py 14 additions, 9 deletionsbuildstream/_artifactcache/cascache.py
- buildstream/_context.py 0 additions, 1 deletionbuildstream/_context.py
- buildstream/_frontend/app.py 0 additions, 1 deletionbuildstream/_frontend/app.py
- buildstream/_frontend/cli.py 27 additions, 0 deletionsbuildstream/_frontend/cli.py
- buildstream/_frontend/status.py 1 addition, 1 deletionbuildstream/_frontend/status.py
- buildstream/_fuse/hardlinks.py 3 additions, 1 deletionbuildstream/_fuse/hardlinks.py
- buildstream/_fuse/mount.py 3 additions, 3 deletionsbuildstream/_fuse/mount.py
- buildstream/_loader/loadelement.py 3 additions, 5 deletionsbuildstream/_loader/loadelement.py
- buildstream/_options/optionbool.py 2 additions, 2 deletionsbuildstream/_options/optionbool.py
- buildstream/_pipeline.py 28 additions, 1 deletionbuildstream/_pipeline.py
- buildstream/_platform/darwin.py 0 additions, 6 deletionsbuildstream/_platform/darwin.py
- buildstream/_platform/linux.py 1 addition, 6 deletionsbuildstream/_platform/linux.py
- buildstream/_scheduler/jobs/job.py 1 addition, 1 deletionbuildstream/_scheduler/jobs/job.py
- buildstream/_scheduler/queues/pullqueue.py 1 addition, 1 deletionbuildstream/_scheduler/queues/pullqueue.py
- buildstream/_scheduler/queues/trackqueue.py 0 additions, 1 deletionbuildstream/_scheduler/queues/trackqueue.py
- buildstream/_stream.py 97 additions, 27 deletionsbuildstream/_stream.py