summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* README.rst: Added notice to access BuildStream on github instead.HEADmasterTristan van Berkom2021-01-021-113/+1
|
* Merge branch 'tristan/dissolve-pipeline' into 'master'bst-marge-bot2020-12-2313-507/+401
|\ | | | | | | | | Pipeline refactor See merge request BuildStream/buildstream!2121
| * _pipeline.py/_stream.py: Remove Pipeline objectTristan van Berkom2020-12-232-232/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stateful Pipeline object and leaves behind only a toolbox of functions for constructing element lists, such as _pipeline.get_selection() and _pipeline.except_elements(), and some helpers for asserting element states on lists of elements. This makes it easier for Stream to manage it's own internal state, so that Stream can more easily decide to operate without hard requiring a Project instance be available. This also adds type annotations to the new version of _pipeline.py.
| * _pipeline.py: Remove add_elements()Tristan van Berkom2020-12-231-16/+0
| |
| * _pipeline.py: Remove track_cross_junction_filter()Tristan van Berkom2020-12-231-76/+0
| |
| * _pipeline.py: Remove resolve_elements().Tristan van Berkom2020-12-231-30/+0
| |
| * _pipeline.py: Remove load() methodTristan van Berkom2020-12-231-30/+0
| |
| * _pipeline.py: Remove check_remotes()Tristan van Berkom2020-12-231-16/+0
| |
| * _stream.py: Don't use Pipeline.add_elements()Tristan van Berkom2020-12-231-1/+4
| | | | | | | | This function is used only once and is quite unnecessary
| * _stream.py: Added internal _track_cross_junction_filter()Tristan van Berkom2020-12-233-3/+49
| | | | | | | | | | | | | | | | | | | | Replaces Pipeline method `track_cross_junction_filter()`. This changes the error domain for invalid cross junction tracking, so updating the following two test cases: * testing/_sourcetests/track.py * tests/frontend/track.py
| * _stream.py: Add internal _resolve_elements()Tristan van Berkom2020-12-231-1/+31
| | | | | | | | Replaces Pipeline `resolve_elements()`.
| * _stream.py: Added internal _load_elements()Tristan van Berkom2020-12-231-7/+40
| | | | | | | | | | | | This replaces the pipeline `load()` method. This does some rewording in `Stream._load_elements_from_targets()`
| * _stream.py: Add internal _resolve_remotely_cached()Tristan van Berkom2020-12-231-1/+16
| | | | | | | | This replaces the corresponding Pipeline method `check_remotes()`.
| * tests/internals/pluginloading.py: Removed testTristan van Berkom2020-12-239-102/+0
|/ | | | | | | | | | | | | | This internal test was relying on internal construction of pipeline, and relying on the shape of internal API interactions, which is the case for many tests in the tests/internals directory, and thus they make internal API churn harder to deal with. In this case, this test has been long superceded by the newer test in tests/plugins/loading.py, which not only tests the ability to load a custom plugin and source successfully, but also tests the various possible failure modes. In short, this internal test is now thankfully obsolete.
* Merge branch 'tristan/fix-broken-test' into 'master'bst-marge-bot2020-12-221-3/+1
|\ | | | | | | | | tests/frontend/push.py: Fix test fallout from recent changes See merge request BuildStream/buildstream!2120
| * tests/frontend/push.py: Fix fallout from recent teststristan/fix-broken-testTristan van Berkom2020-12-221-3/+1
|/ | | | | | | | | | | This test was broken from the following commits: 98c807002cf3beb2110695083450a42fe8feefd0 9a124386a0ba8995e7cfd92e2c7d8fb23854f7e4 As of these commits, a Cli() instance requires it's directory to not be created in advance, this was not caught in CI because we skip the tests in CI where the runners lack proper subsecond mtime precision.
* Merge branch 'tristan/messenger-convenience-functions' into 'master'bst-marge-bot2020-12-2213-190/+216
|\ | | | | | | | | Added core facing convenience logging functions See merge request BuildStream/buildstream!2119
| * sandbox/_sandboxbuildboxrun.py: Use Messenger conveinence functionstristan/messenger-convenience-functionsTristan van Berkom2020-12-221-5/+2
| |
| * sandbox/_sandboxremote.py: Use Messenger convenience functionsTristan van Berkom2020-12-221-5/+2
| |
| * sandbox/sandbox.py: Use Messenger convenience functionsTristan van Berkom2020-12-221-7/+2
| |
| * _pluginfactory/pluginfactory.py: Use Messenger convenience functionsTristan van Berkom2020-12-221-4/+1
| |
| * _scheduler/scheduler.py: Use Messenger convenience functionsTristan van Berkom2020-12-221-3/+1
| |
| * _loader/loader.py: Use Messenger convenience functionsTristan van Berkom2020-12-221-3/+1
| |
| * _project.py: Use Messenger convenience functionsTristan van Berkom2020-12-221-10/+4
| |
| * _cas/casdprocessmanager.py: Use Messenger convinence functions.Tristan van Berkom2020-12-222-31/+16
| | | | | | | | | | | | This also adjusts the very strange tests in tests/internals/cascache.py which use unittest's MagicMock interface to inspect what happened on specific python methods instead of doing proper end-to-end testing.
| * _assetcache.py: Remove private _message() functionTristan van Berkom2020-12-211-10/+1
| | | | | | | | Use Messenger convinence functions instead.
| * _pipeline.py: Remove private _message() functionTristan van Berkom2020-12-211-16/+2
| | | | | | | | Use Messenger convinence functions instead.
| * _stream.py: Remove private _message() functionTristan van Berkom2020-12-211-24/+15
| | | | | | | | Use Messenger convinence functions instead.
| * _messenger.py: Adding convenience methods for issuing info and warn messagesTristan van Berkom2020-12-211-0/+65
| | | | | | | | | | | | Several parts of the core have replicated codepaths for issuing info and warn messages, remove the need for these functions by providing a convenience layer in the Messenger object.
| * _messenger.py: Adding (almost) full pep484 type annotations.Tristan van Berkom2020-12-211-72/+104
|/ | | | | | | | | This omits the type annotation for the message handler callback, as this callback contains a keyword argument and can only be annotated using `Protocol` type, which will only be available in python >= 3.8. Added a FIXME comment so that we can recitify this when dropping support for python 3.7
* Merge branch 'tristan/refactor-shell-builtree-tests' into 'master'bst-marge-bot2020-12-217-210/+274
|\ | | | | | | | | Refactor shell build tree tests See merge request BuildStream/buildstream!2116
| * tests/integration/shellbuildtrees.py: Use module scope fixtures and parametrizetristan/refactor-shell-builtree-testsTristan van Berkom2020-12-211-195/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests were quite hard to follow what they were testing, and did not cover the error cases thoroughly either. Instead, use some test parametrization to implement more succinct tests which cover the API surface more thoroughly. Due to parametrization and discrete testing of various use cases, this was going to be very expensive, so this patch introduces some pytest module scope fixtures. This allows multiple discrete tests to be run against a prebuilt ArtifactShare with specific artifacts already built and available in the share, so that this discrete testing is quite optimized.
| * testutils/__init__.py: Expose the internal ArtifactShare objectTristan van Berkom2020-12-211-1/+1
| | | | | | | | | | This allows our tests to use the ArtifactShare() object in custom fixtures.
| * testing/__init__.py: Expose the Cli() instanceTristan van Berkom2020-12-211-1/+1
| | | | | | | | | | This allows third party developers to use the Cli() object in their own test fixtures.
| * testing/runcli.py: Create the directory in Cli() __init__()Tristan van Berkom2020-12-211-5/+2
| | | | | | | | Instead of requiring every fixture to do it separately.
| * _stream.py: Added missing machine readable error codesTristan van Berkom2020-12-214-12/+11
|/ | | | | | | | | | | | | | | | In errors pertaining to failing to launch a shell with a buildtree. Other related updates: - _frontend/cli.py: Propagate machine readable error codes in `bst shell` This command prefixes a reported error, so it rewraps the error into an AppError, this needs to propagate the originating machine readable error. - tests/integration/shell.py, tests/integration/shellbuildtrees.py: Updated to use new machine readable errors
* Merge branch 'jjardon/bst_master_fix_overnigth' into 'master'bst-marge-bot2020-12-161-2/+0
|\ | | | | | | | | .gitlab-ci.yml: No need special runner for cached overnigth test See merge request BuildStream/buildstream!2107
| * .gitlab-ci.yml: No need special runner for cached overnigth testjjardon/bst_master_fix_overnigthJavier Jardón2020-12-161-2/+0
|/
* Merge branch 'tristan/fix-artifact-name-hack' into 'master'bst-marge-bot2020-12-112-7/+12
|\ | | | | | | | | _stream.py, _frontend/widget.py: Fix weird hack See merge request BuildStream/buildstream!2117
| * _stream.py, _frontend/widget.py: Fix weird hacktristan/fix-artifact-name-hackTristan van Berkom2020-12-112-7/+12
|/ | | | | | | | | When stream is asked for a list of artifacts to show for the purpose of `bst artifact show`, it was squashing the element name with the artifact name before it gets displayed in the frontend. Instead, make the special casing in the frontend.
* Merge branch 'tristan/stack-require-depends-all' into 'master'Tristan Van Berkom2020-12-1019-35/+200
|\ | | | | | | | | | | | | Require all stack dependencies to be both build & runtime dependencies Closes #1075 See merge request BuildStream/buildstream!2113
| * tests/format/stack.py: Test stack dependency typestristan/stack-require-depends-allTristan van Berkom2020-12-105-0/+36
| | | | | | | | | | Assert that errors are raised when stack dependencies are declared as build-only or runtime-only dependencies.
| * NEWS: Document breaking change, stack element dependencies must be build + runTristan van Berkom2020-12-101-0/+3
| |
| * plugins/elements/stack.py: Require all dependencies be build & run.Tristan van Berkom2020-12-1010-33/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stack elements cannot be build-only dependencies, as this would defeat the purpose of using stack elements in order to directly build-depend on them. Stack element dependencies must all be built in order to build depend on them, and as such we gain no build parallelism by allowing runtime-only dependencies on stack elements. Declaring a runtime-only dependency on a stack element as a whole might still be useful, but still requires the entire stack to be built at the time we need that stack. Instead, it is more useful to ensure that a stack element is a logical group of all dependencies, including runtime dependencies, such that we can guarantee cache key alignment with all stack dependencies. This allows for stronger reliability in commands such as `bst artifact checkout`, which can now reliably download and checkout a fully built stack as a result, without any uncertainty about possible runtime-only dependencies which might exist in the project where that artifact was created. This consequently closes #1075 This also fixes the following tests such that the no longer require build-depends or runtime-depends to work in stack elements: * tests/frontend/default_target.py: Was not necessary to check results of show, these stacks were set to runtime-depends so that they would have the same buildable state as their dependencies when shown. * tests/format/dependencies.py: tests/frontend/pull.py, test/frontend/show.py, tests/integration/compose.py: These tests were using specific build/runtime dependencies in stacks, but for no particular reason.
| * doc: Documenting "artifact names".Tristan van Berkom2020-12-102-0/+27
| | | | | | | | | | | | Added a description about artifact names at the beginning of the artifact commands section, along with a new glossary entry for artifact names which refers to the description.
| * doc/source/format_declaring.rst: Minor corrections and added references.Tristan van Berkom2020-12-101-2/+8
|/ | | | | | | | | | * When documenting dependency types, add references to the shorthand convenience lists `build-depends` and `runtime-depends`. * When documenting the `type` attribute of dependencies, correct the language referring to the convenience lists to specify `build-depends` and `runtime-depends` instead of the incorrectly worded `Build-Depends` and `Runtime-Depends`, which would be invalid keys.
* Merge branch 'tristan/refactor-retry-task' into 'master'Tristan Van Berkom2020-12-106-185/+239
|\ | | | | | | | | Refactor State object See merge request BuildStream/buildstream!2115
| * _state.py: Full type hintingtristan/refactor-retry-taskTristan van Berkom2020-12-102-131/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves overall documentation comments on the State object, adds full pep484 type hinting, and renames the Task.set_render_cb() to Task.set_task_changed_callback() to be more consistently named. This also adds missing frontend facing API for the group changed status notifications, even though the frontend does not currently use these, it makes better sense to have them than to remove the entire codepaths and callback lists. This also reorders the classes in this file so that Task and TaskGroup are both defined before State, this helps a bit with undefined references for type hinting information.
| * Refactor: Use explicit invocation for retrying jobs.Tristan van Berkom2020-12-104-58/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We created the State object in the core for the purpose of advertizing state to the frontend, and the frontend can register callbacks and get updates to state changes (implicit invocation in the frontend), state always belongs to the core and the frontend can only read state. When the frontend asks the core to do something, this should always be done with an explicit function call, and preferably not via the State object, as this confuses the use of state, which is only a readonly state advertizing desk. This was broken (implemented backwards) for job retries, instead we had the frontend telling state "It has been requested that this job be retried !", and then we had the core registering callbacks to that frontend request - this direction of implicit invocation should not happen (the core should never have to register callbacks on the State object at all in fact). Summary of changes: * _stream.py: Change _failure_retry(), which was for some reason private albeit called from the frontend, to an explicit function call named "retry_job()". Instead of calling into the State object and causing core-side callbacks to be triggered, later to be handled by the Scheduler, implement the retry directly from the Stream, since this implementation deals only with Queues and State, which already directly belong to the Stream object, there is no reason to trouble the Scheduler with this. * _scheduler.py: Remove the callback handling the State "task retry" event. * _state.py: Remove the task retry callback chain completely. * _frontend/app.py: Call stream.retry_job() instead of stream.failure_retry(), now passing along the task's action name rather than the task's ID. This API now assumes that Stream.retry_job() can only be called on a task which originates from a scheduler Queue, and expects to be given the action name of the queue in which the given element has failed and should be retried..
| * _state.py: Rename _Task -> TaskTristan van Berkom2020-12-102-5/+5
|/ | | | | The Task object is not internal to the State object, it is clearly given to the frontend and passed around.