summaryrefslogtreecommitdiff
path: root/src/buildtool/common/repository_config.cpp
AgeCommit message (Collapse)Author
2025-06-04RepositoryConfig: Ensure consistency in reading blobs and treesPaul Cristian Sarbu
...with respect to rejecting invalid entries such as upwards symlinks. Also ensure that valid trees are only checked once by remebering known valid tress though marker files in local storage.
2024-12-19Remove FileRoot::ComputedRootMaksim Denisov
2024-12-19Support substitution of precomputed roots in RepositoryConfigMaksim Denisov
2024-11-21RepositoryConfig: support setting a computed rootKlaus Aehlig
2024-10-07Disable misc-no-recursion checkMaksim Denisov
...since we use recursion for trees a lot, but skip this check manually.
2024-09-11Return ArtifactDigest from RepositoryConfig::RepositoryKeyMaksim Denisov
...to prevent additional conversions to ArtifactDigest from plain strings.
2024-08-30Return ArtifactDigest from LocalCAS::StoreMaksim Denisov
2024-07-22Rename HashFunction methods and enumsMaksim Denisov
2024-07-22Use HashFunction from Storage in RepositoryConfigMaksim Denisov
2024-07-22Use HashFunction functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-07-05Pass Storage to RepositoryConfigMaksim Denisov
...and adjust AnalyseContext.
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-20Cleanup local CAS dependency for repository configSascha Roloff
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-08-05Modified artifact digest to provide wire digest on demandSascha Roloff
2022-06-20Repository representation: also use string as name in bindingsKlaus Aehlig
In this way, we keep the repsitory description more close to a normal multi-repository configuration. The only difference remaining is the absence of repository locations for git-tree roots.
2022-06-20Crypto: Add and use set of globally used hash functionsOliver Reiche
2022-06-13RepoConfig: Compute repository keyOliver Reiche