summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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
2023-11-13bugfix: Also unlink symlinks before installingOliver Reiche
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.
2023-11-13"git tree" repositories: honor "inherit env"Klaus Aehlig
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.
2023-11-07Bazel API: implement ParallelRetrieveToCasKlaus Aehlig
... using thread-based parallelism for the blobs of each tree.
2023-11-07artifacts sync: use parallelism if providedKlaus Aehlig
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.
2023-11-07remote api: support otpional parallel CAS synchronisationKlaus Aehlig
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.
2023-11-07Fetch export targets sequentially when creating local backupKlaus Aehlig
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.
2023-11-02just-mr fetch: Add handling of --fetch-absent optionPaul Cristian Sarbu
2023-11-02content git map: Add handling of --fetch-absent optionPaul Cristian Sarbu
2023-11-02content git map: Move handling of --fetch-absent flag from checkout to the ↵Paul Cristian Sarbu
map itself
2023-11-02Move content archive helper functions in own libraryPaul Cristian Sarbu
2023-11-02remote serve: Extend client and API with tree-of-archive service callsPaul Cristian Sarbu
2023-11-02just serve: Implement service to get Git tree of an archive contentPaul Cristian Sarbu
Also adds missing TARGETS file in serve_api folder and ensures code comments are consistent with the proto file.
2023-11-02just serve: Fix inconsistenciesPaul Cristian Sarbu
- add missing serve_api TARGETS file - rename service client to align with server naming scheme - fix inconsistencies in comments between implementation and protocol
2023-11-02Decoupling symlinks map and CAS utilities from just-mrPaul Cristian Sarbu
This is required in order to make them available to 'just serve' in a minimal just installation.
2023-11-02ArchiveOps: Move libarchive utilities outside other_toolsPaul Cristian Sarbu
This way they can be used by 'just serve'.
2023-11-02GitRepo: Add method for async fetch from local repositoryPaul Cristian Sarbu
This avoids using the more geenric GitRepoRemote method which has libcurl as a dependency, something that is not needed for this Git operation.
2023-11-02GitRepo: Add blob existence checkerPaul Cristian Sarbu
Also fixes a small typo in tree existence checker log messages.
2023-11-02just serve: add a request to get the tree of an archiveKlaus Aehlig
Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
2023-11-02content CAS map: Check remote CAS only after local distfilesPaul Cristian Sarbu
2023-10-27Base export target chache key on the exported targetKlaus Aehlig
The cache key for an export target should contain as target name that of the export target (and its effective configuration) rather than the exported target. As we computed the repository part of the cache key for the target included in the key, this was still a correct cache key except in the case an explicit file reference was exported (as here, the information that the file was to be taken rather than the target of the same name got lost). We still fix this issue by making the implementation match our design (rather than by including the file-reference bit in the cache key), as the original design gives the cleaner protocol for target-level caching as a service.
2023-10-25just execute: fix race condition during garbage collection...Alberto Sartori
...of the internal cache used for keeping track of running operations.
2023-10-16curl_easy_handle: Ensure we report a fail on HTTP codes >=400Paul Cristian Sarbu
...which signal either cient- or server-side failures. This ensures we exit with a failed network fetch early in cases where it is clear we won't receive useful data.
2023-10-16just-mr fetch: Fix exception on fetched data hash mismatchPaul Cristian Sarbu
After successfully fetching data over the network for an archive, if the optional checksums are not provided, the code will throw if there is a mismatch between the hash of the fetched data stream and the provided content hash. This commit fixes the issue by adding an additional check which properly handles the possible mismatch.
2023-10-06CreateExecutionApi: define a new library to avoid code duplicationAlberto Sartori
2023-09-22commit git map: Fix --fetch-absent storing incorrect tree associationPaul Cristian Sarbu
In order to not pollute builds, one should only store in the id file the association between a commit and its *root* tree. As the need for such a file only happens when asked to fetch absent roots, which should be a quite rare use case, we can request the whole tree of a commit to be served (incl. synced with remote execution) and perform the subdir tree extraction locally instead.
2023-09-22commit git map: Improve warning messagePaul Cristian Sarbu
2023-09-22fpath git map: Remove redundancy in warning messagePaul Cristian Sarbu
2023-09-22RemoteServeConfig: Remove problematic inheritancePaul Cristian Sarbu
This was causing the remote serve address to overwrite the one set for remote execution. Also, to keep things clean, some common remote server-related methods and definitions were moved into their own library.
2023-09-20just-mr: add option to override the absent pragmaKlaus Aehlig
Using absent repositories depends on a just-serve endpoint. As such, it is not a datum of the project, but one of the available infrastructure. As the latter can change independently of the project, it is desriable to have the option to specify those pieces of information in separate files.
2023-09-19just serve protocol: clean upKlaus Aehlig
Just like the remote-execution protocol has several services (Execution, ActionCache, ContentAddressableStorage, etc), so will the serve protocol: the actual target-level caching, as well auxilliary services, like the service to obtain the tree for a given root. Already follow that scheme, before the protocol gets part of any release. Also, move the status enum into the respective answer messages. In this way, we can have different enums for different requests without causing conflicts on the named enum constants.
2023-09-19ServeServerImpl: create and `git-init` StorageConfig::GitRoot() when the ↵Alberto Sartori
server is started
2023-09-15just-mr: ensure that after --fetch-absent a local build is possibleKlaus Aehlig
... by also keeping the map of commit to tree locally.
2023-09-15just serve: add remote execution endpoint and --fetch-absent optionPaul Cristian Sarbu
The serve service will communicate with this endpoint when needed, as well as ensure artifacts it provides are synced with the remote execution CAS, if requested by the client. If just-mr is given the --fetch-absent option, it Always produce present roots irrespective of the 'absent' pragma. For Git repositories marked with the 'absent' pragma, first try to fetch any commit trees provided by the serve endpoint from the execution endpoint CAS, before reverting to a network fetch. Co-authored-by: Klaus Aehlig <klaus.aehlig@huawei.com> Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
2023-09-15GitApi: implement RetrieveToCASAlberto Sartori
This functionality will be needed to upload git trees to a remote-execution end point by `just serve.
2023-09-13just-mr: Implement 'absent' rootsPaul Cristian Sarbu
...via an 'absent' pragma in repository descriptions. For 'git'-type repositories, first interrogates a 'just serve' remote, if given, before reverting to fetching from the network.
2023-09-13just serve: Add endpoint argumentsPaul Cristian Sarbu
2023-09-13just serve: Implement basic API handling service requestsPaul Cristian Sarbu