| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Now that PEP8 style is enforced by Black, we don't need another tool
checking the same. So, remove all configuration related to
`pycodestyle`.
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
This ensures we correctly expand "~" in paths to certificates
|
|\
| |
| |
| |
| | |
plugins/elements/stack: Disallow sources
See merge request BuildStream/buildstream!1695
|
|/
|
|
|
|
| |
Stack elements represent a logical grouping of dependencies. As such,
sources for stack elements do not make any sense. So, explicitly
disallow them to prevent any confusion.
|
|\
| |
| |
| |
| | |
app.py: Also catch SystemError with click.Abort
See merge request BuildStream/buildstream!1690
|
|/
|
|
|
|
|
|
|
| |
This is to catch an error when sometimes the readline buffer of stdin
gets corrupted during the second CTRL-C we send, and leads to having
BuildStream hand and throw a SystemError.
Catching the SystemError and treating as a click.Abort doesn't seem
to have adverse effects.
|
|\
| |
| |
| |
| |
| |
| | |
Remove ignore_workspaces kwarg
Closes #1190
See merge request BuildStream/buildstream!1688
|
| | |
|
|/
|
|
|
|
| |
Attempting to open a workspace for the same element without closing it
now raises. This makes this kwarg unnecessary and tests should close
workspaces between attempts to open.
|
|\
| |
| |
| |
| |
| |
| | |
Remove `commit`ting sources inside `Source()._generate_key`
Closes #1182
See merge request BuildStream/buildstream!1686
|
|/
|
|
|
|
|
|
| |
`Stream.shell()` should check that the element's sources are cached
before calling the shell. If the sources are not cached raise a
StreamError and recommend a fetch.
closes #1182
|
|\
| |
| |
| |
| | |
_context.py: Improve reporting of incorrect user config
See merge request BuildStream/buildstream!1687
|
|/
|
|
|
|
| |
This fixes a case where, in project overrides, if a user specified
a scalar/sequence instead of a mapping for a given project, the
user would receive an ugly stacktrace instead of an invalid format.
|
|\
| |
| |
| |
| | |
tests/artifactshare: safer cleanup_on_sigterm use
See merge request BuildStream/buildstream!1673
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the documented path [1] to `pytest_cov.embed.cleanup_on_sigterm()`,
to avoid crashing on some versions.
It turns out that pytest_cov v2.6.1 on my machine doesn't like the way
that we were accessing cleanup_on_sigterm(). Access it in such a way
that we will either get the function or an ImportError, as per the
documentation.
[1]: https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
|
|/
|
|
|
|
|
|
| |
Remove a couple of cases where it's possible to make the main test
process hang, waiting for something to appear on a queue.
Raise a friendlier exception, earlier, if there was a problem starting
the server process.
|