summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service
AgeCommit message (Collapse)Author
2024-08-27bytestream server: also enforce the tree invariantKlaus Aehlig
2024-08-27Bytestream server: verify hash of uploaded objectKlaus Aehlig
... and correctly report the error. - If we cannot store the bytes we received, this is an internal error. - If the bytes received have a different hash than announced, report this user error as INVLID_ARGUMENT.
2024-08-27Reformat code to comply with clang-format 18Klaus Aehlig
... while keeping our .clang-format file.
2024-08-07Remove code duplication from CasServerMaksim Denisov
2024-08-07Pass a longrunning operation to ExecutionServer::WriteResult by rvalueMaksim Denisov
2024-08-07ExecutionServer: use one method for conversion to IExecutionActionMaksim Denisov
2024-08-07ExecutionServer: use one method for conversion to bazel ExecuteResponseMaksim Denisov
2024-08-07ExecutionServer: Move creation of ActionResult to a static functionMaksim Denisov
2024-08-07ExecutionServer: move creation of bazel instances to functionsMaksim Denisov
2024-08-07Remove ExecutionServiceImpl::StoreActionResult methodMaksim Denisov
...and move the storing logic to Execute directly. There is no need to pass additional parameters to the method to just perform a check inside, and after this removal there is no need to preserve a one-line method.
2024-08-07Use expected to return errors from ExecutionServiceImpl's methodsMaksim Denisov
2024-08-07ExecutionServer: remove redundant scopesMaksim Denisov
2024-08-07Refactor read/write logic in BytestreamServerMaksim Denisov
1. In reading remove additional buffer field and reuse the response's buffer; 2. In writing preserve the file descriptor alive.
2024-08-07Generate bazel trees in LocalCasReaderMaksim Denisov
...and use this functionality in ExecutionServer
2024-08-07Avoid deep copies of containers in responses.Maksim Denisov
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
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-30Pass RemoteContext to execution serverPaul Cristian Sarbu
2024-07-30Use LocalContext in execution and serve servicesPaul Cristian Sarbu
The context is passed by not_null const pointer in order to avoid binding to temporaries, and it or parts of it get stored by const ref where needed.
2024-07-22Make ServerImpl a general class, not singletonPaul Cristian Sarbu
2024-07-19Make OperationCache a general class, not singletonPaul Cristian Sarbu
As it is used by just execute only, instantiate it inside the ExecutionServer, which reads and writes to the cache map, and pass a const ref to OperationsServer, which only queries.
2024-07-05Pass StorageConfig and Storage to ServerImplMaksim Denisov
2024-07-05Pass StorageConfig to GarbageCollector::SharedLockMaksim Denisov
2024-07-05Use StorageConfig functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
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-04Use ApiBundle's Auth::TLS instance in serve and execute serversPaul Cristian Sarbu
2024-07-04Use Auth and TLS configurations via Instance()Paul Cristian Sarbu
...to more easily keep track of changes during refactoring.
2024-06-28Use (un)expected for CAS utilsOliver Reiche
2024-06-28Use (un)expected for CAS accessOliver Reiche
2024-06-25Pass IExecutionApi to ServerImpl, Archive by referenceMaksim Denisov
...instead of not_null const ptr.
2024-06-25Pass ApiBundle to ServerImplMaksim Denisov
2024-06-17Use c++20 standard in clang-formatMaksim Denisov
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-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-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.