summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/cas_server.cpp
AgeCommit message (Collapse)Author
2024-11-14execution_api/execution_service: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-08Name static constants using kCamelCase.Maksim Denisov
2024-09-19Unify logic of adding to CAS in ByteStreamServer and CASServerMaksim Denisov
...by calling the generalized CASUtils's implementation.
2024-09-13Check compatibility in execution services based on the hash typeMaksim Denisov
2024-09-13Rename Compatibility class to ProtocolTraitsMaksim Denisov
...and move it to the common stage.
2024-09-09Validate hashes in CASServiceImplMaksim Denisov
2024-09-09Introduce minor fixes to CASServiceImplMaksim Denisov
1. Mark local variables constant if needed; 2. Remove redundant fmt::format calls; 3. Acquire storage's lock after conversion of data.
2024-08-30Cast ArtifactDigest to bazel_re::Digest explicitlyMaksim Denisov
...to simplify further refactoring.
2024-08-30Replace bazel_re::Digest in CASUtilsMaksim Denisov
...with ArtifactDigest
2024-08-30Return the IsTree flag from ArtifactDigestMaksim Denisov
...and replace obvious redundant conversions to bazel_re::Digest, which were done to ensure that the digest represents a tree.
2024-08-07Remove code duplication from CasServerMaksim Denisov
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
2024-07-05Pass StorageConfig and Storage to ServerImplMaksim Denisov
2024-07-05Pass StorageConfig to GarbageCollector::SharedLockMaksim Denisov
2024-06-28Use (un)expected for CAS utilsOliver Reiche
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-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-02LargeBlobs: Use LocalCAS methods to implement split-splice logic of CASUtils.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-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-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
2023-11-22Implement blob splitting protocol on just server sideSascha Roloff
2023-11-15just-execute: verify the validity of all the hashes received over the wireAlberto Sartori
2023-09-01fmt: Fix includes to only bring in the core APIPaul Cristian Sarbu
There is no need to use the full format API, so avoid increasing the compile time gratuitously.
2023-07-05just execute: log blob uploads at trace levelKlaus Aehlig
2023-03-13Storage: Reworked storage and garbage collectionOliver Reiche
The improved GC implementation uses refactored storage classes instead of directly accessing "unknown" file paths. The required storage class refactoring is quite substantial and outlined in the following paragraphs. The module `buildtool/file_system` was extended by: - `ObjectCAS`: a plain CAS implementation for reading/writing blobs and computing digests for a given `ObjectType`. Depending on that type, files written to the file system may have different properties (e.g., the x-bit set) or the digest may be computed differently (e.g., tree digests in non-compatible mode). A new module `buildtool/storage` was introduced containing: - `LocalCAS`: provides a common interface for the "logical CAS", which internally combines three `ObjectCAS`s, one for each `ObjectType` (file, executable, tree). - `LocalAC`: implements the action cache, which needs the `LocalCAS` for storing cache values. - `TargetCache`: implements the high-level target cache, which also needs the `LocalCAS` for storing cache values. - `LocalStorage`: combines the storage classes `LocalCAS`, `LocalAC`, and `TargetCache`. Those are initialized with settings from `StorageConfig`, such as the build root base path or number of generations for the garbage collector. `LocalStorage` is templated with a Boolean parameter `kDoGlobalUplink`, which indicates that, on every read/write access, the garbage collector should be used for uplinking across all generations (global). - `GarbageCollector`: responsible for garbage collection and the global uplinking across all generations. To do so, it employs instances of `LocalStorage` with `kDoGlobalUplink` set to false, in order to avoid endless recursion. The actual (local) uplinking within two single generations is performed by the corresponding storage class (e.g., `TargetCache` implements uplinking of target cache entries between two target cache generations etc.). Thereby, the actual knowledge how data should be uplinked is implemented by the instance that is responsible for creating the data in the first place.
2023-03-10execution service: implement WaitExecution and ↵Alberto Sartori
google::longrunning::Operations::GetOperation For each action that is executed, an entry is added to a shared thread safe cache. Once the number of operations stored exceeds twice 2^n, where n is given by the option --log-operations-threshold, at most 2^n operations will be removed, in a FIFO scheme.
2023-02-28execution service: BatchUpdateBlobs check consitency of requested digestsAlberto Sartori
2023-02-15execution service: use alias namespaceAlberto Sartori
2023-02-15just-execute: report un-tagged hashesAlberto Sartori
2023-02-02execution-service: add new subcommand executeAlberto Sartori
This subcommand starts a single node remote execution service honoring the just native remote protocol. If the flag --compatible is provided, the execution service will honor the original remote build execution protocol. New command line args supported by this subcommand: -p,--port INT: Execution service will listen to this port. If unset, the service will listen to the first available one. --info-file TEXT: Write the used port, interface, and pid to this file in JSON format. If the file exists, it will be overwritten. -i,--interface TEXT: Interface to use. If unset, the loopback device is used. --pid-file TEXT Write pid to this file in plain txt. If the file exists, it will be overwritten. --tls-server-cert TEXT: Path to the TLS server certificate. --tls-server-key TEXT: Path to the TLS server key. Co-authored by: Klaus Aehlig <klaus.aehlig@huawei.com>