summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-11-24just: Fix wrong access to moved structPaul Cristian Sarbu
The traverser instantiation consumes the arguments.build struct, therefore one must not access that struct later in the code.
2023-11-22LocalAction: Fix staging of empty treesOliver Reiche
2023-11-22Implement blob splitting protocol on just client sideSascha Roloff
2023-11-22Implement blob splitting protocol on just server sideSascha Roloff
2023-11-21content_cas_map: Interrogate just serve endpoint also if doing pure fetchPaul Cristian Sarbu
Before trying to fetch an archive content from other non-local sources, check first the just serve endpoint.
2023-11-21just serve: Implement client-side ServeContent and extend serve APIPaul Cristian Sarbu
2023-11-21just serve: Implement server-side ServeContent RPCPaul Cristian Sarbu
2023-11-21just_serve.proto: define ServeContent RPCPaul Cristian Sarbu
2023-11-21archive repository: Query 'just serve' endpoint also when not marked absentPaul Cristian Sarbu
...before going to the network, if 'just serve' endpoint given. ContentCASMap was reworked to provide a cleaner logic for handling pure fetches, which also reduced code duplication in ContentGitMap.
2023-11-21git repository: Query 'just serve' endpoint also when not marked absentPaul Cristian Sarbu
...before going to the network, if 'just serve' endpoint given.
2023-11-21SourceTree service: Bump up server-side log levelsPaul Cristian Sarbu
Log levels on the server-side should reflect the meaning of the status codes in the response messages. As such, anything that leads directly to an error-type status code has been bumped up to log level Error, the rest to log level Info.
2023-11-20Remove O_SYNC from low-level file-writing flags.Sascha Roloff
The man page for open(2) says the following to the O_SYNC flag: 'O_SYNC provides synchronized I/O file integrity completion, meaning write operations will flush data and all associated metadata to the underlying hardware.' This flag results in a high delay when files are stored in casx, e.g., several seconds for medium-sized files such as 23 MB. Since just does not care about persistency, this strong synchronization mechanism is not required and is deactivated.
2023-11-17built-in "install" rule: verify well-formedness of resulting stageKlaus Aehlig
The install target, like any other target, has to have artifacts and runfiles being proper stages, i.e., in such a way that the keys can be interpreted as names in the file system without causing conflicts. This property used to be unchecked, thus allowing users to define mal-formed targets that, when used as inputs to actions, would result in unspecified layout of the action directory. Fix this by adding an appropriate check enforcing well-formedness of the resulting stage.
2023-11-16fetch-absent: Only allow option in native modePaul Cristian Sarbu
2023-11-16Add -R as short option for --remote-serve-addressKlaus Aehlig
The `just serve` command defaults to also provide the remote-execution endpoint if none is specified. The `just build` implicitly uses the serve endpoint as remote-execution endpoint if no other endpoint is specified. In this way, the serve endpoint has become the universal endpoint for simple set ups. Simplify that usage further by providing a short command-line option.
2023-11-16remote-execution-endpoint: fall back to remote-serve-endpointAlberto Sartori
If only the `--remote-serve-endpoint` option is specified on the command line, the `--remote-execution-endpoint` is also set to the given value. This makes the spawning and usage of just-execute consistent. When just-serve is started, if no remote execution endpoint is provided, the same process will also act as a just-execute instance. With the current patch, the client can thus only write, on command line, the remote serve address, avoiding the repetition of the same address for two different options.
2023-11-15just-mr: Update to using the static methods of ServeApiPaul Cristian Sarbu
2023-11-15define AbsentTargetMap for handling export targets in absent repositoriesAlberto Sartori
2023-11-15just-serve: Extend client and API for services Target and ConfigurationPaul Cristian Sarbu
Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
2023-11-15just-serve: initial server-side implementation of "Target" and ↵Alberto Sartori
"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>
2023-11-15just-serve: start a just-execute instance if the user does not provide...Alberto Sartori
...a remote execution end-point for just-serve.
2023-11-15just_serve.proto: add Configuration serviceAlberto Sartori
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.
2023-11-15just_serve.proto: define service TargetAlberto Sartori
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>
2023-11-15ReadConfiguredTarget: handle absent target rootsAlberto Sartori
2023-11-15just main: Extend root parsing to allow absent rootsPaul Cristian Sarbu
2023-11-15FileRoot: Add new absent root underlying type variantPaul Cristian Sarbu
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>
2023-11-15serve api config: Fix missing header guardPaul Cristian Sarbu
2023-11-15just-mr json parsing: Add missing check for items type in listsPaul Cristian Sarbu
2023-11-15TargetCache: add new member function WithShard(shard) that returns a new ↵Alberto Sartori
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.
2023-11-15TargetCacheKey: make TargetCacheKey(Artifact::ObjectInfo) constructor publicAlberto Sartori
This constructor is used by TargetService::ServeTarget
2023-11-15source_tree: add missing depAlberto Sartori
2023-11-15artifact.hpp: make ToJson and FromJson consistentAlberto Sartori
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.
2023-11-15git tree repository: Creating absent roots should not run the commandPaul Cristian Sarbu
Also extended absent-roots test with this scenario.
2023-11-15just-execute: verify the validity of all the hashes received over the wireAlberto Sartori
2023-11-15utils/cpp: add IsAHash functionAlberto Sartori
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.
2023-11-14Fix serialization of the target cache keyOliver Reiche
... which was accidentially a list of (a single) object, instead of only a single JSON object.
2023-11-14just-mr archives fetch: Add logic for local mirrors and preferred hostnamesPaul Cristian Sarbu
2023-11-14just-mr git fetch: Add logic for local mirrors and preferred hostnamesPaul Cristian Sarbu
2023-11-14curl_url_handle: Add method to replace the hostname of a URLPaul Cristian Sarbu
Also adds a section in the curl_url test suite.
2023-11-14curl_url_handle: Allow permissive parsing and URL extraction to be non-fatalPaul Cristian Sarbu
2023-11-14curl_url_handle: Improve documentationPaul Cristian Sarbu
2023-11-14just-mr: Add utility getters for alternative mirrors specificationsPaul Cristian Sarbu
2023-11-14just-mr: Parse mirrors specification from checkout locations filePaul Cristian Sarbu
2023-11-14just-mr: Add 'mirrors' field to archive-like repositoriesPaul Cristian Sarbu
Also extends 'distdir' repositories logic accordingly.
2023-11-14curl_easy_handle: Allow non-fatal logging of errors in curl operationsPaul Cristian Sarbu
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.
2023-11-14DistdirCheckout: Improve log messagesPaul Cristian Sarbu
2023-11-14just-mr: Add 'mirrors' field to 'git' repositoriesPaul Cristian Sarbu
2023-11-14just_mr utils: Add missing nodiscard attributesPaul Cristian Sarbu
2023-11-14fs_utils: Only accept strings as 'checkouts' map valuesPaul Cristian Sarbu
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.
2023-11-14commit_git_map fix: Fetch from correct location if fetch URL is a pathPaul Cristian Sarbu