summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/bazel/bazel_api.hpp
AgeCommit message (Collapse)Author
9 daysClarify use of a clang-tidy checkPaul Cristian Sarbu
The google-default-arguments check normally imposes that virtual methods have no default arguments. For our use-cases, all implementations of such methods are expected to use the same default arguments, and thus this check is manually disabled via NOLINT comments. However, this is not done consistently. This commit cleans this up and clarifies our intent by: - removing the default values (and the NOLINT statement) for all implementations of virtual methods with default argument values, matching the desired intended behaviour, but - keeping the clang-tidy check for future cases where derived classes would want to provide each different defaults.
9 daysExecutionAPI: Support output_paths in requestsOliver Reiche
... and prepare local execution for clients using only RBEv2.1 (setting only output_paths).
2025-03-24ExecutionApi: Return TmpDirMaksim Denisov
2025-02-27ArtifactBlob: Move from execution_api/common to commonMaksim Denisov
2025-02-19IExecutionApi: Return supported HashFunction::TypeMaksim Denisov
2025-02-19Store HashFunction by valueMaksim Denisov
Although references give an additional information about ownership, they introduce additional design difficulties.
2025-02-11Name library containing ExecutionConfiguration more appropriatelyKlaus Aehlig
2025-02-07Rename artifact_blob_container to artifact_blobMaksim Denisov
2025-02-07Replace ArtifactBlobContainer and BazelBlobContainerMaksim Denisov
...with explicit std::unordered_set.
2025-02-07IExecutionApi: Rename IsAvailable to GetMissingDigestsMaksim Denisov
2025-02-07IExecutionApi: Use unordered_set in IsAvailableMaksim Denisov
2024-12-05execution api: support retrieving from more than one API, also for fdKlaus Aehlig
Extend the api to optionally accept a different API for preferred fetching. This is already supported when fetching to a file path; therefore, extend to keep the interface symmetric.
2024-11-14execution_api/remote: Implement IWYU suggestionsPaul Cristian Sarbu
2024-09-23Store HashFunction by const reference.Maksim Denisov
Despite the fact that HashFunction is a small type, it still makes sense to store it by reference to reflect the ownership. StorageConfig becomes the main holder. Reference holders store HashFunction by const ref and aren't allowed to change it. However, they are free to return HashFunction by value since this doesn't benefit readability anyhow.
2024-08-01Execution API: support cwdKlaus Aehlig
... following the remote-execution standard that all output paths (but none of the input paths) are relative to the working directory. Therefore, the executor has to do the path translation. For our implementation of the API interface - the local API now handles cwd correctly, - the remote API forwards cwd correctly, and - the git API continues to report actions as not implemented.
2024-07-22Pass HashFunction to BazelApiMaksim Denisov
2024-07-19Pass RetryConfig instance to BazelApiPaul Cristian Sarbu
2024-07-10ParallelRetrieveToCas: avoid duplicated requestsKlaus Aehlig
While no additional blob will be transferred, doing a request for missing blobs is still a request and, in particular, an unnecessary round trip. Therefore avoid this, by remembering what we synchronized already.
2024-07-04Replace the Auth and Auth::TLS singletonsPaul Cristian Sarbu
Use a builder pattern for creation and validation, in a manner that allows also other authentication methods to be added in the future besides the current TLS/SSL. The main Auth instances are built early and then passed by not_null const pointers, to avoid passing temporaries, replacing the previous Auth::TLS instances passed by simple nullable const pointers. Where needed, these passed Auth instances are also stored, by const ref. Tests also build Auth instances as needed, either with the default 'no certification' or from the test environment arguments.
2024-07-04Pass Auth::TLS instance to BazelApi and ServeApiPaul Cristian Sarbu
2024-06-27Use a raw pointer for passing optional IExecutionApiMaksim Denisov
...instead of std::optional<gsl::not_null<IExecutionApi const*>>
2024-06-25Introduce a type allias for an optional ptr to IExecutionApiMaksim Denisov
...and replace verbose constructions.
2024-06-25Pass IExecutionApi to IExecutionApi by referenceMaksim Denisov
...instead of not_null const ptr.
2024-06-25Mark IExecutionApi's methods constantMaksim Denisov
2024-05-28Use ArtifactBlobContainer in IExecutionApiMaksim Denisov
...instead of BazelBlobContainer to not bring bazel_re::Digest to IExecutionApi.
2024-05-28Move blob_tree to the common stage since it is used only there.Maksim Denisov
2024-05-28Rename BlobContainer to BazelBlobContainerMaksim Denisov
2024-05-23Execution APIs: Extract common implementation into separate libraryPaul Cristian Sarbu
This reduces the code duplication between the local and bazel APIs and improves code maintainability.
2024-03-26Add missing system includesPaul Cristian Sarbu
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>
2024-02-26Implement blob splicing protocol at just client sideSascha Roloff
2024-02-26Refactor split and splice implementations.Sascha Roloff
Currently, the implementations of the split and splice operation are both hidden behind the Bazel API implementation. This was sufficient to implement splitting at the server and splicing at the client. In order to support the other direction of splitting at the client and splicing at the server while reusing their implementations, the code needs to be refactored. First, the functionality of split and splice are explicitly exposed at the general execution API interface and implemented in the sub APIs. Second, the implementations of split and splice are factored into a separate utils class.
2024-01-24just: Wrap IExecutionApi raw pointer argumentsPaul Cristian Sarbu
...in accordance to our coding style.
2023-11-22Implement blob splitting protocol on just client sideSascha Roloff
2023-11-07Bazel API: implement ParallelRetrieveToCasKlaus Aehlig
... using thread-based parallelism for the blobs of each tree.
2023-09-13remote: Extract port parsing in own libraryPaul Cristian Sarbu
2023-07-27Execution API: support fetching a single artifact to memoryKlaus Aehlig
2023-04-26imports: Switch to Microsoft GSL implementationOliver Reiche
... 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.
2023-03-23execution api: support retrieving from more than one APIKlaus Aehlig
2022-11-24Fix root directory upload to honor tree invariant.Sascha Roloff
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-10-07LocalTreeMap: Prevent tree objects from being storedOliver Reiche
... to align with the original idea of caching a flat list of blob objects, without the need to recursively traverse any trees. Consequently, we cannot create any map entry in places where we do not have all sub-tree entries at hand (e.g., LocalAPI, BazelAPI, BazelResponse).
2022-09-13Fix build with gcc/g++Oliver Reiche
2022-09-12Introduced RetrieveToCas function in IExecutionApi to synchronize artifacts ↵Sascha Roloff
between different CASes
2022-08-05CLI: Add flag for dumping raw tree objectsOliver Reiche
2022-08-05Introduced batch availability check for remote execution apiSascha Roloff
2022-03-23Apply changes suggested by clang-format 11Oliver Reiche
2022-02-22Initial self-hosting commitKlaus Aehlig
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>