summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/execution_server.cpp
AgeCommit message (Collapse)Author
9 daysExecutionService: Support RBE protocol v2.1Oliver Reiche
9 daysExecutionService: Use LocalApi directlyOliver Reiche
2025-06-04Execution server: Let the underlying API handle invalid entriesPaul Cristian Sarbu
The execution server itself should not consider anything special in setting the response message to the client, instead let the underlying API fail or not during collection.
2025-03-10just execute: set basic timing meta dataKlaus Aehlig
While there, increase the time precision to nanoseconds, which is the resolution of the underlying timestamp proto.
2024-12-19Remove unnecessary movesOliver Reiche
2024-11-14execution_api/execution_service: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-08Name static constants using kCamelCase.Maksim Denisov
2024-10-07Enable cppcoreguidelines-* checks.Maksim Denisov
2024-09-16remote execution: Check validity of symlinksPaul Cristian Sarbu
Invalid entries, currently all upwards symlinks (pending implementation of a better way of handling them), are now identified and handled properly: in compatible mode on the client side, during handling of remote response, and in native mode on the server side during the population of the action result.
2024-09-16execution_response: Allow failures to be reported while populatingPaul Cristian Sarbu
As populating the containers from remote response only takes place once, no assumptions should be made that this cannot fail (for example if wrong or invalid entries were produced). Instead, return error messages on failure to callers that can log accordingly.
2024-09-13Remove std::move of const value and avoid non-movable intermediate variablesKlaus Aehlig
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 ExecutionServiceImplMaksim Denisov
2024-09-09Introduce minor fixes to ExecutionServiceImplMaksim Denisov
1. Mark local variables const if needed; 2. Remove redundant fmt::format calls.
2024-08-30Cast ArtifactDigest to bazel_re::Digest explicitlyMaksim Denisov
...to simplify further refactoring.
2024-08-30Replace bazel_re::Digest in LocalACMaksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in LocalCAS::{...}PathMaksim Denisov
...with ArtifactDigest.
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-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-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-06-25Pass IExecutionApi to ServerImpl, Archive by referenceMaksim Denisov
...instead of not_null const ptr.
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-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
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-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-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-03-06Execution server: Fix OutputDirectory generation in compatible modeSascha Roloff
2023-02-15execution service: use alias namespaceAlberto Sartori
2023-02-15just-execute: report un-tagged hashesAlberto Sartori
2023-02-15ExecutionServiceImpl: refactor ExecuteAlberto Sartori
2023-02-15just execute: add more logs during executionAlberto Sartori
2023-02-15just execute: add action's stdout and stderr to cas...Alberto Sartori
so that they can also be reported on the client side
2023-02-10just execute: bugfix: honor do_not_cache booleanAlberto 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>