summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/commit_git_map.hpp
AgeCommit message (Collapse)Author
2025-01-23JustMr: CommitGitMap: Remove unused arguments.Maksim Denisov
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-10-07Enable readability-redundant-member-init check.Maksim Denisov
2024-07-23just-mr: Use progress instance in setup mapsPaul Cristian Sarbu
...instead of using the singleton.
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-02-20git repo fetch: support "inherit env"Klaus Aehlig
When fetching git repositories, just-mr routinely shells out to git. In this case, allow the user to specify via "inherit env", which environment variables from the host environment should be made available in this action. Typical variables to inherit are ones providing credentials, like SSH_AUTH_SOCK. As the repository description specifies the commit that will be taken, and hence the resulting tree, correctness is not affected by the environement leaking in here.
2024-01-26just-mr 'git' 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. To this end, for a 'git' repository we only set the root as absent if the serve endpoint knows already the root, it can set it up itself, or we can create the root locally without a network fetch and then upload it to the serve endpoint via the remote CAS. A network fetch 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-26root_maps: Small cleanup of includes and targets filePaul Cristian Sarbu
...for more easily readable and maintainable target descriptions.
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-11-15just-mr: Update to using the static methods of ServeApiPaul Cristian Sarbu
2023-11-14just-mr git fetch: Add logic for local mirrors and preferred hostnamesPaul Cristian Sarbu
2023-11-14just-mr: Add 'mirrors' field to 'git' repositoriesPaul Cristian Sarbu
2023-11-02Decoupling symlinks map and CAS utilities from just-mrPaul Cristian Sarbu
This is required in order to make them available to 'just serve' in a minimal just installation.
2023-09-15just serve: add remote execution endpoint and --fetch-absent optionPaul Cristian Sarbu
The serve service will communicate with this endpoint when needed, as well as ensure artifacts it provides are synced with the remote execution CAS, if requested by the client. If just-mr is given the --fetch-absent option, it Always produce present roots irrespective of the 'absent' pragma. For Git repositories marked with the 'absent' pragma, first try to fetch any commit trees provided by the serve endpoint from the execution endpoint CAS, before reverting to a network fetch. Co-authored-by: Klaus Aehlig <klaus.aehlig@huawei.com> Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
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-05-31git repos: Add option for ignore-special rootPaul Cristian Sarbu
2023-03-23just-mr: Add git binary optionPaul Cristian Sarbu
In the rare cases that we need to shell out to git, let the user configure what binary to use. Option resolves in the same way as the just executable, including allowing it to be set via just-mrrc. Updates all cases of shelling out to git (fetch and commit update). Update just-mr and just-mrrc docs accordingly.
2023-03-22just-mr: Shell out to system Git for fetches over SSH...Paul Cristian Sarbu
...due to limited SSH support in libgit2. In order to allow the fetches to still be parallel, we execute: git fetch --no-auto-gc --no-write-fetch-head <repo> [<branch>] This only fetches the packs without updating any refs, at the slight cost of sometimes fetching some redundant information, which for our purposes is practically a non-issue. (If really needed, a 'git gc' call can be done eventually to try to compact the fetched packs, although a save in disk space is not actually guaranteed.)
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-06CommitGitMap: Move helper function out of header filePaul Cristian Sarbu
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-02-27Just-MR: Whitespace fixesSascha Roloff
2023-01-24commit_git_map: Clean up passed arguments in EnsureCommitPaul Cristian Sarbu
2022-12-23Just-MR: Fix wrong commit_git_map keyPaul Cristian Sarbu
The subdir is required alongside the commit hash for a valid map key when importing a Git repository into our Git cache.
2022-12-21Just-MR: Add commit to WS root git mapPaul Cristian Sarbu