| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Old versions of git lack --force and --tags,
but the same effect can be had by specifying refspecs.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
With out this, empty directories in the refs/heads directory just
grow unconditionally.
|
| |
|
|
|
|
|
| |
Follow up of last commit which uses exclusive locking to
protect bzr operations instead.
|
|
|
|
| |
This patch by itself fixes #868
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Part of #802
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
`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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Minor correction, looks like we're not observing this queue
otherwise we'd be seeing crashes.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Accept common architecture aliases for the sandbox config for
consistency with arch options.
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
It was 'instance-name' in the documentation.
|
|
|
|
|
|
|
| |
ScriptElement does not use Sandbox.get_directory. It works using it
with remote execution.
Fixes #850
|
|
|
|
| |
Fixes #780.
|
|
|
|
| |
Fixes #631.
|
| |
|
|
|
|
|
| |
When code is faulty, in a plugin or in the core, we should
get a stack trace and a BUG message.
|
|
|
|
| |
This command has been replacved by the bst source checkout command
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is redundant now that we report it through the JobStatus.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
Fixes: e29aea36 ("Basic options for shell --build to use buildtrees")
|
|
|
|
|
|
| |
Moving fetch and track to the source command group accidentally dropped
the support for guessing targets for these commands when invoked from a
workspace directory. This brings it back.
|
|
|
|
|
|
|
| |
In _yaml.py and _frontend/complete.py we were getting pylint warnings
for using collections.Mapping and collections.Iterable, which are
abstract classes now provided from collections.abc. This patch just
uses the classes from the right place.
|
|
|
|
|
|
|
|
| |
pep8 package was renamed to pycodestyle to reduce confusion.
Disabled warnings:
W504 - Line break after binary operator (seems people like this)
W605 - Invalid escape sequence (some of our regexes use these)
|
|
|
|
|
| |
See https://mail.gnome.org/archives/buildstream-list/2018-December/msg00061.html
for some related discussion.
|
|
|
|
|
|
|
| |
Currently we some duplication in the way we check for invalid filenames.
To make it more robust and allow room for adding more warnings, refactor
it into a separate method `_warn_invalid_elements()` that handles just
this.
|
|
|
|
|
|
| |
The python netrc module will raise OSError in the case
that HOME is not set, this was discovered while running
tests under tox.
|
|
|
|
| |
linter errors
|
|
|
|
| |
(duplicate-string-formatting-argument) linter error
|