summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* scheduler.py: Invoke the ticker callback at the end of run()juerg/scheduler-tickerJürg Billeter2020-10-261-0/+3
| | | | This allows the frontend to render pending messages.
* Merge branch 'tristan/conditional-subsecond-precision' into 'master'Tristan Van Berkom2020-10-265-0/+97
|\ | | | | | | | | Conditionally skip tests which require subsecond precision mtimes See merge request BuildStream/buildstream!2091
| * tests/frontend/track.py: Conditionally skip a testtristan/conditional-subsecond-precisionTristan van Berkom2020-10-251-0/+6
| | | | | | | | | | | | Skip a test which relies on mtimes differing within a short timespan, this will fail if it happens fast enough (which it should) on systems which do not support subsecond precision mtimes.
| * tests/internals/utils_move_atomic.py: Conditionally skip a testTristan van Berkom2020-10-251-0/+7
| | | | | | | | | | Skip the mtime related test if the underlying filesystem does not support subsecond precision mtime.
| * tests/artifactcache/expiry.py: Conditionally skip some testsTristan van Berkom2020-10-251-0/+45
| | | | | | | | | | Skip some of the artifact expiry tests in the case we don't have subsecond mtime precision.
| * tests/internals/storage_vdir_import.py: Conditionally skipTristan van Berkom2020-10-251-0/+7
| | | | | | | | Conditionally skip tests which require subsecond mtime precision.
| * src/buildstream/testing/_utils/site.py: Adding have_subsecond_mtime()Tristan van Berkom2020-10-251-0/+32
|/ | | | | | | A utility for tests to check if subsecond precision mtime is supported at a given filesystem path (it will depend on underlying filesystem, so we cannot have a simple HAVE_SUBSECOND_MTIME variable to check, because we don't know where tests will operate at this stage).
* Merge branch 'tristan/remove-unused-import' into 'master'bst-marge-bot2020-10-061-1/+0
|\ | | | | | | | | element.py: Remove unused import of OrderedDict() See merge request BuildStream/buildstream!2081
| * element.py: Remove unused import of OrderedDict()tristan/remove-unused-importTristan van Berkom2020-10-061-1/+0
|/
* Merge branch 'tristan/fix-overriding-links' into 'master'bst-marge-bot2020-10-0611-5/+262
|\ | | | | | | | | | | | | Fix junction overrides to resolve links Closes #1398 See merge request BuildStream/buildstream!2078
| * tests/format/junctions.py: Test multiple layers of link indirection in overridesTristan van Berkom2020-10-065-0/+26
| |
| * tests/format/junctions.py: Test that links work for override keys in nested ↵Tristan van Berkom2020-10-063-0/+18
| | | | | | | | projects
| * tests/format/junctions.py: Test that we can use a link to address which ↵Tristan van Berkom2020-10-064-1/+28
| | | | | | | | subproject to override
| * _loader/loader.py: Track link elements and resolve overridesTristan van Berkom2020-10-061-4/+190
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an override is specified, it might be specified using a link element and that link element might not be otherwise used thus far to load anything. This patch makes the following changes to the loader: * Add Loader._resolve_link() A new function which updates a projects internal cache of link elements and targets. The link cache is updated any time a link element is resolved, also parent project link caches are updated to have knowledge of the subproject links. * Add Loader._expand_link() A function to expand links in user provided paths, so that we can transform these to "real paths", i.e. project relative paths wich any link elements substituted. * Use Loader._expand_link() when matching a user specified override from a junction to a real path. * Add Loader._shallow_load_overrides() This function simply ensures we perform a shallow load on any elements specified as keys in the junction override dictionary, in case they are links. Shallow loading these elements does not cause them to inadvertently load unrequired subprojects, nor can it cause any new elements to be included in the build graph returned to the caller of the Loader code (as the Loader code only returns dependencies of the specified toplevels, even if other orthogonal elements happen to get loaded as a side effect). This is necessary to ensure we populate the link caches when a link is used to specify an override, but is otherwise unused. This fixes #1398
* Merge branch 'bschubert/stricter-job-scheduler-separation' into 'master'bst-marge-bot2020-10-051-2/+24
|\ | | | | | | | | Ensure we are not calling methods with side effects on the element graph in jobs See merge request BuildStream/buildstream!2079
| * element.py: Ensure element methods with side effects on others are not ↵bschubert/stricter-job-scheduler-separationBenjamin Schubert2020-10-051-0/+20
| | | | | | | | | | | | | | called in jobs This adds some assertions in the code to ensure we are not calling methods with side effects on the graph of elements in jobs.
| * element.py: Stop computing cache keys when caching, we should have themBenjamin Schubert2020-10-011-2/+4
|/ | | | | | | | | | This removes a call to `__update_cache_key_non_strict()` in the job for non strict builds. This call has an impact on other elements and should never be done beforehand. This however means we need to compute cache keys before, and we therefore need to re-compute the cache keys as an element become buildable
* Merge branch 'tristan/lazy-provenance' into 'master'Tristan Van Berkom2020-10-0120-167/+140
|\ | | | | | | | | Refactor: Lazily instantiate ProvenanceInformation objects See merge request BuildStream/buildstream!2026
| * Refactor: Lazily instantiate ProvenanceInformation objectstristan/lazy-provenanceTristan van Berkom2020-10-0120-167/+140
|/ | | | | | | | | | | | | As a rule, throughout the codebase we should not be using internal ProvenanceInformation objects in our APIs, but rather Node objects. This is because ProvenanceInformation is generated on the fly from a Node object, and it is needlessly expensive to instantiate one before it is absolutely needed. This patch unilaterally fixes the codebase to pass `provenance_node` Node objects around as arguments rather than `provenance` ProvenanceInformation objects.
* Merge branch 'juerg/push' into 'master'bst-marge-bot2020-09-305-66/+31
|\ | | | | | | | | Pull missing artifacts in `bst artifact push` See merge request BuildStream/buildstream!2077
| * _stream.py: Pull missing artifacts in push()juerg/pushJürg Billeter2020-09-294-58/+10
| | | | | | | | | | | | | | | | | | | | | | As per #819, BuildStream should pull missing artifacts by default. The previous behavior was to only pull missing buildtrees. A top-level `--no-pull` option can easily be supported in the future. This change makes it possible to use a single scheduler session (with concurrent pull and push jobs). This commit also simplifies the code as it removes the `sched_error_action` emulation, using the regular frontend code path instead.
| * element.py: Add skip_uncached parameter to _skip_push()Jürg Billeter2020-09-292-8/+15
| | | | | | | | | | | | This allows proper error handling when pushing an uncached element should result in a failure (bst artifact push), not a skipped job (bst build).
| * element.py: Handle uncached state in _push()Jürg Billeter2020-09-291-1/+7
|/ | | | | | This allows proper error handling when pushing an uncached element should result in a failure (bst artifact push), not a skipped job (bst build).
* Merge branch 'juerg/artifact-pull' into 'master'bst-marge-bot2020-09-283-60/+43
|\ | | | | | | | | Artifact pull code improvements See merge request BuildStream/buildstream!2074
| * element.py: Use Artifact.pull() methodJürg Billeter2020-09-281-58/+11
| | | | | | | | | | | | | | This replaces `__pull_strong()` and `__pull_weak()` with calls to `Artifact.pull()`. Besides simplifying code in `element.py`, this removes the call to `_pull_done()` from the job process, which would cause issues with the upcoming thread-based scheduler.
| * _artifact.py: Add pull() methodJürg Billeter2020-09-281-0/+26
| |
| * _artifact.py: Assert that proto is available after `set_cached()`Jürg Billeter2020-09-281-0/+1
| |
| * _artifactcache.py: link_key(): Update reference if it exists alreadyJürg Billeter2020-09-281-2/+5
|/ | | | | We want the weak reference to point to the most recent artifact with the same weak cache key, not the oldest.
* Merge branch 'tristan/dependency-multi-filename' into 'master'bst-marge-bot2020-09-2813-39/+230
|\ | | | | | | | | Allow specifying multiple filenames in a dependency See merge request BuildStream/buildstream!2075
| * doc: Documenting ability to specify multiple filenames in a dependency.Tristan van Berkom2020-09-281-1/+17
| |
| * tests/format/dependencies.py: Test bad filename configurationTristan van Berkom2020-09-282-0/+24
| | | | | | | | Test a dictionary instead of a string when given to the filename list.
| * tests/format/dependencies.py: Testing shorthand dependency configurationsTristan van Berkom2020-09-289-0/+51
| |
| * tests/format/dependencies3/elements/supported2.bst: Adding commentTristan van Berkom2020-09-281-0/+6
| | | | | | | | Adding some clarifications about an existing test
| * _loader/loadelement.pyx: Support multiple filenames in a dependencyTristan van Berkom2020-09-281-38/+132
|/ | | | | | | | | | | | | | | This allows declaring multiple dependencies with common properties in a mode convenient way, e.g.: depends: - type: build junction: subproject.bst filename: - foo.bst - bar.bst - baz.bst This was requested during this email thread: https://lists.apache.org/thread.html/r9d716f2734cae5a81731f9a46d73f944a7287ff168f6987e25597c6a%40%3Cdev.buildstream.apache.org%3E
* Merge branch 'tristan/fix-logging-regression' into 'master'Tristan Van Berkom2020-09-272-4/+6
|\ | | | | | | | | Fix logging regression See merge request BuildStream/buildstream!2076
| * BuildElement: Fix logging regressiontristan/fix-logging-regressionTristan van Berkom2020-09-261-2/+3
| | | | | | | | | | Staging activities are usually silent nested, this regressed when porting to recently changed APIs.
| * ScriptElement: Fix logging regressionTristan van Berkom2020-09-261-2/+3
|/ | | | | Staging activities are usually silent nested, this regressed when porting to recently changed APIs.
* Merge branch 'juerg/filter-pass-integration' into 'master'bst-marge-bot2020-09-242-6/+49
|\ | | | | | | | | filter.py: Combine integration commands in assemble() See merge request BuildStream/buildstream!2073
| * tests/integration/filter.py: Add test_filter_pass_integration_uncachedJürg Billeter2020-09-241-0/+32
| | | | | | | | | | This tests that built filter artifacts don't depend on build dependencies for integration.
| * filter.py: Combine integration commands in assemble()Jürg Billeter2020-09-241-6/+17
|/ | | | | | | | | Plugins must not access public data of build dependencies in `integrate()` as the build dependencies are not guaranteed to be cached at that stage. This combines integration commands of the sole build dependency and the filter element itself at time of assembly instead of integration.
* Merge branch 'tristan/remove-bst-key-requires-stage' into 'master'bst-marge-bot2020-09-247-90/+224
|\ | | | | | | | | source.py: Remove BST_KEY_REQUIRES_STAGE See merge request BuildStream/buildstream!2072
| * tests/frontend/track.py: Test behavior of SKIP messagesTristan van Berkom2020-09-241-0/+79
| | | | | | | | | | | | | | | | This test checks that: * We get SKIP messages for tracking local sources * We get SKIP messages for tracking workspaced elements * We go no messages at all for elemenents which have no sources
| * _elementsources.py: Raise SkipJob() when tracking is unimplemented by all ↵Tristan van Berkom2020-09-241-0/+7
| | | | | | | | | | | | | | | | sources This ensures we get a SKIP message instead of a SUCCESS message when tracking an element where all of it's sources did not implement track(), which is the case for sources like `local`, `workspace` or `patch`.
| * source.py: Remove BST_KEY_REQUIRES_STAGETristan van Berkom2020-09-244-90/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored this to remove unneeded complexity in the code base, as described here: https://lists.apache.org/thread.html/r4b9517742433f07c79379ba5b67932cfe997c1e64965a9f1a2b613fc%40%3Cdev.buildstream.apache.org%3E Changes: * source.py: Added private Source._cache_directory() context manager We also move the assertion about nodes which are safe to write to a bit lower in Source._set_ref(), as this was unnecessarily early. When tracking a workspace, the ref will be none and will turn out to be none afterwards, it is not a problem that a workspace's node is a synthetic one, as tracking will never affect it. * local plugin: Implement get_unique_key() and stage() using the new context manager in order to optimize staging and cache key calculations here. * workspace plugin: Implement get_unique_key() and stage() using the new context manager in order to optimize staging and cache key calculations here. * trackqueue.py: No special casing with Source._is_trackable()
| * __init__.py: Added missing import of Directory, this is public APITristan van Berkom2020-09-231-0/+1
|/ | | | | We don't allow importing symbols from sub-packages of BuildStream, so any public API must find it's way to the toplevel __init__.py.
* Merge branch 'tristan/fix-overnight-tests' into 'master'bst-marge-bot2020-09-234-14/+11
|\ | | | | | | | | .gitlab-ci.yml: Use ported plugins and fdsdk for overnight tests See merge request BuildStream/buildstream!2068
| * .gitlab-ci.yml: Use ported plugins and fdsdk for overnight testsTristan van Berkom2020-09-231-1/+1
| |
| * Sandbox: Remove Sandbox.set_output_directory()Tristan van Berkom2020-09-211-10/+0
| | | | | | | | | | This was a dead codepath, not used by any sandbox implementation for any reason, and used to be called inconsistently by some elements.
| * ArtifactElement: Don't call Sandbox.set_output_directory()Tristan van Berkom2020-09-211-3/+0
| | | | | | | | That API is useless fluff and does not have any affect on anything.
| * Sandbox: Assert absolute paths where they are setTristan van Berkom2020-09-211-0/+4
| |