summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common
AgeCommit message (Collapse)Author
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-25Make IExecutionApi::Ptr a shared pointer to constMaksim Denisov
...and use it in ApiBundle.
2024-06-25Pass IExecutionApi to IExecutionApi by referenceMaksim Denisov
...instead of not_null const ptr.
2024-06-25Mark IExecutionApi's methods constantMaksim Denisov
2024-06-25Remove CreateExecutionApiMaksim Denisov
2024-06-25Instantiate LocalApi and BazelApi at onceMaksim Denisov
...to properly fallback to local api if needed.
2024-06-07Remove unused code.Maksim Denisov
IExecutionApi::UploadFile was introduced to handle adding of a temporary file to the storage. The call was redirected to LocalCAS internal methods that do the similar thing, so this virtual method can be removed.
2024-06-04blob containers: Store and upload taking into account content sizePaul Cristian Sarbu
Update logic populating containers to use the new method which is aware of the maximum transfer limit.
2024-06-04common_api: Add method to help limit memory footprint of containers...Paul Cristian Sarbu
...by proactively calling the Upload method for large blobs and containers as soon as the transfer limit is reached.
2024-06-04ContentBlobContainer: Add content size fieldPaul Cristian Sarbu
As the ContentBlobContainer is used to store actual content needed to be transferred, it is useful to automatically keep track of the running (bytes) size of the data being stored.
2024-05-28Use shared_ptr for data in ContentBlobMaksim Denisov
...to reduce the "price" of copying.
2024-05-28Use ArtifactBlobContainer in IExecutionApiMaksim Denisov
...instead of BazelBlobContainer to not bring bazel_re::Digest to IExecutionApi.
2024-05-28Use ArtifactBlob in BlobTree instead of BazelBlob.Maksim Denisov
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-28Convert BlobContainer to a templateMaksim Denisov
...where the template parameter is the type of a digest.
2024-05-27Use common interface for stream dumpingMaksim Denisov
...in LocalApi and BazelApi.
2024-05-27Use common interface for reading tree entries and leafsMaksim Denisov
...in LocalApi and BazelApi.
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-05-23execution_api: Cleanup of includesPaul Cristian Sarbu
2024-05-17RepositoryConfig: Instance should not be changed once populatedPaul Cristian Sarbu
Once a RepositoryConfig instance gets populated, it must never be changed again. Therefore, all functions accepting these instances should only take them as pointers to const.
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-03-15Clean up more includes and targetsPaul Cristian Sarbu
Some of the more specific issues addressed: - missing log_level target/include - header-only libs wrongly marking deps as private - missing/misplaced gsl includes
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-12-21src/buildtool/execution_api/commmon: add message_limits libraryAlberto Sartori
Define the threshold for the grpc messages.
2023-11-30remote API: support uploading files from the file systemKlaus Aehlig
Allow implementations to have a specialized way of uploading a file owned by the build process to the applicable cas, both as file, as well as as tree object (in native mode). If no implementation is provided, the default is to read the file into memory and use the Upload method.
2023-11-27Refactoring RepositoryConfigPaul Cristian Sarbu
With the introduction of 'just serve', export targets can now be built also independently from one another based on their corresponding minimal repository configuration, as stored in the target cache key. In this context, this commit changes the RepositoryConfig usage from one global (static) instance to pointers passed as necessary throughout the code.
2023-11-22Implement blob splitting protocol on just client sideSascha Roloff
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-10-06CreateExecutionApi: define a new library to avoid code duplicationAlberto Sartori
2023-07-27Execution API: support fetching a single artifact to memoryKlaus Aehlig
2023-06-26Execution response: Add output symlink pathsPaul Cristian Sarbu
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
2023-02-02bytestream_client: use common header with settings shared by both server and ↵Alberto Sartori
client
2022-11-21Use the newly-added concept of private-depsKlaus Aehlig
While there, also add all direct dependencies explicitly; using directly dependencies that are pulled in only indireclty causes problems from a maintainability point of view.
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: Drop the use of the map entirelyOliver Reiche
... as for remote execution, the map entries are only used for the `install` subcommand. For local execution, much less tree objects are read from CAS when using this map. However, the performance benefit is barely measurable and therefore we rather remove this map entirely to reduce complexity.
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-12Introduced RetrieveToCas function in IExecutionApi to synchronize artifacts ↵Sascha Roloff
between different CASes
2022-08-05LocalExecution: Use Git tree formatOliver Reiche
- LocalStorage Add tree CAS and support reading Git trees - LocalAction: Create Git tree for output directory - LocalApi: Support availability and upload of Git trees - LocalStorage: Support dumping tree to stream in native mode
2022-08-05CLI: Add flag for dumping raw tree objectsOliver Reiche
2022-08-05Introduced batch availability check for remote execution apiSascha Roloff
2022-06-20Crypto: Add and use set of globally used hash functionsOliver Reiche
2022-04-21add compatibility with original remote build protocolAlberto Sartori
2022-03-23Apply changes suggested by clang-tidy 11Oliver Reiche
2022-03-23Apply changes suggested by clang-format 11Oliver Reiche
2022-03-16Format: Apply compact JSON formattingOliver Reiche