Age | Commit message (Collapse) | Author |
|
via a 'SYMLINK' constructor function. This works similarly to the
'FILE' construct, but the name given must point to a non-upwards
symlink and a symlink artifact is being generated from it.
Also updates the relevant tests.
|
|
...and update tests accordingly.
|
|
This feature has been introduced with C++20.
|
|
... also, gracefully handle the case of a missing working
directory when determining the current module, falling back
to the top-level module.
|
|
|
|
...caused by incorrectly setting and resetting the library internal
state and the misuse of pthreads in libgit2.
Normally, git_libgit2_init and git_libgit2_shutdown should span the
life of a worker thread in order to be safely used. However, due to
an incorrect implementation of libgit2's threadstate with pthreads,
on unix systems there is a race condition.
Until the use of pthread_key_t is corrected in libgit2, we need to
apply a workaround by always ensuring that the main thread is the
first thread reaching the GitContext constructor.
|
|
... with two minor code base changes compared to previous
use of gsl-lite:
- dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not
wrapped in gsl::not_null<> anymore, due to lack of support
for wrapping std::unique_ptr<>. More specifically, the
move constructor is missing, rendering it impossible to
use std::vector<>::emplace_back().
- utils/cpp/gsl.hpp: New header file added to implement the
macros ExpectsAudit() and EnsureAudit(), asserts running
only in debug builds, which were available in gsl-lite but
are missing in MS GSL.
|
|
|
|
... by including the details of the parse error.
|
|
... to avoid unnecessary downloads and hence speed things up.
|
|
By default, messages at level "progress" and above are shown. So,
messages at that level should be useful for the user in the typical
case. For the count of export targets, this information is only useful
if the build involves export targets at all; the absence of export
targets is typically only used when debugging the build structure.
|
|
The improved GC implementation uses refactored storage
classes instead of directly accessing "unknown" file paths.
The required storage class refactoring is quite substantial
and outlined in the following paragraphs.
The module `buildtool/file_system` was extended by:
- `ObjectCAS`: a plain CAS implementation for
reading/writing blobs and computing digests for a given
`ObjectType`. Depending on that type, files written to the
file system may have different properties (e.g., the x-bit
set) or the digest may be computed differently (e.g., tree
digests in non-compatible mode).
A new module `buildtool/storage` was introduced containing:
- `LocalCAS`: provides a common interface for the "logical
CAS", which internally combines three `ObjectCAS`s, one
for each `ObjectType` (file, executable, tree).
- `LocalAC`: implements the action cache, which needs the
`LocalCAS` for storing cache values.
- `TargetCache`: implements the high-level target cache,
which also needs the `LocalCAS` for storing cache values.
- `LocalStorage`: combines the storage classes `LocalCAS`,
`LocalAC`, and `TargetCache`. Those are initialized with
settings from `StorageConfig`, such as the build root base
path or number of generations for the garbage collector.
`LocalStorage` is templated with a Boolean parameter
`kDoGlobalUplink`, which indicates that, on every
read/write access, the garbage collector should be used
for uplinking across all generations (global).
- `GarbageCollector`: responsible for garbage collection and
the global uplinking across all generations. To do so, it
employs instances of `LocalStorage` with `kDoGlobalUplink`
set to false, in order to avoid endless recursion. The
actual (local) uplinking within two single generations is
performed by the corresponding storage class (e.g.,
`TargetCache` implements uplinking of target cache entries
between two target cache generations etc.). Thereby, the
actual knowledge how data should be uplinked is
implemented by the instance that is responsible for
creating the data in the first place.
|
|
|
|
google::longrunning::Operations::GetOperation
For each action that is executed, an entry is added to a shared thread
safe cache. Once the number of operations stored exceeds twice 2^n,
where n is given by the option --log-operations-threshold, at most 2^n
operations will be removed, in a FIFO scheme.
|
|
... instead of only honoring the latest argument. In this way,
standard overlays coming from the launcher configuration can be
amended in individual invocations.
|
|
|
|
|
|
|
|
..., i.e., the requirement that the positional arguments form a
syntactically valid target name. An explicit error message (created
by the target-name parsing) is preferrable over tacitly dropping all
but the last up to two arguments (which is the meaning of CLI11's
expected(2)).
While there, drop duplicate full stop in error message.
|
|
This subcommand starts a single node remote execution service honoring
the just native remote protocol.
If the flag --compatible is provided, the execution service will honor
the original remote build execution protocol.
New command line args supported by this subcommand:
-p,--port INT: Execution service will listen to this port. If unset,
the service will listen to the first available one.
--info-file TEXT: Write the used port, interface, and pid to this file
in JSON format. If the file exists, it will be overwritten.
-i,--interface TEXT: Interface to use. If unset, the loopback device
is used.
--pid-file TEXT Write pid to this file in plain txt. If the file
exists, it will be overwritten.
--tls-server-cert TEXT: Path to the TLS server certificate.
--tls-server-key TEXT: Path to the TLS server key.
Co-authored by: Klaus Aehlig <klaus.aehlig@huawei.com>
|
|
|
|
|
|
|
|
|
|
... dumping only the configured targets that are export targets.
Those targets are of particular interest as those are the targets,
as they are the high-level caching points and also often serve
as interface between projects.
|
|
|
|
|
|
Add an option --dump-vars showing the variables of the configuration
used (including the use of them being unset). This information can
be used, e.g., to export a given target in a maximally flexible way.
|
|
|
|
... if none is specified on command line or in the config.
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
The version subcommand now has no expected command line options, as expected.
Also the version subcommand was missing from the man page synopsis.
|
|
|
|
|
|
... to be able to report the respective graph for later analysis
by other tools.
|
|
Like file or tree references, globs are restricted to the current
module; in fact, by the way we evaluate them, even to the top-level
directory of that module: a glob is a target having as artifacts and
runfiles those entries of the top-level directory of the specified
module that match the given pattern.
|
|
... also when determining default module or target.
|
|
We have to include explicit tree references into our target-result
map, as these targets can provide a tree definition, if the root
is not a git root or compatible mode is used. Nevertheless, from a
user's persepective, trees are just source references, like files.
Therefore, do not include them, when dumping the map of analyzed
targets. In this way, we also avoid the ambiguity in the dump between
an explicit tree reference and a defined target with the same name.
|
|
Analysing a target is a pretty self-contained task. So move it
into a library of its own, to keep main.cpp more managable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Extend the --request-action-input option to also provide command line,
environment, etc, of the requested action. As this option is mainly
for debugging, having that information available via the analyse
subcommand is useful; for build/install that change does not make
a difference anyway.
|
|
The remote execution endpoint shards the target-level cache; still,
for analysis, we want to specify a particular target-level cache,
e.g., to analyse the inputs of a particular action that failed
remotely. Note that the action identifier depends on the target-level
cache in question, due to the extensional projection implicit in
target-level caching.
|
|
... as the --request-action-input option provides a clean way of
restoring the inputs to a specific action, without the need of
interacting with the internal directory structure of the tool. In
particular, the new option also works for remote builds.
|