summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/distdir_git_map.hpp
AgeCommit message (Collapse)Author
2025-01-23JustMr: DistdirGitMap: Use serve callsMaksim Denisov
...instead of EnsureAbsentRootOnServe. And remove unused arguments.
2024-12-19Remove unneeded compat_storageOliver Reiche
2024-11-14other_tools/repo_map,root_maps: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-25just-mr and SourceTree: Use new Git execution api instancePaul Cristian Sarbu
In just-mr: to instantiate the new Git api instance, both storage configs, as well as the compatible storage, need to be passed to the maps. While there, use more explicit naming schemes for the storage and CAS instances used. In serve: also acquire gc locks for the local storages when needed to instantiate the new Git api, which now has access to the CAS. In all these instances we also pass, as needed, the local api, which currently still operates only in native mode. This makes no difference currently, but will ensure less changes needed when the future compatible-aware local api will be used instead.
2024-07-05Pass StorageConfig and Storage to just-mr mapsMaksim Denisov
2024-06-27Pass ServeApi to just-mr maps by raw pointerMaksim Denisov
...since it is used for capturing in lambdas for AsyncMaps and mustn't be temporary.
2024-06-27Use a raw pointer for passing optional IExecutionApiMaksim Denisov
...instead of std::optional<gsl::not_null<IExecutionApi const*>>
2024-06-25Introduce a type allias for an optional ptr to IExecutionApiMaksim Denisov
...and replace verbose constructions.
2024-06-25Use constant IExecutionApi in just-mr mapsMaksim Denisov
2024-06-18Make ServeApi a general class, not a singletonMaksim Denisov
...and adjust interfaces.
2024-06-18Pass ServeApi to just-mr maps by referenceMaksim Denisov
...instead of using singleton calls.
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-01-26just-mr 'distdir' repository: Absent roots sync with serve endpointPaul Cristian Sarbu
To take advantage of absent roots, we need to ensure that a given serve endpoint can build against the tree of this generated root. For a 'distdir' repository we can know the resulting tree identifier directly without actually needing to fetch anything. Therefore, we only set the root as absent if the serve endpoint knows already this tree, if it can set it up itself, or if we can provide this tree to the serve endpoint from one of our CAS locations (local or remote), based on our tree invariant guarantee. A network fetch of the archives never gets performed for an absent root. If a serve endpoint is not provided, an absent root can still be generated, but only if no network fetches are required. In this case a warning is emitted.
2024-01-26just-mr async maps: Wrap passed raw pointersPaul Cristian Sarbu
This is to uphold the coding style guide we employ.
2024-01-08just-mr distdir: Improved handling of absent rootPaul Cristian Sarbu
If root is marked absent and we're not asked to fetch absent, we can compute the resulting distdir root tree in-memory, as we have all the information. Otherwise, i.e., if we actually need to have the archives locally, we first check if the remote serve can provide them in the remote CAS before continuing as before to fetch the listed archives one at a time.
2023-12-19other_tools: Fix missing includes of direct dependenciesPaul Cristian Sarbu
This fixes the multiple instances of (mainly) missing or wrong includes of standard, third-party, and own headers in the other_tools source folder.
2023-09-13just-mr: Implement 'absent' rootsPaul Cristian Sarbu
...via an 'absent' pragma in repository descriptions. For 'git'-type repositories, first interrogates a 'just serve' remote, if given, before reverting to fetching from the network.
2023-08-07just-mr: Set ignore-special roots via a pragma...Paul Cristian Sarbu
...instead of a regular field. Also removes the ignore-special logic from distdir repositories, as those will never contain symlinks, so no entries would be ignored.
2023-05-31distdir repos: Add option for ignore-special rootPaul 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-02-27Just-MR: Extend ops and root maps keys with fields needed in progress reportingPaul Cristian Sarbu
In order to only report actual work, the name of the repository for which work is actually done needs to be known to certain AsyncMaps used by just-mr. Also, fetches not originating in a distdir repo checkout need to be counted additionally, so an additional flag was needed for the content_cas_map.
2023-01-10Just-MR: Fix distdir computation in internal just-mrPaul Cristian Sarbu
This provides the fix already performed for the just-mr script in the internal just-mr as well. In short, this fix makes sure that the computation of the content key for distdir repositories is independent of the presence of the respective archives in CAS.
2022-12-21Just-MR: Add distdir to WS root git mapPaul Cristian Sarbu