| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
error time
|
|
|
|
|
| |
If a plugin raises an error, prepend the plugin identifier to the
error message and raise PipelineError.
|
|
|
|
|
|
|
| |
This also makes main.py less redundant, for some reason there was a stray
call to app.pipeline.initialize() beside app.initialize() in every function,
instead move that into app.initialize() where we now handle the error
and exit gracefully.
|
| |
|
|
|
|
|
|
| |
Enhanced the error checking Result() methods to always assert that
the CLI actually exited, there are no cases worth testing for where
buildstream would be expected to exit on an unhandled exception.
|
| |
|
|
|
|
|
|
|
|
|
| |
It looks like this newly added test assumes the user has a very recent
version of pytest, which supports treating the `tmpdir` fixture like
a string.
A reasonable alternative to this patch would be require at minimum
a version of pytest which supports this newly introduced API.
|
| |
|
|
|
|
|
| |
Instead add a comment about why this is really there,
and invoke sphinx python modules with python3 directly.
|
|
|
|
|
|
|
|
|
|
| |
Some of the warnings from sphinx-build are really just warnings,
but a lot of the things we want to avoid and really break documentation,
like broken internal references and some invalid rst directives should
really be errors.
Now we treat all warnings as errors, this should ensure that
any commits landing upstream never break the docs.
|
|
|
|
|
|
| |
This makes writes done by `bst track` atomic, meaning a crash or power
loss while overwriting a .bst file should never cause the the contents
of that file to be lost or partially written.
|
|
|
|
|
| |
This avoids a circular dependency between the 'utils' and '_yaml'
modules.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a context manager that can be used to divert file writes into a
temporary file, which is then renamed into place once writing is
complete. It is primarily intended for use by source plugins which
download files, so they can ensure that their downloads appear atomic
and there is no risk of leaving half-downloaded files in the cache.
So far this is not used in the core, but it is needed by the Docker
source plugin that is proposed for the bst-external plugins repo. See:
https://gitlab.com/BuildStream/bst-external/merge_requests/9
|
|
|
|
|
|
| |
Fixes the warning:
WARNING: /path/to/buildstream/doc/source/install.rst:45: (WARNING/2) Title underline too short.
|
|
|
|
|
|
|
|
| |
Recently I added the `reason` member which can be used to set
machine readable error reason strings for the purpose of testing.
Forgot to add the necessary `*` argument, forcing `reason` to be
a keyword-only argument.
|
| |
|
|
|
|
| |
Some basic module metadata before publishing the 1.0 release.
|
| |
|
|
|
|
|
|
|
| |
When fetching a downloadable source, we make a defensive check
to avoid redundant download at fetch() time by checking if it's
already cached, but fetch() will never be called if the source
is already cached.
|
|
|
|
|
| |
This has remained without test coverage mostly due to upstream
pytest-datafiles bug https://github.com/omarkohl/pytest-datafiles/issues/1
|
|
|
|
|
|
|
|
| |
Seems that local.py is an appropriate plugin to use for testing
errors which originate from the abstract Source class.
This test checks that we raise the appropriate error in the case
that we attempt to stage to a directory that is a regular file.
|
|
|
|
|
|
|
|
| |
The local plugin is always Consistency.CACHED, this means that
fetch(), set_ref() and get_ref() methods will never be called.
Instead of omitting them, just "pragma: nocover" on the `pass`
statements, making our coverage report more realistic.
|
|
|
|
|
|
|
|
|
| |
The patch plugin was checking if the target directory exists, however
this is automatically guaranteed by the Source abstract class and
documented to be guaranteed as well.
Since this error cannot be caught by the plugin (it will be caught
in advance by the Source class), removing the check from patch.py.
|
|
|
|
|
|
|
| |
directory
This changes the UX to report a better human readable error, which
is otherwise a BUG message with stack trace.
|
|
|
|
|
| |
This also fixes #177 - the problem here was solved simply
by passing the project directory to `cli.run(project=project...)`
|
| |
|
| |
|
|
|
|
|
|
| |
Also added a test case for the `patch` plugin which checks for graceful
failure when the specified patch file is not a regular file (but a block
device or a named pipe instead).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this, we only stored the last exception to have been raised in the main
process, now we additionally provide some Result members allowing tests to
inspect a machine readable error `domain` and `reason` describing why
a task has "failed".
This adds some new APIs to the Result() object for tests:
assert_main_error() - asserts the nature of the main buildstream error
assert_task_error() - asserts the nature of the error from a child task
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Outline of changes to exceptions:
o Now BstError base class has a `domain` and `reason` member,
reason members are optional.
o All derived error classes now specify their `domain`
o For LoadError, LoadErrorReason defines the error's `reason`
o Now the scheduler `job` class takes care of sending the error
reason and domain back to the main process where the last
exception which caused a child task to fail can be discretely stored.
|
|
|
|
|
| |
Build it in one stage before the `pages` target, and then only
make the deployment step conditional on the branch.
|
|
|
|
|
|
|
|
| |
It's possible for the custom termination handlers to raise exceptions.
Indeed this was actually the case for utils._call(). They're especially
difficult to reach with tests, so make extra effort to insulate them.
Print any exceptions encountered as a regular traceback before exiting.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Tested by inflating the chance of hitting the race. First, insert a
sleep between opening the terminator context and starting the process,
then:
python3 -c 'import buildstream.utils; import os; \
buildstream.utils._call(["echo", "hello"], True); \
print(os.getpid())' & sleep 1; kill $!
|
| |
|
|
|
|
|
| |
Integration tests were failing as the installed version of BuildStream
didn't support the new --hardlinks option.
|
|
|
|
|
| |
It's not required to raise SourceError() manually when calling
utils.get_host_tool().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Report UtilError instead of OSError and similar python errors.
Also ensure we catch system errors and raise UtilError with
descriptive text instead; for the user experience; this is the
difference between:
o A FAILURE message with a description as to
what went wrong (exception handled with UtilError)
o A BUG message with the unhandled system error printed
with a stack trace (exception left unhandled)
Also, UtilsError and ProgramNotFoundError are now public exceptions
declared in utils.py, where they will appear in the documentation.
|
|
|
|
|
| |
This is often useful, for example when the main element needs to do
something with a path like /etc/%{project-name}/ .
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Source plugins typically do not have an accompanying YAML file with
their default settings.
|