Age | Commit message (Collapse) | Author |
|
... by explicitly catching any possible exception. Mainly to make clang-tidy
happy.
...
|
|
|
|
|
|
In particular, ensure that Git roots check for, e.g., upwards
symlinks, before returning blobs and trees. To ensure that only the
bear minimum extra work is performed for this purpose, Git roots
now keep also the root's GitTreeEntry as a field, allowing the
validity check of root source trees to take place only once and
only if required.
|
|
|
|
|
|
Do not emit errors when it does not lead to build failures. Callers
handle the log level at which failures of this method should be
logged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
...and private members using lower_case_
|
|
|
|
|
|
|
|
...to get the protocol type.
|
|
...that is to be used by FileRoot::ToArtifactDescription.
|
|
...and move it to the common stage.
|
|
...from Compatibility.
|
|
...to create ArtifactDigests.
|
|
...instead of unobvious ctors relying on overload resolution.
|
|
|
|
When populating the GitTree instance stored in a Git tree-type
FileRoot with the ignore-special flag set, the GitTree instance
would be created with an empty raw_id_ field, signaling that some
of the entries might have been skipped and thus the root tree id
is not anymore in a one-to-one correspondence with the stored list
of entries.
This however caused FileRoot instances with missing tree id
information. This commit fixes the issue by always storing the
raw_id_ field as the root id of the Git tree, as well as clarifying
the relationship between this field and the ignore_special_ flag,
including refactoring the tree id getters.
|
|
Main culprits:
- std::size_t, std::nullptr_t, and NULL require <cstddef>
- std::move and std::forward require <utility>
- unordered maps and sets require respective includes
- std::for_each and std::all_of require <algorithm>
|
|
Some of the more specific issues addressed:
- missing log_level target/include
- header-only libs wrongly marking deps as private
- missing/misplaced gsl includes
|
|
|
|
...to make it available also for setting up 'just serve' builds.
|
|
Ignore-special git-tree-based roots are still content defined, so
one should use the correct marker in the JSON description of the
root that will be stored in the repository description of target
cache keys. This commit fixes the issue and improves documentation.
|
|
Absent roots are characterised only by a Git tree hash, so a new
variant of the underlying stored information was added in the form
of a plain string.
In order to avoid unwanted implicit conversions when instantiating
via literal strings, we force callers of the constructors to
explicitly differentiate between plain strings and filesystem
paths. Existing tests were updated to reflect this.
Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
|
|
Upwards symlinks should still be collected from actions, even if
only the non-upwards symlinks are supported artifact types. The
client side is thus the one responsible with enforcing the
non-upwardness condition.
|
|
The introduction of non-upwards symlinks as first-class objects
should have updated the handling of known git tree artifacts
containing symlinks. In particular, one should consider trees in
their entirety when uploading (irrespective of the ignore_special
flag), and git trees should only be reported as known only if
the ignore_special flag is set to false.
|
|
...and update tests accordingly.
|
|
...but make sure it is still considered a special type.
The only non-special entry types remain file, executable, and tree.
|
|
|
|
|
|
... 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.
|
|
... and ensure that cascades of checks are performed with
only a single filesystem stat per method.
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
|
|
description
|
|
|
|
For some file roots, in particular git trees, we can give a complete
selfcontained description of the content without accessing any
external resources. For those, add a method to return such a complete
description that will be used to compute the keys of content-defined
repositories.
|
|
DirectoryEntries must be constructed explicitly either via a GitTree*
or an unordered_map<string,ObjectType>. So, the case of an empty
directory, is represented by an empty map. Before this patch, empty
directories were represented by std::monostate and missing checks
on that led to a seg-fault.
|
|
|
|
... to foster the implementation of the built-in target "TREE"
|
|
This is the initial version of our tool that is able to
build itself. In can be bootstrapped by
./bin/bootstrap.py
Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>
|