summaryrefslogtreecommitdiff
path: root/buildstream/_exceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* sandbox/sandbox.py: Display failed commands in the detail stringtristan/error-message-regressionTristan Van Berkom2019-01-161-2/+2
| | | | | | | | | | | We should only display commands in detail strings, not in the message texts. This also updates tests/integration/sandbox-bwrap.py to expect the new message string which only contains the command exit status and not the whole command itself, this does not alter the validity of the text case which is checking that we can obtain the expected return value.
* casremote.py: Move remote CAS classes into its own fileRaoul Hidalgo Charman2019-01-161-0/+15
| | | | Part of #802
* Split up artifact cache and CAS cacheJürg Billeter2018-11-051-0/+10
| | | | | | | | This changes CASCache from a subclass to a delegate object of ArtifactCache. As the lower layer, CASCache no longer deals with elements or projects. Fixes #659.
* Element: Use cached buildtree in build shells and failure shellsJonathan Maw2018-10-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | This includes changes in app.py: * Interactive failure shell no longer uses the failed build sysroot, defaulting to the cached build tree. Changes in element.py are: * Errors caused by building don't store the failed build sysroot, instead storing that a sandbox can be created to debug the error. * When staging sources, will stage the element's cached build tree if it exists. Changes in _exceptions.py: * BstError.sandbox is now a flag of whether a sandbox can be opened up to debug the error. Changes in widget.py: * Don't try to print any information about the sandbox. Changes in _message.py: * Fix documentation so Message.sandbox is not a directory any more. This is part of #539
* Rework Skipped usageJosh Smith2018-09-191-0/+9
| | | | | | | | | | The SKIPPED message type is now used to indicate the end of a task which was successful without having to perform the given task. This overhauls the use of `Queue.done()` and therefore queues do not need to provide a processed/skipped return value from `done()`. Instead this is replaced with the action of raising a `SkipJob` exception from within `Queue.process()`.
* element: validate configuration variablesTiago Gomes2018-09-101-0/+3
| | | | Ensure that protected variables are not being redefined by the user.
* Add cyclic check within variable resolutionJosh Smith2018-08-291-0/+3
| | | | | This aims to address #600, this will raise an exception when a resolved variable contains a reference to the variable.
* Add support for include '(@)' in project.conf and .bst filesValentin David2018-08-021-0/+3
| | | | Fixes #331.
* plugin: bake API to get and validate a project pathTiago Gomes2018-08-021-1/+9
| | | | | | | | A project path is a path relative to a project directory. A project path can not also refer to the parent directory in the first path component, or point to symbolic links, fifos, sockets and block/character devices.
* Add the virtual directory class 'Directory' and one implementation.Jim MacArthur2018-08-011-0/+1
| | | | | | buildstream/storage/Directory.py: New file. buildstream/storage/_filebaseddirectory.py: New file. buildstream/_exceptions.py: New VIRTUAL_FS exception source.
* plugin.py: Extend Plugin.call() APIJosh Smith2018-07-271-2/+2
| | | | | | | | Plugin.call() now takes fail_temporarily as an optional parameter, when supplied it will cause subsequent failures to trigger temporary errors as opposed to permanent errors. This also extends Plugin.check_output() which makes use of Plugin.call()
* cascache.py: Update cache push/pull errors to be temporaryJosh Smith2018-07-271-2/+2
| | | | Further work needs to be done for the current grpc exceptions which are reraised.
* _exceptions.py: Modify BstError API to allow optional retryJosh Smith2018-07-271-1/+6
| | | | | | | | | | | | job.py: Changes to the logic surrounding retry attempts and child process return codes element.py, source.py: ElementError and SourceError also implement this change. These exceptions now have an optional parameter of temporary which defaults to false. This will potentially break backwards compatibility where exceptions were previously raised and a retry was intended. To trigger a retry, one must now raise their SourceError or ElementError with temporary=True. This aims to fix #397.
* _exceptions.py: Add `detail` to ArtifactErrorsTristan Maat2018-07-181-2/+2
|
* Add error message when running commands on directoriesFrancisco Redondo Marchena2018-06-281-0/+3
| | | | Issue #446
* Remove shebangs from python filesGökçen Nurlu2018-06-191-1/+0
| | | | Fixes #424
* _stream.py: Add StreamError exceptionTristan Van Berkom2018-05-081-2/+13
| | | | Use Stream error for Stream errors.
* More specific exceptions when a project.conf is missing.Tristan Van Berkom2018-04-081-3/+9
| | | | | Since we want to react and start an interactive session when the project.conf is missing, we need a more specific error to catch.
* _exceptions.py: Added LoadErrorReason.INVALID_SYMBOL_NAMETristan Van Berkom2018-04-061-0/+3
|
* _exceptions.py: Allow detail strings in LoadError exceptionsTristan Van Berkom2018-04-051-2/+2
|
* _exceptions.py: Added new LoadErrorReasons for junction load failuresTristan Van Berkom2018-04-051-0/+6
|
* _exceptions.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-031-9/+29
| | | | | | | | | | And adjust all surrounding sources for changed symbols. Also, added new LoadErrorReason.UNSUPPORTED_PLUGIN, required for changes in how the project will report format version errors for plugins at creation time This is a part of issue #285
* _exceptions.py: Adding new AppError exception and error domainTristan Van Berkom2018-04-021-0/+10
|
* Include initialization time in the total session time of the build logTristan Van Berkom2018-04-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the frontend App object and touches a few internals. o The scheduler now takes a start time given to it at instantiation time, instead of considering the start time to commence in Scheduler.run() o The App.initialize() method has been swapped out for an App.initialized() context manager. This context manager now takes care of the main start/fail/success messages. For convenience and ensured consistency, this context manager is now responsible for: o Printing the startup heading o Printing the end of session summary o Exiting with a consistent error status in case of errors o The Pipeline() object no longer prints the start/fail/success messages, as they are now taken care of by the App() o The cli.py frontend code is much simplified by using the new context manager, also enforcing consistency in how we handle and report errors. This fixes issue #186
* pylint - dealt with global-statement warningJames Ennis2018-03-141-0/+2
|
* Add junction support for subprojectsJürg Billeter2018-02-081-0/+3
| | | | | This introduces junctions as a new kind of elements to allow dependencies to cross project boundaries.
* _exceptions.py: Added `detail` member to base BstError class.Tristan Van Berkom2018-01-111-3/+8
| | | | | | | Now any BuildStream exception can potentially add detail to the errors they raise. Allow detail strings already in PluginError()
* Exceptions refactoringTristan Van Berkom2017-12-291-14/+62
| | | | | | | | | | | | | | | 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.
* utils.py: Add UtilErrorTristan Van Berkom2017-12-201-13/+0
| | | | | | | | | | | | | | | | | 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.
* Refactoring: Renamed _BstError -> BstErrorTristan Van Berkom2017-11-061-9/+25
| | | | | | Base class for exceptions is now a part of the already private _exceptions module Also moved PipelineError from _pipeline -> _exceptions module
* Refactoring: Rename _ArtifactError -> ArtifactErrorTristan Van Berkom2017-11-061-1/+1
| | | | This is now part of the already private _exceptions module
* Refactoring: Move exceptions module to be privateTristan Van Berkom2017-11-061-0/+170
Hide all of buildstream's internal exceptions from the API surface.