summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests/sourcecache/staging.py: Use dummy_context()juerg/contextJürg Billeter2019-07-161-62/+48
|
* tests/sourcecache/push.py: Use dummy_context()Jürg Billeter2019-07-161-29/+26
|
* tests/sourcecache/fetch.py: Use dummy_context()Jürg Billeter2019-07-161-86/+74
|
* tests/internals/pluginloading.py: Use dummy_context()Jürg Billeter2019-07-161-22/+19
|
* tests/internals/loader.py: Use dummy_context()Jürg Billeter2019-07-161-32/+17
|
* tests/internals/context.py: Use dummy_context()Jürg Billeter2019-07-161-4/+5
|
* tests/format/include_composition.py: Use dummy_context()Jürg Billeter2019-07-161-79/+84
|
* tests/artifactcache/push.py: Use dummy_context()Jürg Billeter2019-07-161-80/+63
|
* tests/artifactcache/pull.py: Use dummy_context()Jürg Billeter2019-07-161-125/+100
|
* tests/artifactcache/config.py: Use dummy_context()Jürg Billeter2019-07-161-10/+10
|
* tests/testutils: Add dummy_context() helperJürg Billeter2019-07-162-0/+47
|
* cli.py: Use Context as context managerJürg Billeter2019-07-161-23/+23
|
* app.py: Use Context as context managerJürg Billeter2019-07-161-126/+129
|
* _context.py: Make Context class a Python context managerJürg Billeter2019-07-161-0/+14
| | | | This will allow reliable cleanup.
* Merge branch 'aevri/nodews' into 'master'bst-marge-bot2019-07-161-53/+53
|\ | | | | | | | | node.pyx: rm trailing whitespace See merge request BuildStream/buildstream!1478
| * node.pyx: rm trailing whitespaceAngelos Evripiotis2019-07-161-53/+53
|/
* Merge branch 'jennis/update_ready_for_runtime' into 'master'bst-marge-bot2019-07-166-197/+221
|\ | | | | | | | | Remove __update_state_recursively() See merge request BuildStream/buildstream!1449
| * element.py: Introduce __cached_successfullyJames Ennis2019-07-161-1/+13
| | | | | | | | | | | | | | | | Currently Element._cached_success() will call two functions to determine whether an Element is already cached. Now, we set __cached_successfully to True once we determine that the Element is cached for the first time. This will then short-circuit upon (very frequent) future calls.
| * element.py: Cache whether we've resolved the initial stateJames Ennis2019-07-162-1/+5
| |
| * element.py: Call __update_strict_cache_key_of_rdeps() only if neededJürg Billeter2019-07-161-8/+8
| | | | | | | | | | It's not required with strict build plans. Skip it to improve performance.
| * element.py: Deduplicate _update_ready_for_runtime_and_cached() callsJürg Billeter2019-07-161-10/+5
| |
| * element.py: Remove update_state_recursively()James Ennis2019-07-162-78/+4
| | | | | | | | | | | | Now that __update_ready_for_runtime() and __update_strict_cache_key_of_rdeps() have been introduced, we no longer need to recursively update the state of elements
| * element.py: Introduce __update_ready_for_runtime()James Ennis2019-07-161-1/+50
| | | | | | | | | | | | | | | | | | | | | | An element becomes ready for runtime once it has a cache key and all of its transitive runtime dependencies have cache keys. This patch introduces the method __update_ready_for_runtime() which is called once the cache key of an Element is calculated. When called, we immediately notify reverse dependencies and, if appropriate, try to calculate their cache keys.
| * element.py: Introduce __update_strict_cache_key_of_rdeps()James Ennis2019-07-163-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once an Element's strict cache key is determined, we should attempt to update the strict cache key of it's reverse dependencies. The state of a reverse dependency will be updated once all of its dependencies have strict cache keys This patch introduces the potential for a RecursionError because _update_state() can now trigger further _update_state calls (on reverse dependencies). Therefore, the maximum recursion limit for our "test_max_recursion_depth" test has been lowered. If this becomes a problem, we can always consider setting a larger recursion limit, for now, this change has been tested with the Debian stack and works as expected.
| * element.py: Remove needless function overheadJames Ennis2019-07-161-34/+13
| | | | | | | | | | | | | | | | This patch inlines the __on_{build,runtime}_dependency_ready_for_runtime_and_cached() functions. Their logic now exists within _update_ready_for_runtime_and_cached, thus the overhead of the extra functions have been removed.
| * element.py: Rename remaining_*_deps_uncached to *_deps_uncachedJames Ennis2019-07-161-11/+11
| | | | | | | | | | | | | | The __remaining_runtime_deps_uncached and __remaining_build_deps_uncached variables are rather verbose and do not really need to specify that they are "remaining", this is implicit. This patch renames these variables
| * element.py: Remove misleading and incorrect commentsJames Ennis2019-07-161-3/+2
| | | | | | | | These comments should have been removed/fixed in 176a3057
| * element.py: Introduce __cache_keys_unstable for workspace handlingJames Ennis2019-07-161-13/+36
| | | | | | | | | | | | | | | | This patch marks the cache keys of workspaced elements as initially unstable. If the cache keys are considered unstable, we don't recursively update reverse dependencies. Only when a workspaced element is confirmed to be cached do we mark the cache keys as stable.
| * _pipeline.py, loader.py: Move Element._preflight() to new_from_meta()James Ennis2019-07-164-50/+45
|/ | | | | | | It's essential to call preflight() when loading/resolving the Elements. This patch moves the preflight call to new_from_meta, so that it is called as soon as the Element is created. This avoids the need for having multiple callsites.
* Merge branch 'tristan/config-max-jobs' into 'master'bst-marge-bot2019-07-1629-70/+155
|\ | | | | | | | | | | | | Add max-jobs configuration and command line option Closes #1033 See merge request BuildStream/buildstream!1473
| * man: Updated man pages for new `--max-jobs` CLI optionTristan Van Berkom2019-07-1622-67/+70
| |
| * tests/frontend/show.py: Test proper resolution of max-jobsTristan Van Berkom2019-07-161-0/+51
| | | | | | | | | | | | | | | | This tests that the resolution of the `max-jobs` automatic variable is properly controlled by the new user configuration and command line option, including the default automatic '0' value. Regression test for #1033
| * _project.py: Use the user specified max-jobsTristan Van Berkom2019-07-161-2/+7
| | | | | | | | | | | | | | Only use automatic max-jobs by default if the user has not requested a specific value for max-jobs. This is a part of #1033
| * _frontend: Added toplevel `--max-jobs` configurationTristan Van Berkom2019-07-163-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While this is currently only relevant for `bst build`, it is a current implementation detail that user configuration which gets overridden by command line options must use toplevel options. This patch allows invocations such as the following to override the max-jobs: bst --max-jobs 16 build target.bst This also updates the completions test to expect the new toplevel option. This is a part of #1033
| * _context.py: Added max-jobs configurationTristan Van Berkom2019-07-162-1/+23
|/ | | | | | | | This loads the configuration of the max-jobs variable from the user configuration, where the default is 0 (meaning use the maximum number of cores with a limit of 8). This is a part of #1033
* Merge branch 'bschubert/new-node-api' into 'master'bst-marge-bot2019-07-15143-2603/+2894
|\ | | | | | | | | Rewrite of the Node API See merge request BuildStream/buildstream!1472
| * NEWS: update for new Node APIBenjamin Schubert2019-07-151-14/+7
| |
| * plugins: Update public documentation to be correct with the new NodesBenjamin Schubert2019-07-153-9/+9
| | | | | | | | | | We need to update every place where we were passing a yaml 'dict' to now pass a 'MappingNode'
| * node: Document buildstream-private API and remove unused parameterBenjamin Schubert2019-07-153-3/+108
| | | | | | | | | | _create_new_file did not use the 'toplevel' parameter, we can therefore remove it.
| * node: document public APIBenjamin Schubert2019-07-152-28/+462
| |
| * node: Make error messages more user-friendlyBenjamin Schubert2019-07-151-4/+12
| | | | | | | | | | Users should not have to know anything about nodes, and should be greeted by commonly defined yaml types.
| * node: Rename 'copy' to 'clone'Benjamin Schubert2019-07-158-30/+30
| | | | | | | | | | | | | | | | A 'clone' operation has an implicit understanding that it is expensive, which is not the case of a 'copy' operation, which is more usually a shallow copy. Therefore renaming to 'clone'
| * node: use 'pop' instead of 'del' for safe_delBenjamin Schubert2019-07-151-4/+1
| | | | | | | | | | This reduces slightly the amount of C code needed and makes the run marginally faster
| * node: Mark module-private functions and classes with '__'Benjamin Schubert2019-07-151-56/+56
| | | | | | | | | | This way, it is easier to know what is BuildStream-private from what is module-private
| * node: Mark `MappingNode._get` as privateBenjamin Schubert2019-07-152-18/+18
| |
| * node: make 'assert_symbol_name' privateBenjamin Schubert2019-07-155-25/+25
| | | | | | | | This is not needed for plugins and should therefore not be public
| * _yaml: Split Node-related parts into 'node.pyx'Benjamin Schubert2019-07-1523-1041/+1118
| | | | | | | | | | This makes the 'Node' API public, and available for use directly for plugins.
| * Reorganize methods in Node classesBenjamin Schubert2019-07-152-196/+260
| |
| * _yaml: Mark 'strip_node_info' as buildstream-privateBenjamin Schubert2019-07-159-18/+18
| |
| * _yaml: Mark new_syntethic_file as BuildStream privateBenjamin Schubert2019-07-152-2/+2
| |