| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, there isn't an easy way to install BuildStream along with its
plugin dependencies, using pip.
Add plugin requirements as extras
(https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies)
so that they can be installed by specifying the relevant extras to
`pip`.
This repository has only one plugin - `deb` source - that has external
dependencies, i.e. `arpy`. With this patch, one should be able to
install BuildStream and dependencies for the `deb` plugin using
something like `pip instal BuildStream[deb]`.
|
|\
| |
| |
| |
| | |
Use Black to format code
See merge request BuildStream/buildstream!1703
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add `doc/source/conf.py` to the filelist for Black and Pylint.
Previously this file was not covered by any of the linters, so this
patch includes one-off sweeping changes for the formatting.
To make pylint happy, we had to disable a warning about defining a
variable called `copyright` since that's a built-in. It's unlikely that
we will ever need the built-in `copyright()` in this module, so it seems
safe to disable it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that code formatting is managed by Black, and we don't need to run
`pycodestyle` separately, remove corresponding mentions from hacking
documentation.
Add documentation on how to run Black.
Move out linting and formatting into a separate section for better
readability.
|
| |
| |
| |
| |
| |
| |
| | |
As discussed over the mailing list, reformat code using Black. This is a
one-off change to reformat all our codebase. Moving forward, we
shouldn't expect such blanket reformats. Rather, we expect each change
to already comply with the Black formatting style.
|
| |
| |
| |
| | |
As part of the `lint` CI job, also check code formatting.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All the formatting-related warnings from `pycodestyle` are covered by
Black, and almost all of the remaining ones are covered by `pylint`.
Based on that, remove `pycodestyle` so that we don't have to maintain
another set of configuration.
More details on warnings/errors covered by `pycodestyle` below.
---
Here's the big list of pycodestyle error/warning codes:
https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes. They are
broken down into following categories:
1. Indentation
2. Whitespace
3. Blank line
4. Import
5. Line Length
6. Runtime
7. Deprecation warning
8. Statement
Out of the above, 1-5 are purely formatting related so we don't needd to care
about them. 6 is runtime issues like syntax error that are hard to miss (even
mypy will complain about these). 7 is about deprecation warnings. Half of them
don't apply to us since we only support Python 3.5+ and the other half is
covered by `pylint`.
That leaves us with the "E7*" codes, that pycodestyle groups under "Statement"
heading. After verifying each of them, the only ones that is really not covered
by either Black or Pylint is the following:
* E731 do not assign a lambda expression, use a def
This sole check does not seem worth keeping another tool.
|
| |
| |
| |
| |
| |
| |
| | |
Since we use Black to format our code, disable code-formatting messages
from Pylint as they are already taken care of by Black. This ensures
that we don't get double warnings for the same problem, and that Pylint
and Black don't fight with each other over style.
|
|/
|
|
|
|
|
|
|
|
| |
Introduce two new tox environments - `format` and `format-check`. The
`format` environment will reformat the code using `black` whereas the
`format-check` envrionment will simply print the diff without modifying
any files.
Configure Black to use the same line lengths that we use
currently, i.e. 119.
|
|\
| |
| |
| |
| |
| |
| | |
_profile.py: Raise exception if invalid BST_PROFILE topic
Closes #1208
See merge request BuildStream/buildstream!1711
|
|/
|
|
|
| |
This is implemented with a new ProfileError, ensuring a user
doesn't wait for a profile to complete that was never valid.
|
|\
| |
| |
| |
| |
| |
| | |
Gracefully shutdown children on termination
Closes #1185
See merge request BuildStream/buildstream!1692
|
| | |
|
| |
| |
| |
| |
| | |
This ensures that we don't show an unexpected error when we
forcefully kill one of our workers
|
| |
| |
| |
| |
| | |
This allows showing a nice info to the user and stop showing that
the return code was an unexpected 255.
|
|/
|
|
|
|
|
|
|
|
|
| |
Using `join()` on the subprocess calls `waitpid()` under the hood
which breaks our child watcher.
Instead, schedule a task for 20 seconds later that will effectively
kill the tasks.
Note that the task will only be called if we still have active jobs.
Otherwise, it will just be skipped and we won't wait as long.
|
|\
| |
| |
| |
| |
| |
| | |
Fix pylint configuration
Closes #1206
See merge request BuildStream/buildstream!1708
|
| |
| |
| |
| |
| |
| |
| | |
Running it like `src/buildstream` apparently doesn't report the warnings
correctly, as pylint does not like file paths.
Fixes #1206.
|
| |
| |
| |
| |
| | |
Pylint failed to catch these earlier due to misconfiguration, so fix
them now.
|
| |
| |
| |
| |
| | |
Pylint failed to catch these earlier due to misconfiguration, so fix
them now.
|
|/
|
|
|
| |
Pylint failed to catch these earlier due to misconfiguration, so fix
them now.
|
|\
| |
| |
| |
| |
| |
| | |
app: Pass color setting to Status
Closes #1204
See merge request BuildStream/buildstream!1707
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
Fix capabilities check of remotes
Closes #1178
See merge request BuildStream/buildstream!1705
|
| |
| |
| |
| | |
This also adds a test to ensure we are correctly setting the cache up
|
|/
|
|
|
|
|
|
|
|
|
| |
Currently, the `BaseRemote` would call `_check()` on the children, which
states that errors should be sent back as a string. However,
`BaseRemote` doesn't check the return of `_check()`.
This changes the contract so that subclasses throw `RemoteError`
themselves.
This also fixes the `ArtifactShare` and add a test.
|
|\
| |
| |
| |
| |
| |
| | |
_frontend: Simplify color handling
Closes #1200
See merge request BuildStream/buildstream!1704
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Currently we store color configuration in our App object, and have to
remember to pass it around to `click.echo()` when printing things on the
screen. This is error-prone as we can forget to do so. This leads to
bugs like #1200, where `bst init` was not respecting `--no-colors` flag.
Instead of doing that, this patch controls colors in output by
configuring the `click.Context` object.
Fixes #1200.
|
|\
| |
| |
| |
| | |
tests/frontend/completions: Fix implicit string concatenation
See merge request BuildStream/buildstream!1702
|
|/
|
|
|
|
|
|
|
|
| |
We expect `INVALID_ELEMENTS` to be a list of element names. However we
are missing a comma in between the names, so they end up being
concatenated into a single strings.
The test passes either way (which is not ideal) because it just checks
that the suggested completion is _different_ than the expected in case
of errors.
|
|\
| |
| |
| |
| | |
Add SandboxREAPI class
See merge request BuildStream/buildstream!1699
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This provides a skeleton for sandbox implementations based on the Remote
Execution API.
|
| |
| |
| |
| | |
This makes process_job_output() reusable for local execution.
|
| |
| |
| |
| | |
This will allow making _run() reusable for local execution.
|
| | |
|
| |
| |
| |
| | |
This reduces the number of round trips.
|
|/ |
|
|\
| |
| |
| |
| | |
scheduler.py: Prevent the asyncio loop from leaking into subprocesses
See merge request BuildStream/buildstream!1691
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
Having a running asyncio loop while forking a program is not supported
in python and doesn't work as expected.
This leads to file descriptors leaking and the subprocesses sharing the
same loop as the parents. This also leads to the parent receiving all
signals the children receive.
This ensures we don't leek our asyncio loop in the workers we fork.
|
|\
| |
| |
| |
| | |
Indicate that compose & stack plugins do not run commands
See merge request BuildStream/buildstream!1697
|
|/
|
|
|
|
| |
Both compose and stack elements do not run commands in the build
sandbox. Indicate so by setting the `BST_RUN_COMMANDS` attribute
accordingly.
|
|\
| |
| |
| |
| |
| |
| | |
_sandboxbwrap.py: Create /dev/shm in the sandbox
Closes #1197
See merge request BuildStream/buildstream!1694
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Creates /dev/shm as a tmpfs in the sandbox. Before now access to
/dev/shm was only available by a plugin using `Sandbox.mark_directory()`
or adding to `Sandbox.DEVICES`, either of which would _mount_ /dev/shm
into the sandbox, allowing pollution from the host. This adds it as a
tmpfs by default, which seems sensible as it is required for POSIX
support.
Also adds a test which makes sure that we can open a shared memory
object inside the build sandbox with some (probably poor) C code.
|
|\
| |
| |
| |
| |
| |
| | |
skip tracking elements without trackable sources
Closes #1186
See merge request BuildStream/buildstream!1689
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method reports whether the source can be tracked. This would be
false for sources advertising BST_KEY_REQUIRES_STAGE.
Element tracking can be skipped if none of the held sources can be
tracked. This is determined by the value of the
`Element.__tracking_scheduled` attribute which is set in
`Element._schedule_tracking()`. This is set to `True` if at least one
source can be tracked.
Also remove some of the tracking handling from `_stream._load` to
`_stream.track` where it is more relevant.
closes #1186
|
|\
| |
| |
| |
| |
| |
| | |
_remote.py: Expand user in certificates paths
Closes #741
See merge request BuildStream/buildstream!1696
|