summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Call _initialize_state() in Element._new_from_load_element()juerg/cache-query-job-65Jürg Billeter2020-12-159-51/+13
| | | | | With the cache queries moved to job threads, `_initialize_state()` is fairly lightweight and can be called earlier.
* don't use planner for cache queryJürg Billeter2020-12-151-1/+1
|
* pipe hackJürg Billeter2020-12-151-4/+15
|
* wipJürg Billeter2020-12-151-1/+1
|
* hack for benchmarkJürg Billeter2020-12-151-6/+17
|
* revert debuggingJürg Billeter2020-12-141-2/+1
|
* fixup testJürg Billeter2020-12-141-0/+3
|
* fixupJürg Billeter2020-12-142-1/+2
|
* fixup shellJürg Billeter2020-12-141-0/+2
|
* fix dynamic planJürg Billeter2020-12-142-6/+3
|
* Revert "wip: frontend: orange unknown"Jürg Billeter2020-12-141-1/+1
| | | | This reverts commit 581079963ea13859fc0ad6fe7e9c6b69feb7bfdf.
* wip: frontend: orange unknownJürg Billeter2020-12-141-1/+1
|
* wip cache query queueJürg Billeter2020-12-142-7/+9
|
* wip: tests succeeding but cache query queue not used yetJürg Billeter2020-12-142-2/+10
|
* wipJürg Billeter2020-12-141-6/+8
|
* wipJürg Billeter2020-12-141-0/+59
|
* _stream.py: Add query_cache() methodJürg Billeter2020-12-142-0/+20
| | | | This is preparation for explicit cache query.
* minimal fix for test failuresJürg Billeter2020-12-141-4/+4
|
* wip: 4 test failuresJürg Billeter2020-12-143-117/+68
| | | | | | | | | | | | | | | | FAILED tests/frontend/artifact_show.py::test_artifact_show_element_available_remotely - AssertionError FAILED tests/frontend/buildcheckout.py::test_partial_artifact_checkout_fetch - AssertionError FAILED tests/frontend/buildcheckout.py::test_partial_checkout_fail - AssertionError FAILED tests/integration/shell.py::test_integration_partial_artifact - AssertionError ================== 4 failed, 1542 passed, 16 skipped, 2 xfailed, 248 warnings in 189.84s (0:03:09) =================== issue is that bst shell and bst artifact checkout commands pull only if --pull is specified, however, the artifact remotes are still configured if --pull is not specified and hence Element.__pull_pending will still be set for uncached artifacts. I think proper fix is to make --pull (or rather, --no-pull) a global CLI option and skip configuring remotes if --no-pull is specified. might make sense as separate MR
* _elementsources.py: Make cache query explicitJürg Billeter2020-12-141-5/+16
| | | | | | Cache query can be fairly expensive as it checks the presence of all blobs. Make this more explicit with a `query_cache()` method, instead of implicitly querying the cache on the first call to `cached()`.
* _artifact.py: Make cache query explicitJürg Billeter2020-12-143-22/+25
| | | | | | | Cache query can be fairly expensive as it checks the presence of all artifact blobs. Make this more explicit with a `query_cache()` method, instead of implicitly querying the cache on the first call to `cached()`.
* _pipeline.py: Drop the optimization for cached elements in the plannerJürg Billeter2020-12-141-17/+9
| | | | | | | | | The overhead of planning already cached elements and unneeded build-only dependencies should be fairly small as unneeded jobs can still be skipped. This optimization was also already disabled for non-strict build plans with a remote artifact cache. This change is necessary in preparation for parallelizing cache queries.
* fetchqueue.py: Don't skip elements with a cached failureJürg Billeter2020-12-141-1/+1
| | | | | | The build queue requires the sources to be available for all elements where `_cached_success()` returns `False`. This includes elements with a cached failure.
* tests/internals/pluginloading: Add missing get_ref() to FooSourceJürg Billeter2020-12-141-0/+3
|
* tests/frontend/push.py: Allow pushing of dependenciesJürg Billeter2020-12-141-4/+4
| | | | | | The assertions in `test_push_after_pull` are too strict. Pushing dependencies to the second (empty) artifact server should not cause a test failure.
* 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.
* Merge branch 'juerg/cas' into 'master'bst-marge-bot2020-12-098-206/+142
|\ | | | | | | | | CASCache improvements See merge request BuildStream/buildstream!2112
| * Use CASCache.open()juerg/casJürg Billeter2020-12-095-8/+8
| |
| * cascache.py: Add open() methodJürg Billeter2020-12-091-0/+16
| |
| * cascache.py: Generalize remote_missing_blobs() into missing_blobs()Jürg Billeter2020-12-093-35/+16
| | | | | | | | | | The implementation can be reused to replace `local_missing_blobs()` and simplify `contains_files()`.
| * cascache.py: Optimize _fetch_tree() using add_objects()Jürg Billeter2020-12-091-5/+6
| |
| * cascache.py: Add add_objects() methodJürg Billeter2020-12-091-16/+48
| | | | | | | | | | This allows adding multiple objects in a single batch, avoiding extra gRPC round trips to buildbox-casd.
| * cascache.py: Remove unused parameters from add_object()Jürg Billeter2020-12-093-12/+6
| |
| * cascache.py: Remove _ensure_blob() methodJürg Billeter2020-12-091-24/+2
| | | | | | | | | | It's only used by `_fetch_tree()` and can be replaced by a single additional line.
| * cascache.py: Also fetch file blobs in _fetch_directory()Jürg Billeter2020-12-094-22/+7
| | | | | | | | | | This eliminates code duplication in `ArtifactCache`, `SourceCache` and `ElementSourcesCache`.
| * cascache.py: Reimplement _fetch_directory() with FetchTree()Jürg Billeter2020-12-091-55/+17
| | | | | | | | This simplifies the code, delegating the logic to buildbox-casd.
| * Move _reachable_refs_dir() method from cascache.py to testutilsJürg Billeter2020-12-092-33/+20
|/ | | | It's not used outside testutils.
* Merge branch 'juerg/ci' into 'master'Jürg Billeter2020-12-091-1/+7
|\ | | | | | | | | .gitlab-ci.yml: Disable parallel testing on centos-7.7 and ubuntu-18.04 See merge request BuildStream/buildstream!2114
| * .gitlab-ci.yml: Disable parallel testing on centos-7.7 and ubuntu-18.04juerg/ciJürg Billeter2020-12-091-1/+7
|/ | | | | With Python 3.6 CI frequently fails with `INTERNALERROR` when parallel testing is enabled.