Age | Commit message (Collapse) | Author |
|
|
|
|
|
Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
|
|
"Configuration" services.
The RPC ServeTarget has not implemented the orchestration of remote
build yet. If the TargetCacheKey is not found in the target cache, the
response contains status == grpc::StatusCode::UNIMPLEMENTED.
Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
|
|
...a remote execution end-point for just-serve.
|
|
This service allows to query the configuration of the just-serve
instance. In particular, it is used to double-check that the
associated remote end point is the same used by the interrogating
client.
|
|
It defines two RPC:
- ServeTarget: Given a target-level caching key, returns the computed
value.
- ServeTargetVariables: Given the target-level root tree and the name
of an export target, returns the list of flexible variables from
that target's description.
Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
|
|
|
|
|
|
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>
|
|
|
|
|
|
TargetCache...
...backed by the same CAS, but the FileStorage uses the given
shard. This is particularly useful for the just-serve server
implementation, since the sharding must be performed according to the
client's request and not following the server configuration.
|
|
This constructor is used by TargetService::ServeTarget
|
|
|
|
The function ToJson used `file_type` key to express the type of the
artifact, on the other hand, FromJson was expecting `type`.
This patch makes the two functions consistent, prefering `file_type`
for historical reasons.
|
|
Also extended absent-roots test with this scenario.
|
|
|
|
This function is mainly used to check that the hash of a Digest
received over the wire is a real hash, to prevent a malicious attack.
|
|
... which was accidentially a list of (a single) object,
instead of only a single JSON object.
|
|
|
|
|
|
Also adds a section in the curl_url test suite.
|
|
|
|
|
|
|
|
|
|
Also extends 'distdir' repositories logic accordingly.
|
|
In order to allow non-fatal retries of fetches, be it from same
remote or not (e.g., mirrors), the handle now reports with a
caller-defined LogLevel.
|
|
|
|
|
|
|
|
While we don't want to fail if the 'checkouts' map values are not
strings, we shouldn't just accept non-string values either,
instead we should warn the user and continue without them.
|
|
|
|
Make sure that all CopyFile, WriteFile, and CreateSymlink
functions properly unlink the target file (if it exists and
overwrite requested) to avoid interferences of the install
command. With this change, the clean up step for install-cas
and the within GraphTraverser can new be omitted.
|
|
In the specification of the action generating a fixed git tree,
also honor "inherit env", i.e., inherit the environment variables
specified in this field from the environment just-mr is invoked in.
As the expected output is fixed ahead of time anyway, this lack of
isolation does not affect correctness.
|
|
... using thread-based parallelism for the blobs of each tree.
|
|
Use parallelism if provided by the build API when synchronizing
artifacts of export targets and when synchronizing artifacts due
to the --remember option. Do so at build parallelism as this the
parallelism suitable for the build API.
|
|
Allow implementations to use a given number of threads to carry out
the synchronisation. In this way parallelism can be achieved even
in situations where batch reading degrades as objects of unknown
size have to be fetched; this situation typically occurs if a tree
object has a large number of direct children that are blobs.
If no implementation is provided, the default implementation is to
fall back to the normal (sequential) CAS synchronisation.
|
|
Typically, the number of export targets is small compared to the
size of the respective export targets. Moreover, export targets are
often chained, resulting in overlapping artifacts that we want to
fetch only once. Therefore, fetch export targets sequentially, giving
room to introduce parallelism in the individual fetch steps later.
While there, also log the beginning of the artifact synchronisation
for the export targets.
|
|
|
|
|
|
map itself
|
|
|
|
|
|
Also adds missing TARGETS file in serve_api folder and ensures
code comments are consistent with the proto file.
|
|
- add missing serve_api TARGETS file
- rename service client to align with server naming scheme
- fix inconsistencies in comments between implementation and protocol
|
|
This is required in order to make them available to 'just serve'
in a minimal just installation.
|
|
This way they can be used by 'just serve'.
|
|
This avoids using the more geenric GitRepoRemote method which
has libcurl as a dependency, something that is not needed for this
Git operation.
|