-
891fcb0e
by Tristan Van Berkom
at 2019-01-07T16:47:01Z
Fix stack traces discovered with ^C forceful termination.
* utils.py:_kill_process_tree(): Ignore NoSuchProcess errors
These are caused because we issue SIGTERM, and if the process
has not exited after a timeout, we kill it.
* _scheduler/jobs/job.py: Stop handling NoSuchProcess errors here
redundantly, they are already ignored.
It seems that we were ignoring it after sleeping when terminating
tasks from the scheduler... but we were not ignoring it when performing
the same pattern in the `Plugin.call()` -> `utils._call()` path, so
we were still getting these exceptions at termination time from host
tool processes launched by source plugins.
-
5de42d43
by Tristan Van Berkom
at 2019-01-07T18:00:37Z
Merge branch 'tristan/keyboard-interrupt-stack-trace' into 'master'
Fix stack traces discovered with ^C forceful termination.
See merge request BuildStream/buildstream!1043
-
059035b9
by Tristan Van Berkom
at 2019-01-07T18:02:00Z
_scheduler/scheduler.py: Make _schedule_jobs() private
This is not used anywhere outside of the Scheduler, currently
only the Scheduler itself is allowed to queue a job at this level.
If the highlevel business logic for automatic queueing of auxiliary
jobs moves to another location, we can make this public again.
-
b83d1b1f
by Tristan Van Berkom
at 2019-01-07T18:02:00Z
_scheduler/scheduler.py: Only run one cache size job at a time
When queuing the special cache management related cleanup and
cache size jobs, we now treat these jobs as special and do the
following:
* Avoid queueing a cleanup/cache_size job if one is already queued
We just drop redundantly queued jobs here.
* Ensure that jobs of this type only run one at a time
This could have been done with the Resources mechanics,
however as these special jobs have the same properties and
are basically owned by the Scheduler, it seemed more straight
forward to handle the behaviors of these special jobs together.
This fixes issue #753
-
16a8816f
by Tristan Van Berkom
at 2019-01-07T18:02:00Z
Scheduler: Introduced JobStatus instead of simple success boolean
This changes the deepest callback from when a Job completes to
propagate a JobStatus value instead of a simple boolean, and updates
all of the effected code paths which used to receive a boolean
to now handle the JobStatus values.
This further improves the situation for issue #753, as now we avoid
queueing cache size jobs for pull jobs which are skipped.
-
c2fc2a5e
by Tristan Van Berkom
at 2019-01-07T18:02:00Z
_scheduler/jobs/job.py: Removed 'skipped' property
This is redundant now that we report it through the JobStatus.
-
3e3984ad
by Tristan Van Berkom
at 2019-01-07T18:50:23Z
Merge branch 'tristan/one-cache-size-job' into 'master'
Only queue one cache size job
Closes #753
See merge request BuildStream/buildstream!1040
-
512c726e
by Tristan Van Berkom
at 2019-01-08T03:38:11Z
sandbox/sandbox.py: Fix regression of command logging
Since we added batch commands, the batch commands print the
text of the commands directly in the message text, but this is wrong.
The detail string is the appropriate place for text of unknown lengths
(the user can actually configure how many max lines of commands they
want to see in their log), the message text itself should be controlled
and brief enough to avoid text wrapping.
-
01171988
by Tristan Van Berkom
at 2019-01-08T04:20:14Z
Merge branch 'tristan/fix-command-status-messages' into 'master'
sandbox/sandbox.py: Fix regression of command logging
See merge request BuildStream/buildstream!1044
-
6c1d06d6
by Phil Dawson
at 2019-01-08T10:24:32Z
element.py: remove reference to source bundle command
This command has been replacved by the bst source checkout command
-
914ecb72
by Jürg Billeter
at 2019-01-08T10:54:02Z
Merge branch 'phil/remove-source-bundle-reference' into 'master'
element.py: remove documentation reference to source bundle command
See merge request BuildStream/buildstream!1041
-
81f7a964
by Tristan Van Berkom
at 2019-01-08T16:55:58Z
sandbox/sandbox.py: Use assertions for programming errors instead of BstErrors.
When code is faulty, in a plugin or in the core, we should
get a stack trace and a BUG message.
-
edcc43ed
by Tristan Van Berkom
at 2019-01-08T19:19:10Z
Merge branch 'tristan/sandbox-programming-error' into 'master'
sandbox/sandbox.py: Use assertions for programming errors instead of BstErrors.
See merge request BuildStream/buildstream!1046
-
17c5ca2d
by Valentin David
at 2019-01-09T10:45:23Z
Use relative path to project directory for remote execution certificates/keys
-
605f8d11
by Valentin David
at 2019-01-09T10:45:23Z
Add support for user remote execution configuration
Fixes #631.
-
65ea03ab
by Valentin David
at 2019-01-09T10:45:23Z
Add support for https channel to remote execution and actions servers
Fixes #780.
-
ba05c4fa
by Valentin David
at 2019-01-09T12:58:59Z
Merge branch 'valentindavid/remote_execution_configuration' into 'master'
Remote execution configuration: HTTPS and user configuration
Closes #780 and #631
See merge request BuildStream/buildstream!1030
-
eb0dbcfc
by Valentin David
at 2019-01-09T13:56:58Z
buildstream/plugins/elements/script.py: Mark script as BST_VIRTUAL_DIRECTORY
ScriptElement does not use Sandbox.get_directory. It works using it
with remote execution.
Fixes #850
-
f7681925
by Valentin David
at 2019-01-09T14:44:22Z
Merge branch 'valentindavid/script_virtual_directory' into 'master'
buildstream/plugins/elements/script.py: Mark script as BST_VIRTUAL_DIRECTORY
Closes #850
See merge request BuildStream/buildstream!1047
-
f87d1c93
by Jim MacArthur
at 2019-01-09T15:01:18Z
sandboxremote.py: Rename 'instance_name' option to 'instance-name'
It was 'instance-name' in the documentation.
-
ed8bc5bc
by Jim MacArthur
at 2019-01-09T15:30:28Z
Merge branch 'jmac/rename_instance_name' into 'master'
Rename 'instance_name' option to 'instance-name'
See merge request BuildStream/buildstream!1048
-
f29a0995
by Tristan Van Berkom
at 2019-01-09T19:51:14Z
Support running test environments in parallel with `detox`
This patch namespaces the test temp directory and the output
coverage report file with the name of the environment under test,
such that separately run tests do not access the same files.
When running tests without tox, directly through setup.py,
then the tmp directory will still be `./tmp`.
* .gitignore: Added new .coverage-reports/ directory
* .gitlab-ci.yml: Rely on tox to combine and report coverage, only
tell tox about the COVERAGE_PREFIX so that results can be namespaced
by CI job name.
This change also publishes the sources and final combined `.coverage`
file in an output gitlab artifact for inspection, and lists some missing
dependencies to the `coverage` job.
* tox.ini: Add comments and refactor main [testenv] section so that
other environments dont inherit too much unrelated cruft.
Generate the coverate reports in the respective {envtmpdir} so that
all per-process coverage files are prefixed with a full path, ensuring
that concurrent runs don't mix reports and addressing concerns
raised in #844.
Also implemented new `tox -e coverage` environment to combine
any found coverage and print a report.
* .coveragerc: Omit .tox/ directory from coverage stats
Fixes issue #844
-
d364ad02
by Tristan Van Berkom
at 2019-01-09T19:52:22Z
CONTRIBUTING.rst: Updated to mention new `coverage` tox environment.
Also point out that it is possible to run test environments in
parallel using the `detox` tool.
-
1e352434
by Tristan Van Berkom
at 2019-01-09T20:36:06Z
Merge branch 'tristan/detox-tests' into 'master'
Allow using detox, and fix/refactor collection of coverage reports
Closes #844
See merge request BuildStream/buildstream!1051
-
116c1070
by Tristan Van Berkom
at 2019-01-09T20:39:15Z
.coveragerc: Omit some things which are irrelevant to cover.
* Omit versioneer's _version.py
* Omit our __main__.py which is used only internally for generating
documentation
-
c8f3616d
by Tristan Van Berkom
at 2019-01-09T21:12:29Z
Merge branch 'tristan/refine-coverage' into 'master'
.coveragerc: Omit some things which are irrelevant to cover.
See merge request BuildStream/buildstream!1052
-
c87bb592
by Jürg Billeter
at 2019-01-10T09:43:37Z
_platform/platform.py: Add canonicalize_arch() method
-
26e33346
by Jürg Billeter
at 2019-01-10T12:50:15Z
_options/optionarch.py: Accept architecture aliases
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).
-
06deb4c4
by Jürg Billeter
at 2019-01-10T12:50:15Z
element.py: Accept architecture aliases for sandbox config
Accept common architecture aliases for the sandbox config for
consistency with arch options.
-
0c2a66b3
by Jürg Billeter
at 2019-01-10T13:06:02Z
tests/format/optionarch.py: Add tests for architecture aliases
-
f86bc760
by Jürg Billeter
at 2019-01-10T13:34:56Z
Merge branch 'juerg/arch' into 'master'
Accept architecture aliases
See merge request BuildStream/buildstream!1034
-
347eb34e
by Angelos Evripiotis
at 2019-01-10T14:38:23Z
contributing: fix 'oprtation' and some other typos
-
6bc27bc1
by Angelos Evripiotis
at 2019-01-10T15:07:46Z
Merge branch 'aevri/contrib-typos' into 'master'
contributing: fix 'oprtation' and some other typos
See merge request BuildStream/buildstream!1055
-
0b83d024
by Tristan Van Berkom
at 2019-01-10T20:02:50Z
_pipeline.py: Fix the planner to retain the original order when depth sorting
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
-
630e26f1
by Tristan Van Berkom
at 2019-01-10T20:03:52Z
testutils/runcli.py: Added Result.get_start_order()
Added a function to report the list of elements which appeared in
a given queue in the order of their first appearance.
-
d1d7de57
by Tristan Van Berkom
at 2019-01-11T04:13:16Z
tests/frontend/order.py: Adding tests ensuring stable element processing order
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.
-
276b8d48
by Tristan Van Berkom
at 2019-01-11T04:42:24Z
Merge branch 'tristan/element-processing-order' into 'master'
Make build plan element list stable
See merge request BuildStream/buildstream!1058
-
fc3dcec8
by Angelos Evripiotis
at 2019-01-11T16:45:00Z
dev-requirements: pytest-cov==2.6.1 for '--no-cov'
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.
-
f86b7ff3
by Angelos Evripiotis
at 2019-01-11T16:45:00Z
contributing: '--last-failed' and '--no-cov' tips
To help new folks get to grips with pytest, add some tips on other
frequently used features.
-
d983f231
by Angelos Evripiotis
at 2019-01-11T17:19:06Z
Merge branch 'aevri/tox_no_cov' into 'master'
pytest-cov==2.6.1, contributing: '--last-failed' and '--no-cov' tips
See merge request BuildStream/buildstream!1059
-
829a2b93
by Tristan Van Berkom
at 2019-01-12T21:32:13Z
_scheduler/queues/queue.py: Put elements in the skip list, not jobs
Minor correction, looks like we're not observing this queue
otherwise we'd be seeing crashes.
-
993e30ae
by Tristan Van Berkom
at 2019-01-12T22:02:55Z
Merge branch 'tristan/fix-skipped-elements' into 'master'
_scheduler/queues/queue.py: Put elements in the skip list, not jobs
See merge request BuildStream/buildstream!1063
-
32732e01
by Javier Jardón
at 2019-01-14T09:04:01Z
.gitlab-ci.yml: Use latest freedesktop-sdk 18.08.25
-
4f5f1184
by Valentin David
at 2019-01-14T09:40:56Z
Merge branch 'jjardon/freedesktop-sdk_latest' into 'master'
.gitlab-ci.yml: Use latest freedesktop-sdk 18.08.25
Closes #858
See merge request BuildStream/buildstream!1064
-
bb80a2b8
by Chandan Singh
at 2019-01-14T14:30:15Z
.gitlab-ci.yml: Use newer image for overning aarch tests
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.
-
10b3ee62
by Chandan Singh
at 2019-01-14T14:57:08Z
Merge branch 'chandan/fix-overnight-aarch' into 'master'
Chandan/fix overnight aarch
Closes #859
See merge request BuildStream/buildstream!1065
-
542cdaf0
by Jürg Billeter
at 2019-01-14T18:46:57Z
_frontend/cli.py: Also check original args for --config in bash completion
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.
-
ff666e76
by James Ennis
at 2019-01-14T18:46:57Z
completions.py: Add a test for our artifact ref autocompletions
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.
-
273b0f55
by Tristan Van Berkom
at 2019-01-14T20:24:57Z
Merge branch 'jennis/add_artifacts_completion' into 'master'
completions.py: Add a test for our artifact ref autocompletions
See merge request BuildStream/buildstream!1054
-
2e3c2ea2
by Javier Jardón
at 2019-01-14T22:26:04Z
.gitlab-ci.yml: Use latest bst-external
which include flatpak_repo plugin needed to build fdsdk
-
d60d2e31
by Javier Jardón
at 2019-01-15T00:39:22Z
Merge branch 'jjardon/bst_external_0_9' into 'master'
.gitlab-ci.yml: Use latest bst-external
Closes #861
See merge request BuildStream/buildstream!1068
-
605836c1
by Chandan Singh
at 2019-01-15T00:57:05Z
.gitlab-ci.yml: Add job to attempt to update dependencies
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.
-
006370af
by Chandan Singh
at 2019-01-15T01:21:33Z
Merge branch 'chandan/reqs-update-test' into 'master'
.gitlab-ci.yml: Add job to attempt to update dependencies
See merge request BuildStream/buildstream!1038
-
4b544555
by Chandan Singh
at 2019-01-15T21:28:40Z
.gitlab-ci.yml: Add tests for python 3.7
We already have tests for python 3.5 and 3.6 but not 3.7.
Fixes https://gitlab.com/BuildStream/buildstream/issues/838.
-
80fe0d9a
by Javier Jardón
at 2019-01-15T22:48:22Z
Merge branch 'chandan/python37-tests' into 'master'
.gitlab-ci.yml: Add tests for python 3.7
Closes #838
See merge request BuildStream/buildstream!1074
-
c91784ab
by Chandan Singh
at 2019-01-15T22:49:01Z
conftest.py: Don't use deprecated get_marker() function
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.
-
ecae4d73
by Javier Jardón
at 2019-01-15T23:23:41Z
Merge branch 'chandan/fix-pytest-get-marker' into 'master'
conftest.py: Don't use deprecated get_marker() function
See merge request BuildStream/buildstream!1073
-
0eac4008
by Valentin David
at 2019-01-16T10:04:57Z
buildstream/_gitsourcebase.py: Reduce git history for git describe.
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.
-
a405e08f
by Valentin David
at 2019-01-16T10:04:57Z
buildstream/_gitsourcebase.py: Fix case where HEAD is tagged
`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.
-
c0631d48
by Valentin David
at 2019-01-16T10:33:52Z
Merge branch 'valentindavid/git-reduced-history' into 'master'
buildstream/_gitsourcebase.py: Reduce git history for git describe.
See merge request BuildStream/buildstream!1069
-
b608ac86
by James Ennis
at 2019-01-16T11:05:44Z
_context.py: Doc fix: get_toplevel_project() returns object not list
-
97a3beb6
by James Ennis
at 2019-01-16T11:05:44Z
_context.py: Add documentation to get_workspaces() command
-
d6587aa0
by James Ennis
at 2019-01-16T11:33:21Z
Merge branch 'jennis/doc_fixes_in_context' into 'master'
Small documentation/comment fixes in context.py
See merge request BuildStream/buildstream!1072
-
2683f98a
by Raoul Hidalgo Charman
at 2019-01-16T11:55:07Z
_cas: Rename artifactcache folder and move that to a root module
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
-
d2cc4798
by Raoul Hidalgo Charman
at 2019-01-16T11:55:07Z
casremote.py: Move remote CAS classes into its own file
Part of #802
-
76f67483
by Raoul Hidalgo Charman
at 2019-01-16T11:55:07Z
cas: move remote only functions to CASRemote
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
-
6c428bc9
by Jürg Billeter
at 2019-01-16T12:56:38Z
Merge branch 'raoul/cas-refactor' into 'master'
Cas refactor
See merge request BuildStream/buildstream!1071
-
2648b0bd
by Angelos Evripiotis
at 2019-01-16T14:44:25Z
bst-docker-import: fix Chandan's name
-
780d0f3a
by Angelos Evripiotis
at 2019-01-16T15:13:06Z
Merge branch 'chadnan' into 'master'
bst-docker-import: fix Chandan's name
See merge request BuildStream/buildstream!1076
-
4ca37dcd
by Tristan Van Berkom
at 2019-01-16T15:47:21Z
source-determinism.py integration test: Dont use integration_cache fixture
This was just deadcode, it's not really used here.
-
6286d820
by Tristan Van Berkom
at 2019-01-16T15:47:21Z
conftest.py: Use different artifact directory for integration tests
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.
-
471af316
by Tristan Van Berkom
at 2019-01-16T16:32:52Z
Merge branch 'tristan/detoxing-integration-tests' into 'master'
Make integration tests parallelizable
See merge request BuildStream/buildstream!1077
-
081e8426
by James Ennis
at 2019-01-16T17:58:41Z
setup.py: Import server main from _cas/casserver.py
Since the CAS refactor, we have not been able to execute
bst-artifact-server. This commit ensures that we can.
This fix closes #867
-
e385660c
by James Ennis
at 2019-01-16T18:33:20Z
Merge branch 'jennis/fix_bst_artifact_server' into 'master'
Ensure that we can execute `bst-artifact-server`
Closes #867
See merge request BuildStream/buildstream!1079
-
6991d6d6
by Tristan Van Berkom
at 2019-01-16T19:28:14Z
_scheduler: Refactor of queues and resources.
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.
-
04ba59bc
by Tristan Van Berkom
at 2019-01-16T19:28:14Z
tests/frontend/order.py: Enable the test for build and fix the fetch tests
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.
-
32bdded8
by Tristan Van Berkom
at 2019-01-16T19:28:14Z
_artifactcache/artifactcache.py: Rephrase failure message
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.
-
17f6e5a8
by Tristan Van Berkom
at 2019-01-16T20:10:30Z
Merge branch 'tristan/element-processing-order' into 'master'
Scheduler refactor, fix processing order
Closes #712
See merge request BuildStream/buildstream!1067
-
19adc9e5
by Tristan Van Berkom
at 2019-01-16T20:48:10Z
element.py: Cleanup temporary staging directories on termination
Use utils._tempdir() which in turn uses _signals.terminator() for
this purpose.
This also changes utils._tempdir() to use utils._force_rmtree()
so that it is safe to use for cleaning up the staging directory.
This patch fixes orphaned temporary directories being left behind
in the artifact cache directory at forceful termination time.
-
5e9598c5
by Tristan Van Berkom
at 2019-01-16T21:17:26Z
Merge branch 'tristan/cleanup-staging-tempdir' into 'master'
element.py: Cleanup temporary staging directories on termination
See merge request BuildStream/buildstream!1080
-
5ea2f59d
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate completions test to tests/frontend
-
1eafc25c
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate `--except` testing to tests/frontend/show.py
The tests/pipeline directory will be removed, and this test
is the better of the two but also redundant with the one in
tests/frontend/show.
Renamed existing test in show.py to `test_show_except_simple`
and added the better test as `test_show_except` below it.
-
b6183123
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate virtual directory storage test to internals directory
Grouping bits of internal testing together here
-
9b6cc972
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate storage test to the internals directory
-
7e2300ce
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate yaml test to the internals directory
-
353a682f
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate utils tests into internals directory
-
3324490e
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate context test into the internals directory
-
99ea157a
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate plugin factory test to internals directory
-
e825bdd3
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate plugin loading test to internals directory
-
c7f69bcc
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Removing tests/plugins/third_party.py
This tests exactly the same thing that is tested in
tests/internals/pluginfactory.py (the new location
of tests/plugins/basics.py).
-
42150422
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Rename `plugins` directory to `elements` directory
Now that the remaining test "filter.py" in the plugins directory
tests a specific element, it makes sense to create a place for
testing elements, just like we do for sources.
-
f712aaa5
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate internal Loader basic test to internals directory
-
8d676a84
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate dependencies test to tests/format
This used to be an internal test, converted this to use the `cli` fixture.
-
bbde1c21
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate dependency order/iteration testing to the format tests
Created new `tests/format/iteration.py` which tests the order in
which elements are iterated over in various scopes in a loaded
data model.
-
8f2b4e9a
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate test for load_ref() unsupporting plugins into format/project.py
The tests/format/project.py test already has some tests about how
we error gracefully for bad plugins and bad plugin configurations,
lets put it there rather than tests/pipeline/load.py which we
will remove.
-
de881c2a
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate preflight error handling check to tests/format/project.py
This is where other load time related plugin error handling is
checked, and is the last thing to remove in the `tests/pipeline`
directory.
-
a7fbd900
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Renaming some tests in tests/format/project.py
Remove some redundancy from the test lines.
-
aa997450
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Removing tests/pipeline/load.py
The remaining test simply loads a project with one element
and asserts a value on it. This is already sufficiently tested
in tests/format/project.py.
-
561eddf1
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate protected variable handling tests to tests/format/variables.py
-
3bf40cf3
by Tristan Van Berkom
at 2019-01-16T23:35:21Z
tests: Migrate junctions test to tests/format/junctions.py
This is the directory for all things related to loading.
-
d34a4fd1
by Tristan Van Berkom
at 2019-01-17T00:26:43Z
Merge branch 'tristan/organizing-tests' into 'master'
General refactor in tests directory
See merge request BuildStream/buildstream!1062
-
d212cdfa
by Tristan Van Berkom
at 2019-01-17T00:28:03Z
sandbox/sandbox.py: Display failed commands in the detail string
We should only display commands in detail strings, not in the
message texts.
This also updates tests/integration/sandbox-bwrap.py to expect
the new message string which only contains the command exit status
and not the whole command itself, this does not alter the validity
of the text case which is checking that we can obtain the expected
return value.
-
ce91ce5d
by Tristan Van Berkom
at 2019-01-17T05:05:16Z
Merge branch 'tristan/error-message-regression' into 'master'
sandbox/sandbox.py: Display failed commands in the detail string
See merge request BuildStream/buildstream!1081
-
63b02f7c
by James Ennis
at 2019-01-17T15:13:27Z
_profile.py: Add timestamp to the logs
-
f64ee46f
by James Ennis
at 2019-01-17T17:02:28Z
_profile.py: Write binaries as well as logs
Private class methods which write the logs and write the binaries
have been added to Profile. The binaries are able to be used
by various visualisation tools.
-
2cb37a7e
by James Ennis
at 2019-01-18T09:31:24Z
Merge branch 'jennis/profiling_outputs_binaries' into 'master'
Make the profiler output binaries (which can be used to visualise the data)
See merge request BuildStream/buildstream!1082
-
56ec33cc
by Valentin David
at 2019-01-18T11:14:41Z
.gitlab-ci.yml: Add overnight tests logs to artifacts.
-
ad2df651
by Javier Jardón
at 2019-01-18T12:01:56Z
Merge branch 'valentindavid/overnight-tests-logs-artifacts' into 'master'
.gitlab-ci.yml: Add overnight tests logs to artifacts.
See merge request BuildStream/buildstream!1084
-
f874295f
by Tristan Van Berkom
at 2019-01-18T15:59:28Z
bzr source plugin: Use lock files to avoid corrupting the source cache
This patch by itself fixes #868
-
42a2fe3c
by Tristan Van Berkom
at 2019-01-18T15:59:28Z
bzr source plugins: Remove all of the atomic backup directory business logic
Follow up of last commit which uses exclusive locking to
protect bzr operations instead.
-
a8713ed2
by Tristan Van Berkom
at 2019-01-18T15:59:28Z
testutils/runcli.py: Added cli.get_element_states()
With get_element_state(), you need to invoke BuildStream once
for every element state you want to observe in a pipeline.
The new get_element_states() reports a dictionary with
the element state hashed by element name and is better to use
if you have more than one element to observe the state of.
-
a895cb2a
by Tristan Van Berkom
at 2019-01-18T15:59:28Z
tests/frontend/track.py: Use test_track_recurse() to stress test Sources
This causes multiple source instances to interact with the same
backing data store at the same time, increasing the likelyhood
of triggering issues around concurrent access.
This more reliably triggers issue #868
-
4236bcc7
by Tristan Van Berkom
at 2019-01-18T16:35:23Z
Merge branch 'tristan/fix-bzr-race' into 'master'
Fix bzr race conditions
Closes #868
See merge request BuildStream/buildstream!1083
-
951a8df1
by Angelos Evripiotis
at 2019-01-18T18:02:22Z
cli.py: add a hint about '--' to 'bst shell' help
-
9911023f
by Angelos Evripiotis
at 2019-01-18T18:56:21Z
Merge branch 'aevri/shell_separator_hint' into 'master'
cli.py: add a hint about '--' to 'bst shell' help
See merge request BuildStream/buildstream!1078
-
c9ce89d2
by Tristan Van Berkom
at 2019-01-18T19:36:26Z
_cas/cascache.py: Cleanup directories when removing refs
With out this, empty directories in the refs/heads directory just
grow unconditionally.
-
c536ab6a
by Tristan Van Berkom
at 2019-01-18T19:36:26Z
tests/artifactcache/expiry.py: Test refs directory cleanup
Enhance the test which checks removal of the extract directories
with an additional check that the ref directories are cleaned up
when removing artifacts.
-
99699ffc
by Tristan Van Berkom
at 2019-01-18T19:36:26Z
utils.py: Added _tempnamedfile()
When used in a child process in BuildStream, this should be
used instead of tempfile.NamedTemporaryFile() directly, otherwise
we fail to cleanup the file on SIGTERM.
-
8ce483d4
by Tristan Van Berkom
at 2019-01-18T19:36:26Z
_cas/cascache.py: Use utils._tempdir() and utils._tempnamedfile()
The direct usage of tempfile.TemporaryDirectory() and
tempfile.NamedTemporaryFile() here causes leakage of any temporary
data when the process operating on temporary data is terminated
with SIGTERM.
Using the utilities ensures that trash is not left behind in
~/.cache/buildstream/artifacts/tmp when the user terminates
BuildStream with ^C.
-
73c7252d
by Tristan Van Berkom
at 2019-01-18T20:57:42Z
Merge branch 'tristan/cas-cleanup-improve' into 'master'
CASCache cleanup improvements
See merge request BuildStream/buildstream!1087
-
adfb9291
by Tristan Van Berkom
at 2019-01-18T21:23:05Z
tests/testutils/python_repo.py: Use subprocess to run sdist
The current approach using setuptools.sandbox.run_setup() was
causing a spurious (but highly frequent) failure where setuptools
gets mixed up with it's manipulation of sys.modules and hits a
RuntimeError as a dictionary changes size while being iterated over.
For instance: https://gitlab.com/BuildStream/buildstream/-/jobs/147967307
Since this already happens in an isolated virtual environment created
by tox, we should not need additional sandboxing here from setuptools,
and launching this as a subprocess will be safer.
-
d114a6bd
by Tristan Van Berkom
at 2019-01-18T22:07:22Z
Merge branch 'tristan/fix-pip-source-test' into 'master'
tests/testutils/python_repo.py: Use subprocess to run sdist
See merge request BuildStream/buildstream!1090
-
bf591ade
by Chandan Singh
at 2019-01-18T22:09:04Z
Derive import plugin from Element instead of BuildElement
The `import` element is not really a build element. The main purpose of
the `BuildElement` class is to allow users to run `build-commands`,
`install-commands` etc. But, `import` does not run such commands.
Moreover, we already override all the methods provided by
`BuildElement`. So it only makes it confusing to have it derived from
`BuildElement` class when it is not a build element.
So, derive it from the base `Element` class instead.
-
2233a532
by Chandan Singh
at 2019-01-18T22:46:41Z
Merge branch 'chandan/import-is-not-buildelement' into 'master'
Derive import plugin from Element instead of BuildElement
See merge request BuildStream/buildstream!1089
-
aa3411f9
by Tristan Maat
at 2019-01-18T22:47:46Z
testutils/runcli.py: Allow removing artifacts from arbitrary dirs
`remove_artifact_from_cache` used a hard-coded path to remove
artifacts, which wasn't sufficient for integration tests.
-
fff882fe
by Tristan Maat
at 2019-01-18T22:47:46Z
widget.py: Avoid "showing 0 lines" messages when there are no lines
This happened when bst is invoked with --message-lines 0 or
--error-lines 0, and was arguably a little too verbose (the user
explicitly asked us not to show them any lines, after all).
Fixes #779
-
e230dedb
by Tristan Van Berkom
at 2019-01-18T23:23:35Z
Merge branch 'tlater/message-lines' into 'master'
Avoid "showing 0 lines" messages when we're asked to show no lines
Closes #779
See merge request BuildStream/buildstream!1031
-
43797617
by Richard Maw
at 2019-01-21T10:41:37Z
_gitsourcebase.py: Fetch with explicit refspecs
Old versions of git lack --force and --tags,
but the same effect can be had by specifying refspecs.
-
ce8dab0f
by Richard Maw
at 2019-01-21T10:41:37Z
tests/frontend/workspace.py: Skip test_open_multi_unwritable when root
The test assumes that a directory with write permission removed isn't writable,
this isn't the case if the process running the tests has CAP_DAC_OVERRIDE
which is common when running as root.
-
50165081
by Richard Maw
at 2019-01-21T10:41:37Z
tests/sources/git.py: Skip tests that assume too new a git
test_track_invalid_submodule depends on being able to remove a submodule
by `git rm $submoduledir`, but old versions of git don't update .gitmodules
so BuildStream still thinks there's a submodule present.
For expediency the test is skipped rather than changed to manually remove
the entry from .gitmodules if git hasn't done it,
since in the common case git is new enough to do that itself.
test_git_describe expects --first-parent to find another tag,
but `bst track` will gracefully degrade if the option doesn't work
so a different history will be retained with old versions of git.
It's of marginal benefit to add additional cruft
to test for different output on old versions of git that won't persist forever.
-
8677a256
by Benjamin Schubert
at 2019-01-21T10:41:37Z
Add a Centos runner
Centos is apparently different enough from fedora when running tests.
-
33782865
by Valentin David
at 2019-01-21T11:47:18Z
Merge branch 'richardmaw/centos-oldgit-test-fixes' into 'master'
Fix CentOS
Closes #833
See merge request BuildStream/buildstream!1085
-
c00b3782
by Chandan Singh
at 2019-01-21T19:37:53Z
CONTRIBUTING.rst: Fix formatting of link to pip docs
The link explaining python's requirements files was formatted
incorrectly (missing underscore at the end). This resulted in the text
being rendered literally, as opposed to being converted into a
hyperlink.
-
638ceb8a
by Chandan Singh
at 2019-01-21T20:16:38Z
Merge branch 'chandan/fix-contrib-link' into 'master'
CONTRIBUTING.rst: Fix formatting of link to pip docs
See merge request BuildStream/buildstream!1094
-
383142e3
by James Ennis
at 2019-01-22T12:32:43Z
using_commands.rst: Split out top level commands and subcommand groups
-
ac135333
by James Ennis
at 2019-01-22T12:32:43Z
using_commands.rst: Add the source checkout command
-
a3fc350f
by James Ennis
at 2019-01-22T12:32:43Z
Move push and pull to the new artifact subcommand group
This commit also ensures that if we try to use the 'old' commands,
BuildStream will fail and instruct the user to use the new command.
-
9eefe863
by James Ennis
at 2019-01-22T12:32:43Z
cli: Add artifact checkout subcommand
'artifact checkout' has slightly different behaviour from 'checkout',
that is, either '--directory' or '--tar' are now required options.
This is a step towards allowing checkout to take multiple args.
-
fbd15939
by James Ennis
at 2019-01-22T12:32:43Z
Mark 'old' checkout command as obsolete
This commit marks 'bst checkout' as a 'hidden' command. If used,
the user will be prompted to use the new 'bst artifact checkout'
command.
All tests which used 'bst checkout' have been modified to use
the new artifact sub-command.
This partially solves #822.
-
9e8034e9
by James Ennis
at 2019-01-22T12:32:43Z
Add NEWS entry describing the deprecation of checkout, pull and push
-
1bccf1d2
by James Ennis
at 2019-01-22T12:38:40Z
using_commands.rst: Split out the artifact subcommands
-
d9072371
by James Ennis
at 2019-01-22T12:38:40Z
using_commands.rst: Add artifact log subcommand
-
077d5a96
by James Ennis
at 2019-01-22T12:41:29Z
Change bst checkout/pull/push references to bst artifact checkout/pull/push
-
ea2fbe4d
by James Ennis
at 2019-01-22T13:02:14Z
man: Regenerate all of our man pages
Due to an upstream click_man issue:
https://github.com/click-contrib/click-man/issues/10
generating the man pages with our current setup.py only generates
a man page for bst-artifact-server, our first entry point.
I then had to remove this entry point from setup.py and regenerate to
obtain man pages for the commands in cli.py
-
9c2a6b93
by James Ennis
at 2019-01-22T15:08:17Z
Merge branch 'jennis/migrate_pull_push_commands' into 'master'
Move push/pull/checkout to the artifact subcommand group
See merge request BuildStream/buildstream!1045
-
35377522
by James Ennis
at 2019-01-22T15:28:13Z
cli.py: Add an obsoletion note to our deprecated commands.
Click 7.0 allows us to declare commands as 'hidden'.
However, sphinx-click and click-man still generate these hidden
commands in the documentation and man pages, respectively.
This is a stop gap solution until the upstream issues (tracked in
issues #879 and #881) have been addressed.
-
76148785
by James Ennis
at 2019-01-22T16:15:20Z
Merge branch 'jennis/add_obsoletion_note' into 'master'
Add an obsoletion note to our deprecated commands.
See merge request BuildStream/buildstream!1097
-
1443c542
by Tristan Van Berkom
at 2019-01-22T16:26:56Z
_scheduler: Fix dont display a failure for terminated jobs
This fixes a recent regression introduced in c2fc2a5ea
-
6e5c9987
by Tristan Van Berkom
at 2019-01-22T17:14:50Z
Merge branch 'tristan/fix-terminated-status' into 'master'
_scheduler: Fix dont display a failure for terminated jobs
See merge request BuildStream/buildstream!1096
-
3315b9a1
by Tristan Van Berkom
at 2019-01-22T18:46:24Z
tests/integration/pullbuildtrees.py: Fix the non-integration case.
This test has one test case which is marked as an integration test,
and the other is not an integration test, but was using the integration
cli. The integration cli does not work correctly if not run in
integration mode.
This was causing an error locally in conftest.py when trying to
create a tmpdir inside a nonexisting integration cache directory.
-
56e857f4
by Tristan Van Berkom
at 2019-01-22T19:59:57Z
Merge branch 'tristan/fix-pullbuildtrees-test' into 'master'
tests/integration/pullbuildtrees.py: Fix the non-integration case.
See merge request BuildStream/buildstream!1098
-
3895571a
by Chandan Singh
at 2019-01-23T00:45:47Z
tox.ini: Unpin sphinx dependency
https://github.com/rtfd/sphinx_rtd_theme/pull/672 has been fixed
upstream, and the newer versions of `sphinx_rtd_theme` do not break
search functionality with Sphinx >= 1.8.
-
528e8ed7
by Chandan Singh
at 2019-01-23T01:31:49Z
Merge branch 'chandan/unpin-sphinx' into 'master'
tox.ini: Unpin sphinx dependency
See merge request BuildStream/buildstream!1093
-
0098a900
by Tristan Van Berkom
at 2019-01-23T13:57:53Z
tests: Migrated cache quota test into artifactcache/cache_size.py
Instead of sitting mysteriously alone in internals/utils.py
-
9be31641
by Tristan Van Berkom
at 2019-01-23T13:57:53Z
_artifactcache.py: Raise ArtifactError() when quota size exceeds disk space.
This is not an error related to loading data, like a parse error
in the quota specification is, but a problem raised by the artifact
cache - this allows us to assert more specific machine readable
errors in test cases (instead of checking the string in stderr, which
this patch also fixes).
This also removes a typo from the error message in the said error.
* tests/artifactcache/cache_size.py
Updated test case to expect the artifact error, which consequently
changes the test case to properly assert a machine readable error
instead of asserting text in the stderr (which is the real, secret
motivation behind this patch).
* tests/artifactcache/expiry.py: Reworked test_invalid_cache_quota()
Now expect the artifact error for the tests which check configurations
which create caches too large to fit on the disk.
-
3a6e953f
by Tristan Van Berkom
at 2019-01-24T01:59:13Z
Merge branch 'tristan/insufficient-storage-error' into 'master'
Tristan/insufficient storage error
See merge request BuildStream/buildstream!1102
-
68339b19
by Tristan Van Berkom
at 2019-01-24T05:01:55Z
tests/testutils/runcli.py: Make get_element_states() take a list of targets
Instead of a single target, we can always provide a single target
in a list.
-
6ecc2b0a
by Tristan Van Berkom
at 2019-01-24T05:01:55Z
tests/artifactcache/expiry.py: Refactored to use get_element_states()
-
1140aed5
by Tristan Van Berkom
at 2019-01-24T05:01:55Z
tests/elements/filter.py: Refactored to use get_element_states()
-
b7ea8b74
by Tristan Van Berkom
at 2019-01-24T05:01:55Z
tests/sources/remote.py: Refactored to use get_element_states()
-
c2c004f9
by Tristan Van Berkom
at 2019-01-24T05:01:55Z
tests/frontend/pull.py: Refactored to use get_element_states()
-
21b2958b
by Tristan Van Berkom
at 2019-01-24T05:01:55Z
tests/frontend/push.py: Refactored to use get_element_states()
-
83fcaa9f
by Tristan Van Berkom
at 2019-01-24T05:01:56Z
tests/frontend/track.py: Refactored to use get_element_states()
-
46eb3018
by Tristan Van Berkom
at 2019-01-24T05:01:56Z
tests/frontend/workspace.py: Refactored to use get_element_states()
-
341b131b
by Tristan Van Berkom
at 2019-01-24T06:13:57Z
Merge branch 'tristan/test-element-states' into 'master'
Reduce number of calls to `bst show` in tests
See merge request BuildStream/buildstream!1103
-
ef2b4648
by Tristan Van Berkom
at 2019-01-24T06:14:20Z
tests/frontend/track.py: test_track_error_cannot_write_file() fixup
This tests how BuildStream reacts when it fails to write the tracking
results to the element files or project.refs file, which is an operation
that plugins do not play a part in.
As such, removing the per repo kind parameterization from this test
as multiple runs are redundant here.
-
40c18174
by Tristan Van Berkom
at 2019-01-24T07:00:50Z
Merge branch 'tristan/track-test-reduce' into 'master'
test_track_error_cannot_write_file() fixup
See merge request BuildStream/buildstream!1104
-
5b0bba85
by Jonathan Maw
at 2019-01-24T10:15:06Z
Test that tracking in workspaces actually works
Previously, it merely tested that buildstream did not fall other,
rather than whether it did anything useful.
-
58d7d722
by Jonathan Maw
at 2019-01-24T10:18:01Z
tests: Test that fetching an open workspace will fetch its dependencies
Previously, there was no way of detecting whether fetching happened, as
an element with an open workspace will not be fetched.