From 0d1223d10057c563f019fd4699a82e0af9da9111 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Mon, 16 Dec 2024 13:37:08 +0100 Subject: Remove unneeded compat_storage --- src/other_tools/ops_maps/git_tree_fetch_map.cpp | 24 +----------------------- src/other_tools/ops_maps/git_tree_fetch_map.hpp | 2 -- 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'src/other_tools/ops_maps') diff --git a/src/other_tools/ops_maps/git_tree_fetch_map.cpp b/src/other_tools/ops_maps/git_tree_fetch_map.cpp index f233fac7..d4e7c0f6 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.cpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.cpp @@ -43,7 +43,6 @@ namespace { void BackupToRemote(ArtifactDigest const& digest, StorageConfig const& native_storage_config, StorageConfig const* compat_storage_config, - Storage const* compat_storage, gsl::not_null const& local_api, IExecutionApi const& remote_api, GitTreeFetchMap::LoggerPtr const& logger) { @@ -54,7 +53,6 @@ void BackupToRemote(ArtifactDigest const& digest, MRGitApi{&repo, &native_storage_config, compat_storage_config, - compat_storage, compat_storage_config != nullptr ? &*local_api : nullptr}; if (not git_api.RetrieveToCas( {Artifact::ObjectInfo{.digest = digest, @@ -83,7 +81,6 @@ void MoveCASTreeToGit( gsl::not_null const& import_to_git_map, gsl::not_null const& native_storage_config, StorageConfig const* compat_storage_config, - Storage const* compat_storage, gsl::not_null const& local_api, IExecutionApi const* remote_api, bool backup_to_remote, @@ -117,7 +114,6 @@ void MoveCASTreeToGit( tree_hash, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, backup_to_remote, @@ -135,7 +131,6 @@ void MoveCASTreeToGit( BackupToRemote(native_digest, *native_storage_config, compat_storage_config, - compat_storage, local_api, *remote_api, logger); @@ -156,7 +151,6 @@ void TagAndSetRoot( ArtifactDigest const& digest, gsl::not_null const& native_storage_config, StorageConfig const* compat_storage_config, - Storage const* compat_storage, gsl::not_null const& critical_git_op_map, gsl::not_null const& local_api, IExecutionApi const* remote_api, @@ -179,7 +173,6 @@ void TagAndSetRoot( backup_to_remote, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, logger, @@ -195,7 +188,6 @@ void TagAndSetRoot( BackupToRemote(digest, *native_storage_config, compat_storage_config, - compat_storage, local_api, *remote_api, logger); @@ -217,7 +209,6 @@ void TakeTreeFromOlderGeneration( ArtifactDigest const& digest, gsl::not_null const& native_storage_config, StorageConfig const* compat_storage_config, - Storage const* compat_storage, GitCASPtr const& git_cas, gsl::not_null const& critical_git_op_map, gsl::not_null const& local_api, @@ -248,8 +239,7 @@ void TakeTreeFromOlderGeneration( logger, source, native_storage_config, - compat_storage_config, - compat_storage](auto const& values) { + compat_storage_config](auto const& values) { GitOpValue op_result = *values[0]; if (not op_result.result) { (*logger)("Tree tagging failed", /*fatal=*/true); @@ -277,7 +267,6 @@ void TakeTreeFromOlderGeneration( TagAndSetRoot(digest, native_storage_config, compat_storage_config, - compat_storage, critical_git_op_map, local_api, remote_api, @@ -306,7 +295,6 @@ auto CreateGitTreeFetchMap( ServeApi const* serve, gsl::not_null const& native_storage_config, StorageConfig const* compat_storage_config, - Storage const* compat_storage, gsl::not_null const& local_api, IExecutionApi const* remote_api, bool backup_to_remote, @@ -319,7 +307,6 @@ auto CreateGitTreeFetchMap( serve, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, backup_to_remote, @@ -350,7 +337,6 @@ auto CreateGitTreeFetchMap( serve, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, backup_to_remote, @@ -397,7 +383,6 @@ auto CreateGitTreeFetchMap( BackupToRemote(ArtifactDigest{key.tree_hash, 0}, *native_storage_config, compat_storage_config, - compat_storage, local_api, *remote_api, logger); @@ -427,7 +412,6 @@ auto CreateGitTreeFetchMap( ArtifactDigest{key.tree_hash, 0}, native_storage_config, compat_storage_config, - compat_storage, op_result.git_cas, critical_git_op_map, local_api, @@ -451,7 +435,6 @@ auto CreateGitTreeFetchMap( import_to_git_map, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, backup_to_remote, @@ -481,7 +464,6 @@ auto CreateGitTreeFetchMap( import_to_git_map, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, false, // tree already on remote, @@ -506,7 +488,6 @@ auto CreateGitTreeFetchMap( import_to_git_map, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, false, // tree already on remote, @@ -592,7 +573,6 @@ auto CreateGitTreeFetchMap( launcher, native_storage_config, compat_storage_config, - compat_storage, local_api, remote_api, backup_to_remote, @@ -734,7 +714,6 @@ auto CreateGitTreeFetchMap( [remote_api, native_storage_config, compat_storage_config, - compat_storage, local_api, backup_to_remote, key, @@ -756,7 +735,6 @@ auto CreateGitTreeFetchMap( ArtifactDigest{key.tree_hash, 0}, *native_storage_config, compat_storage_config, - compat_storage, local_api, *remote_api, logger); diff --git a/src/other_tools/ops_maps/git_tree_fetch_map.hpp b/src/other_tools/ops_maps/git_tree_fetch_map.hpp index 156e822a..7f698247 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.hpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.hpp @@ -27,7 +27,6 @@ #include "src/buildtool/multithreading/async_map_consumer.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" #include "src/buildtool/storage/config.hpp" -#include "src/buildtool/storage/storage.hpp" #include "src/other_tools/just_mr/progress_reporting/progress.hpp" #include "src/other_tools/ops_maps/critical_git_op_map.hpp" #include "src/other_tools/ops_maps/import_to_git_map.hpp" @@ -68,7 +67,6 @@ using GitTreeFetchMap = AsyncMapConsumer; ServeApi const* serve, gsl::not_null const& native_storage_config, StorageConfig const* compat_storage_config, - Storage const* compat_storage, gsl::not_null const& local_api, IExecutionApi const* remote_api, bool backup_to_remote, -- cgit v1.2.3