summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api
AgeCommit message (Collapse)Author
2024-04-12file chunker: increase chunk sizesKlaus Aehlig
As we use chunking also for reducing storage, we have to consider the overhead of block devices which is in the order of kB per file. So our target chunk size should be at least 2 orders of magnitude above this. This suggests to minimally aim for a chunk size of 128kB, a target size that also has the advantage the that maximal chunk size associated with this size is 1MB which is still well below the maximal transmission size of grpc allowing us to avoid the streaming API. As we're scaling everything up by a factor of 16, we also have to increase the number of bits in the involved masks by 4. We use this to also extend the window size by using the 2 most significant octets. Following the advice of the paper proposing FastCDC to spread out the ones roughly equally suggests 0x4444 as a suitable value for the two most significant octets. We also change the suggested extension of the remote-execution API accordingly. As the precise parameters for FastCDC when announced over the remote-execution APIs are still under discussion upstream, we simplify the name to not mention the target size.
2024-04-08Use properly included standard library types by defaultPaul Cristian Sarbu
2024-04-08Consistently guard all POSIX C includesPaul Cristian Sarbu
2024-04-02LargeBlobs: Use LocalCAS methods to implement split-splice logic of CASUtils.Maksim Denisov
2024-04-02Move file chunker to storage.Maksim Denisov
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-03-13BytestreamServer: also use the correct interface function for tmp dirsKlaus Aehlig
... so that any updates of the local-build-root layout are correctly taken into account. In particular, this change also moves the temporary directory under the emphemeral root, allowing more quick clean up. Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
2024-03-13Move storage-aware tmpdir creation to configKlaus Aehlig
... as the fs_utils have a lot more dependencies making them usable in less places. Moreover, this function also serves to shape the layout of the local build root and hence is more appropriately placed in the config anyway.
2024-03-08SystemCommand: Transfer outfile responsibility to callerOliver Reiche
2024-03-07Down-level log message for errors that can be handledKlaus Aehlig
We deliberately have many functions that do not abort the process on failure and instead simply return a corresponding value. It is then up to the caller to decide how to handle this failure; in particular, such a failure can be expected, e.g., if we try to fetch a file from remote execution first, before fetching it from the upstream location. To have a consistent user experience, nothing that can occur in a successfull build should be reported at error level; moreover, messages that routinely occur during successfull builds should not be reported at progress or above, except for the (stage) result messages and the progress reporter.
2024-02-26Employ blob splitting and splicing for endpoint dispatchingSascha Roloff
2024-02-26Implement blob splitting in local APISascha Roloff
2024-02-26Implement blob splicing protocol at just client sideSascha Roloff
2024-02-26Implement blob splicing protocol at just server sideSascha Roloff
2024-02-26Implement blob chunking algorithm negotiationSascha Roloff
2024-02-26Unify error logging in just execute BatchUpdateBlobsSascha 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-02-26Rename constant for just-internal hash lengthSascha Roloff
2024-02-26Remove upper and lower bounds for FastCDC random-number generationSascha Roloff
2024-02-26Initialize file chunker in mainSascha Roloff
2024-02-15Replace glibc sync stubs when linking pthreadsOliver Reiche
... glibc provides synchronization stubs for single-threaded environments as weak symobls. When linking pthreads, these weak symbols must be replaced by the strong symbols provided by the pthread library. For dynamically linking pthreads, this is done automatically. However, to support this for static linking, we must ensure to link the whole archive.
2024-02-13local_api: also for retrieve to memory, consult git api as fallbackKlaus Aehlig
2024-01-24just: Wrap IExecutionApi raw pointer argumentsPaul Cristian Sarbu
...in accordance to our coding style.
2024-01-19Add tree invariant check for just execute, when uploading treesSascha Roloff
2024-01-19Add digest validity check to the blob split commandSascha Roloff
2024-01-19Fix digest consistency check to also compare sizesSascha Roloff
2024-01-08bugfix: Add missing return in SetRemoteExecutionDispatchPaul Cristian Sarbu
This was a source of occasional std::bad_variant_access exceptions.
2023-12-21BazelCasClient: remove dead code.Alberto Sartori
The removed code has been superseeded by the CreateBatchRequestsMaxSize member function.
2023-12-21BazelCasClient::DoUploadBlobs: returns the count of the uploaded blobs...Alberto Sartori
...instead of the vector containing the digests of the uploaded blobs. The returned vector was never inspected by the callers, except for its size. The tests have been accordingly amended.
2023-12-21BazelNetwork: simplify logic of DoUploadBlobsAlberto Sartori
2023-12-21BazelCasClient: split DoBatchUploadBlobs into multiple calls...Alberto Sartori
...to honor the message limit imposed by GRPC.
2023-12-21BazelCasClient: split BatchReadBlobs into multiple calls...Alberto Sartori
...to honor the maxBatchTransferSize in grpc calls.
2023-12-21BazelCasClient: Split FindMissingBlobs in multiple batches...Alberto Sartori
...such that each request does not exceeds the message limit imposed by GRPC.
2023-12-21SplitBlob: improve error message in case of a failureAlberto Sartori
2023-12-21BazelCasClient: define new templated CreateBatchRequestsMaxSize member function.Alberto Sartori
This function will ensure that each request does not exceeds the maximum message size, currently set by kMaxBatchTransferSize in the message_limits library.
2023-12-21BazelCasClient::UpdateSingleBlob: Emit a log entry upon failureAlberto Sartori
2023-12-21bazel_network: use message_limits libraryAlberto Sartori
2023-12-21src/buildtool/execution_api/commmon: add message_limits libraryAlberto Sartori
Define the threshold for the grpc messages.
2023-12-13bazel client: use the retry strategy, provided by the retry lib, when doing ↵Alberto Sartori
the rpc calls.
2023-12-13bytestream client: log more info in case of a failureAlberto Sartori
2023-12-13Add debug output for blob splittingSascha Roloff
2023-12-12execution_api: Move dispatch file parser into separate utilityPaul Cristian Sarbu
2023-12-12Filesystem: Fix copy overwrite of symlink with fileOliver Reiche
... and improve log messages in case of failure.
2023-11-30Resolve inconsistencies in third-party headers include formatPaul Cristian Sarbu
2023-11-30local API: Implement upload fileKlaus Aehlig
... overriding the default implementation. In this way, files can be added directly to the local CAS without having to completely reside in memory.
2023-11-30Splice blobs on diskKlaus Aehlig
When using blob splitting, we expect to create a potentially large file. Therefore reconstruct it from its parts on disk rather than keeping the whole file in memory.
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-22LocalAction: Fix staging of empty treesOliver Reiche