summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* _artifactcache/artifactcache.py: Rephrase failure messagetristan/element-processing-orderTristan Van Berkom2019-01-161-1/+1
| | | | | | | | | | It was saying "There is not enough space to build the given element.", this makes me think the error is associated to a specific element, but this does not make sense to show up in a cleanup task. Instead say "There is not enough space to complete the build.", which should be more clear that even after cleaning up there is not enough space.
* tests/frontend/order.py: Enable the test for build and fix the fetch testsTristan Van Berkom2019-01-161-18/+19
| | | | | | With the scheduler changes, fetch jobs get automatically skipped so the output is changed, using a separate repo for each element fixes the test such that every fetch job gets a job launched.
* _scheduler: Refactor of queues and resources.Tristan Van Berkom2019-01-167-239/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This branch makes the following changes: * jobs/job.py: No longer stores any interested resource list Jobs are ephemeral again, they only ever exist while they are running. * queues/queue.py: Revert to only handling lists of elements Elements pass through the queues, Queue.harvest_jobs() replaces Queue.pop_ready_jobs() and now the Queue stops creating jobs as soon as there are not enough resources for the job. Also removed unused `prepare()` abstract method. * queues/buildqueue.py: Adapt the part where we launch a job This part needs to be reworked anyway, just touch it up for now so that it doesnt break with the surrounding changes. * jobs/{cachesize,cleanup}job.py: Expose uniform complete callback Allows the scheduler to manage resource deallocation for these two job completions as a custom thing, at the same phase that the Queues take care of their own resource deallocation. * resources.py: No longer has knowledge of the job Since jobs are ephemeral, they are not a suitable place to store the resource identifiers, these must be provided by the callers wherever needed. Now the main Resources object is owned by the Scheduler but shared with Queues, each take care of managing the resources of the jobs they create through the same resource API. * scheduler.py: Reverted to only creating jobs on demand This changes the flow of the scheduler such that whenever jobs complete, the queues are interrogated for as many jobs which can run at the moment but not more; and this completely removes the waiting list. For the internal cache management jobs, we handle this with a little state instead of having a waiting list and only launch when the resources permit it. By abolishing the scheduler waiting list and creating jobs on demand, we fix the order of element processing and consequently fix issue #712.
* Merge branch 'tristan/detoxing-integration-tests' into 'master'Tristan Van Berkom2019-01-164-12/+51
|\ | | | | | | | | Make integration tests parallelizable See merge request BuildStream/buildstream!1077
| * conftest.py: Use different artifact directory for integration testsTristan Van Berkom2019-01-163-11/+50
| | | | | | | | | | | | | | | | To ensure we can run integration tests in parallel, use a tempdir for the artifact cache of each separate integration test run. This makes it possible to run multiple full test runs including integration tests in parallel under detox.
| * source-determinism.py integration test: Dont use integration_cache fixtureTristan Van Berkom2019-01-161-1/+1
|/ | | | This was just deadcode, it's not really used here.
* Merge branch 'chadnan' into 'master'Angelos Evripiotis2019-01-161-1/+1
|\ | | | | | | | | bst-docker-import: fix Chandan's name See merge request BuildStream/buildstream!1076
| * bst-docker-import: fix Chandan's namechadnanAngelos Evripiotis2019-01-161-1/+1
|/
* Merge branch 'raoul/cas-refactor' into 'master'Jürg Billeter2019-01-1615-414/+443
|\ | | | | | | | | Cas refactor See merge request BuildStream/buildstream!1071
| * cas: move remote only functions to CASRemoteRaoul Hidalgo Charman2019-01-164-144/+148
| | | | | | | | | | | | | | | | | | | | | | | | List of methods moved * Initialization check: made it a class method that is run in a subprocess, for when checking in the main buildstream process. * fetch_blobs * send_blobs * verify_digest_on_remote * push_method Part of #802
| * casremote.py: Move remote CAS classes into its own fileRaoul Hidalgo Charman2019-01-164-257/+283
| | | | | | | | Part of #802
| * _cas: Rename artifactcache folder and move that to a root moduleRaoul Hidalgo Charman2019-01-1613-21/+20
|/ | | | | | | | | Other components will start to reply on cas modules, and not the artifact cache modules so it should be organized to reflect this. All relevant imports have been changed. Part #802
* Merge branch 'jennis/doc_fixes_in_context' into 'master'James Ennis2019-01-161-1/+8
|\ | | | | | | | | Small documentation/comment fixes in context.py See merge request BuildStream/buildstream!1072
| * _context.py: Add documentation to get_workspaces() commandJames Ennis2019-01-161-0/+7
| |
| * _context.py: Doc fix: get_toplevel_project() returns object not listJames Ennis2019-01-161-1/+1
|/
* Merge branch 'valentindavid/git-reduced-history' into 'master'Valentin David2019-01-162-12/+207
|\ | | | | | | | | buildstream/_gitsourcebase.py: Reduce git history for git describe. See merge request BuildStream/buildstream!1069
| * buildstream/_gitsourcebase.py: Fix case where HEAD is taggedValentin David2019-01-162-13/+129
| | | | | | | | | | `git rev-list --boundary HEAD..HEAD` does not return any boundary. So in this case we need to manually tag the HEAD as a boundary.
| * buildstream/_gitsourcebase.py: Reduce git history for git describe.Valentin David2019-01-162-1/+80
|/ | | | | | | | | | | | Found during #833. `git rev-list --boundary tag..HEAD` unfortunately gives boundaries that are deeper than should when there is a merge commit between `tag` and `HEAD`. The common ancestory of the two parents of the merge is a boundary instead of the parent of the branch that is not traversed. `--ancestry-path` fixes this issue by restricting `git` traversing those branches.
* Merge branch 'chandan/fix-pytest-get-marker' into 'master'Javier Jardón2019-01-151-1/+1
|\ | | | | | | | | conftest.py: Don't use deprecated get_marker() function See merge request BuildStream/buildstream!1073
| * conftest.py: Don't use deprecated get_marker() functionchandan/fix-pytest-get-markerChandan Singh2019-01-151-1/+1
|/ | | | | | | | | | | | | | | Starting from `pytest` version 4.1.0, `Node.get_marker()` has been removed, and hence our tests break when running with newer versions of `pytest`. It was deprecated since a while back but it has recently been removed completely. Use `get_closest_marker()` as a replacement that is suggested in the changelog, and seems to work fine for our use case. See https://github.com/pytest-dev/pytest/pull/4564 for more context on the upstream issue. One way of verifying this change is that this should fix the recently added `tests-fedora-update-deps` job, that was failing before due to this issue.
* Merge branch 'chandan/python37-tests' into 'master'Javier Jardón2019-01-151-0/+10
|\ | | | | | | | | | | | | .gitlab-ci.yml: Add tests for python 3.7 Closes #838 See merge request BuildStream/buildstream!1074
| * .gitlab-ci.yml: Add tests for python 3.7Chandan Singh2019-01-151-0/+10
|/ | | | | | We already have tests for python 3.5 and 3.6 but not 3.7. Fixes https://gitlab.com/BuildStream/buildstream/issues/838.
* Merge branch 'chandan/reqs-update-test' into 'master'Chandan Singh2019-01-151-1/+16
|\ | | | | | | | | .gitlab-ci.yml: Add job to attempt to update dependencies See merge request BuildStream/buildstream!1038
| * .gitlab-ci.yml: Add job to attempt to update dependenciesChandan Singh2019-01-151-1/+16
|/ | | | | | | This will help us check if BuildStream is working with the latest version of dependencies, as per our constraints. This job is allowed to fail but its failure should signal that we need to add stricter constraints in some of our `.in` requirements files.
* Merge branch 'jjardon/bst_external_0_9' into 'master'Javier Jardón2019-01-151-1/+1
|\ | | | | | | | | | | | | .gitlab-ci.yml: Use latest bst-external Closes #861 See merge request BuildStream/buildstream!1068
| * .gitlab-ci.yml: Use latest bst-externaljjardon/bst_external_0_9Javier Jardón2019-01-141-1/+1
|/ | | | which include flatpak_repo plugin needed to build fdsdk
* Merge branch 'jennis/add_artifacts_completion' into 'master'Tristan Van Berkom2019-01-142-7/+61
|\ | | | | | | | | completions.py: Add a test for our artifact ref autocompletions See merge request BuildStream/buildstream!1054
| * completions.py: Add a test for our artifact ref autocompletionsjennis/add_artifacts_completionJames Ennis2019-01-141-0/+41
| | | | | | | | | | | | | | Since the artifact subcommand group has been created, we have been able to tab complete both element names and artifact refs as arguments to the artifact subcommands (e.g. bst artifact log), this commit adds a test for this.
| * _frontend/cli.py: Also check original args for --config in bash completionJürg Billeter2019-01-141-7/+20
|/ | | | | | | The path of the config file generated by testutils for completion tests is passed as regular argument, not via COMP_WORDS. Use that config file in complete_artifact() to ensure the test uses the right artifact directory.
* Merge branch 'chandan/fix-overnight-aarch' into 'master'Chandan Singh2019-01-141-1/+7
|\ | | | | | | | | | | | | Chandan/fix overnight aarch Closes #859 See merge request BuildStream/buildstream!1065
| * .gitlab-ci.yml: Use newer image for overning aarch testsChandan Singh2019-01-141-1/+7
|/ | | | | | | | | | | | During recent reorganizing of `.gitlab-ci.yml` to work with `tox`, seems like we missed to update the image used by the overnight aarch tests, meaning that they currently fail due to `tox` being missing from them. While these tests will be skipped on MRs usually, here is an example of what the tests look like if they are actually run with this change: https://gitlab.com/BuildStream/buildstream/-/jobs/145449561. Fixes #859.
* Merge branch 'jjardon/freedesktop-sdk_latest' into 'master'Valentin David2019-01-141-1/+1
|\ | | | | | | | | | | | | .gitlab-ci.yml: Use latest freedesktop-sdk 18.08.25 Closes #858 See merge request BuildStream/buildstream!1064
| * .gitlab-ci.yml: Use latest freedesktop-sdk 18.08.25Javier Jardón2019-01-141-1/+1
|/
* Merge branch 'tristan/fix-skipped-elements' into 'master'Tristan Van Berkom2019-01-121-1/+1
|\ | | | | | | | | _scheduler/queues/queue.py: Put elements in the skip list, not jobs See merge request BuildStream/buildstream!1063
| * _scheduler/queues/queue.py: Put elements in the skip list, not jobsTristan Van Berkom2019-01-121-1/+1
|/ | | | | Minor correction, looks like we're not observing this queue otherwise we'd be seeing crashes.
* Merge branch 'aevri/tox_no_cov' into 'master'Angelos Evripiotis2019-01-112-1/+11
|\ | | | | | | | | pytest-cov==2.6.1, contributing: '--last-failed' and '--no-cov' tips See merge request BuildStream/buildstream!1059
| * contributing: '--last-failed' and '--no-cov' tipsAngelos Evripiotis2019-01-111-0/+10
| | | | | | | | | | To help new folks get to grips with pytest, add some tips on other frequently used features.
| * dev-requirements: pytest-cov==2.6.1 for '--no-cov'Angelos Evripiotis2019-01-111-1/+1
|/ | | | | | | | | | | | | | | Bump the version of pytest-cov, so that we pick up the fix for the '--no-cov' option breaking in pytest 4.0: https://github.com/pytest-dev/pytest-cov/pull/230 This was the error you would get prior to this version: _pytest.warning_types.RemovedInPytest4Warning: config.warn has been deprecated, use warnings.warn instead Although it says 'deprecated', it did result in termination with stack trace.
* Merge branch 'tristan/element-processing-order' into 'master'Tristan Van Berkom2019-01-113-1/+128
|\ | | | | | | | | Make build plan element list stable See merge request BuildStream/buildstream!1058
| * tests/frontend/order.py: Adding tests ensuring stable element processing orderTristan Van Berkom2019-01-101-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | For each sample project and expected result order, this test ensures that: * bst show --deps plan: Always shows the expected build order. * bst source fetch: Always executes in the expected build order. * bst build: Always builds in the expected order (disabled). The build part of the test is currently disabled as the scheduler seems to be messing with the order even in a `--builders 1` scenario.
| * testutils/runcli.py: Added Result.get_start_order()Tristan Van Berkom2019-01-101-0/+17
| | | | | | | | | | Added a function to report the list of elements which appeared in a given queue in the order of their first appearance.
| * _pipeline.py: Fix the planner to retain the original order when depth sortingTristan Van Berkom2019-01-101-1/+2
|/ | | | | | | | | | | The algorithm adds elements to a dictionary and then sorts the dictionary by the discovered depths while recursing - using an OrderedDict is enough to ensure a stable order. This fixes `bst show --deps plan ...` reporting different results on each invocation. This fixes an aspect of #824
* Merge branch 'aevri/contrib-typos' into 'master'Angelos Evripiotis2019-01-101-11/+11
|\ | | | | | | | | contributing: fix 'oprtation' and some other typos See merge request BuildStream/buildstream!1055
| * contributing: fix 'oprtation' and some other typosAngelos Evripiotis2019-01-101-11/+11
|/
* Merge branch 'juerg/arch' into 'master'Jürg Billeter2019-01-108-16/+146
|\ | | | | | | | | Accept architecture aliases See merge request BuildStream/buildstream!1034
| * tests/format/optionarch.py: Add tests for architecture aliasesJürg Billeter2019-01-105-0/+81
| |
| * element.py: Accept architecture aliases for sandbox configjuerg/archJürg Billeter2019-01-101-1/+7
| | | | | | | | | | Accept common architecture aliases for the sandbox config for consistency with arch options.
| * _options/optionarch.py: Accept architecture aliasesJürg Billeter2019-01-101-1/+30
| | | | | | | | | | | | | | | | Accept common architecture aliases for arch options instead of only accepting the canonicalized, OS-independent architecture name. This restores compatibility with existing projects and may simplify option handling for projects that only target a single OS (and thus, do not need OS-independent architecture names).
| * _platform/platform.py: Add canonicalize_arch() methodJürg Billeter2019-01-101-14/+28
|/
* Merge branch 'tristan/refine-coverage' into 'master'Tristan Van Berkom2019-01-091-1/+3
|\ | | | | | | | | .coveragerc: Omit some things which are irrelevant to cover. See merge request BuildStream/buildstream!1052