| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The implementation can be reused to replace `local_missing_blobs()` and
simplify `contains_files()`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes SandboxConfig such that it now has a simple constructor
and a new SandboxConfig.new_from_node() classmethod to load it from a YAML
configuration node. The new version of SandboxConfig now uses type annotations.
SandboxConfig also now sports a to_dict() method to help in serialization in
artifacts, this replaces SandboxConfig.get_unique_key() since it does exactly
the same thing, but uses the same names as expected in the YAML configuration
to achieve it.
The element.py code has been updated to use the classmethod, and to
use the to_dict() method when constructing cache keys.
This refactor is meant to allow instantiating a SandboxConfig without
any MappingNode, such that we can later load a SandboxConfig from an
Artifact instead of from an parsed Element.
This commit also updates the cache keys in the cache key test, as
the cache key format is slightly changed by the to_dict() method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes how the scheduler works and adapts all the code that needs
adapting in order to be able to run in threads instead of in
subprocesses, which helps with Windows support, and will allow some
simplifications in the main pipeline.
This addresses the following issues:
* Fix #810: All CAS calls are now made in the master process, and thus
share the same connection to the cas server
* Fix #93: We don't start as many child processes anymore, so the risk
of starving the machine are way less
* Fix #911: We now use `forkserver` for starting processes. We also
don't use subprocesses for jobs so we should be starting less
subprocesses
And the following highlevel changes where made:
* cascache.py: Run the CasCacheUsageMonitor in a thread instead of a
subprocess.
* casdprocessmanager.py: Ensure start and stop of the process are thread
safe.
* job.py: Run the child in a thread instead of a process, adapt how we
stop a thread, since we ca't use signals anymore.
* _multiprocessing.py: Not needed anymore, we are not using `fork()`.
* scheduler.py: Run the scheduler with a threadpool, to run the child
jobs in. Also adapt how our signal handling is done, since we are not
receiving signals from our children anymore, and can't kill them the
same way.
* sandbox: Stop using blocking signals to wait on the process, and use
timeouts all the time.
* messenger.py: Use a thread-local context for the handler, to allow for
multiple parameters in the same process.
* _remote.py: Ensure the start of the connection is thread safe
* _signal.py: Allow blocking entering in the signal's context managers
by setting an event. This is to ensure no thread runs long-running
code while we asked the scheduler to pause. This also ensures all the
signal handlers is thread safe.
* source.py: Change check around saving the source's ref. We are now
running in the same process, and thus the ref will already have been
changed.
|
|
|
|
|
| |
This was a dead codepath, not used by any sandbox implementation
for any reason, and used to be called inconsistently by some elements.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The log message which shows that the remote build is ongoing has been
extended to include the name of the element to which the remote build
corresponds.
Likewise the message indicating that an action result has been found in
the action cache will also no include the element name.
A new timed_activity() call has been added to show when missing blobs
are being determined and uploaded.
Fixed #1336
|
| |
|
| |
|
|
|
|
| |
It is always true.
|
|
|
|
| |
Replaced by buildbox-run.
|
| |
|
|
|
|
|
|
| |
buildbox-common master no longer forwards stdout/stderr of the action
command by default. The buildbox-run capabilities mechanism is used to
support old and new versions.
|
|
|
|
| |
Require element plugins to use `Sandbox.get_virtual_directory()`.
|
|
|
|
| |
This is no longer needed now that we support caching buildtrees in CAS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does not make sense to keep in the public API surface
documentation. As we are heading towards a release of 2.0, this
represents a "reset" in public API, and older annotations only
serve to clutter the documentation with information that is not
relevant to the reader.
Everything which is public at the time of the 2.0 release can
be considered available "Since: 2.0" implicitly (as this is
going to be the starting point of this new stable API).
It will make sense to start adding these annotations again for any
added API in 2.2 and forward.
|
|
|
|
| |
This fixes handling of missing blobs in `ArtifactCache.pull()`.
|
|
|
|
|
|
| |
This allows builds where the host OS or architecture doesn't match the
build OS or architecture, if the buildbox-run implementation supports
it. E.g., this allows x86-32 builds on x86-64 systems.
|
|
|
|
|
|
| |
Class data is not pickled and thus, class variables set by
`check_available()` are not set when `check_sandbox_config()` is called
by a job subprocess.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowing builds without affecting the cache key but disallowing push,
when the sandbox configuration is not fully compatible, results in an
inconsistent user experience and may lead to unexpected build issues.
Especially as push is allowed or disallowed based on the sandbox
available at the time of push, not at the time of build.
The previous commit making build-uid and build-gid configuration
optional allows each project to decide whether the sandbox is required
to support UID/GID configuration or not.
|
|
|
|
|
| |
This allows use of sandbox implementations that don't support
configuring sandbox UID/GID such as buildbox-run-userchroot.
|
|
|
|
|
|
|
| |
The scheduler timeout for `SIGTERM` of job processes is 20s. The timeout
in the sandbox backend should be shorter to allow graceful termination
of the job process even when `buildbox-run` fails to terminate
gracefully.
|
|
|
|
|
|
| |
If `buildbox-run --capabilities` reports an error, we should consider
the sandbox to be unavailable, forwarding the error message from
buildbox-run.
|
|
|
|
| |
Move output_node_properties from Action to Command.
|
| |
|
|
|
|
| |
This is required by the REAPI specification.
|
|
|
|
|
| |
This fixes resume in non-interactive mode and job control in interactive
shells, matching the behavior of `SandboxBwrap`.
|
| |
|
| |
|
|
|
|
| |
This is used by `bst shell`.
|
| |
|
| |
|
|
|
|
| |
Fetch blobs from remote CAS and then forward them to the sandbox output.
|
|
|
|
|
| |
SandboxBuildBoxRun doesn't require log forwarding as we use stdout and
stderr of the buildbox-run process.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Do not capture read-only directories.
Fixes #1223.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This breaks if host-files is used to bind mount regular files.
|
|
|
|
|
|
|
|
| |
This adds a timed activity message to bring batch command logging for
REAPI-based sandboxes in line with the default sandbox as far as
possible.
Thix fixes 3 xfails with buildbox-run.
|