summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps/repo_fetch_map.cpp
AgeCommit message (Collapse)Author
2023-12-07just-mr fetch: Clarify naming of current fetch async mapPaul Cristian Sarbu
As preparatory step for extending the types of repositories that are targeted by a just-mr fetch subcommand, names of certain variables and of the currently only fetch operation async map were changed to clarify that they only target archives.
2023-08-25just-mr fetch: Allow to back up fetched archives to a given remote CASPaul Cristian Sarbu
2023-08-07just-mr maps: Clean up remnants from progress reporting reworkPaul Cristian Sarbu
2023-03-20just-mr: Fix fetch cache conditionPaul Cristian Sarbu
2023-03-20just-mr: rework progress reporting and statisticsKlaus Aehlig
To avoid unnecessary work, just-mr uses on-disk caches, including for the mapping of a distdir to the corresponding git tree. This, however, implies that the number of repositories that are actually considered varies: in order to fetch a distdir repository, all involved archives have to be fetched, but if we have a cache hit none of them is even looked at. So, in order to have a consistent reporting only count top-level targets (i.e., the reachable repositories) in the statistics, not the archives implicitly contained in a distdir, nor low-level sub tasks. The actual fetch acitvity is shown separately by the task tracker.
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-02-27Just-MR: Add progress reporting for fetch commandPaul Cristian Sarbu
Co-authored-by: Sascha Roloff <sascha.roloff@huawei.com>
2023-01-20Move file_storage.hpp to file_system subdirectorySascha Roloff
2023-01-16just-mr fetch: fix overwriting distfilesKlaus Aehlig
Both, the python script as well as the compiled variant of just-mr fetch try to overwrite already existing distfiles in the distdir. While it is unclear if overwriting existing distfiles or not copying to distdir if a file with that name already exists is the better behaviour, we at least should not error out, as the compiled just-mr currently does as it sets permission to 444 and hence cannot overwrite later; fix this by addwing owner write permissions before overwriting.
2022-12-21Just-MR: Add archive fetch mapPaul Cristian Sarbu