summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/local/config.hpp
AgeCommit message (Collapse)Author
2024-11-14execution_api remaining: Implement IWYU suggestionsPaul Cristian Sarbu
2024-07-16Remove the LocalExecutionConfig singletonPaul Cristian Sarbu
...and replace it with passed instances created early via a builder pattern.
2024-07-16Remove Data struct from LocalExecutionConfigPaul Cristian Sarbu
...to simplify the class and clarify the singleton pattern in preparation for its removal.
2023-11-30Resolve inconsistencies in third-party headers include formatPaul 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-01-20Move execution-backend-id calculation from target-level cache to local configSascha Roloff
This code movement is required to break a cyclic dependency coming with the introduction of the garbage collector. target_cache depends on garbage_collector and garbage_collector would depend on target_cache to determine the target-level-cache directory. After moving this calculation to a more general location, the cycle is broken.
2023-01-20Introduce multiple cache generationsSascha Roloff
2022-12-21Just-MR: Add utilities library for just-mrPaul Cristian Sarbu
2022-10-19Add generation directory as part of the just cache root.Sascha Roloff
This change is introduced to be prepared for future changes such as garbage collection. It is an incompatible change compared to earlier just versions since it modifies the local path to the just cache directory, where among others the CASes, action cache, target-level cache are located.
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-09-12fix the path of the local tree-cas for compatible modeAlberto Sartori
in daca274041e31636f08927b0cebc56fd33c7bbdf it has been added a local tree-cas. This cas is populated only when just runs in native mode. However, even in compatible mode, a tree must be looked for in the tree-cas. This patch set the path of the tree-cas to be the same of file-cas while running in compatible mode.
2022-07-05Remove option --persistentKlaus Aehlig
... as the --request-action-input option provides a clean way of restoring the inputs to a specific action, without the need of interacting with the internal directory structure of the tool. In particular, the new option also works for remote builds.
2022-06-13TargetCache: Initial implementationOliver Reiche
2022-04-27use kebab-case for all cmd line argsAlberto Sartori
2022-04-21add compatibility with original remote build protocolAlberto Sartori
2022-03-23Apply changes suggested by clang-tidy 11Oliver Reiche
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>