summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api
AgeCommit message (Collapse)Author
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-28Use TransformedRange in BlobContainerMaksim Denisov
...instead of various iterators.
2024-05-28Copy digest before emplacing in BlobContainerMaksim Denisov
...fixing potentially dangerous code (evaluation order is unspecified).
2024-05-28Move CreateBlobFromPath since it is only used in tests.Maksim Denisov
2024-05-27Fix headers in local_cas and bazel_network.Maksim Denisov
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-23bazel_api: Remove extra complexity in RetrieveToCasSplittedPaul Cristian Sarbu
We can avoid doing extra work in converting between bazel digests and artifact digests by actually using the API interface.
2024-05-22Avoid memory usage duplicationMaksim Denisov
2024-05-22Remove unused codeMaksim Denisov
2024-05-21Ignore corrupted blobs during transfer while reading.Maksim Denisov
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-05-15logging: Do not make assumptions in emit callsPaul Cristian Sarbu
The Emit method of the Logger class, when called with a string as second argument, expects it to be a format string. It should be considered a programming error to pass a string variable as that argument without knowing for certain that it does not contain any format escape character ('{', '}'); instead, one should be conservative and use the blind format string "{}" as second argument and pass the unknown string variable as third argument.
2024-04-29bazel_response: Report failure to read stdout/stderr blobs of an actionPaul Cristian Sarbu
2024-04-29bazel_execution_client: Replace protobuf map use with STLPaul Cristian Sarbu
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.