From 4392b0de9b77d750f4c531c167ab008237cfde1a Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 20 Jun 2024 11:42:05 +0200 Subject: Pass ApiBundle to add-to-cas and install-cas --- src/buildtool/main/add_to_cas.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/buildtool/main/add_to_cas.cpp') diff --git a/src/buildtool/main/add_to_cas.cpp b/src/buildtool/main/add_to_cas.cpp index 711a31bf..984c2007 100644 --- a/src/buildtool/main/add_to_cas.cpp +++ b/src/buildtool/main/add_to_cas.cpp @@ -23,14 +23,13 @@ #include "src/buildtool/compatibility/native_support.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_msg_factory.hpp" -#include "src/buildtool/execution_api/local/local_api.hpp" +#include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/storage/storage.hpp" -auto AddArtifactsToCas(ToAddArguments const& clargs, - gsl::not_null const& remote_api) +auto AddArtifactsToCas(ToAddArguments const& clargs, ApiBundle const& apis) -> bool { auto const& cas = Storage::Instance().CAS(); @@ -108,7 +107,7 @@ auto AddArtifactsToCas(ToAddArguments const& clargs, auto object = std::vector{ Artifact::ObjectInfo{ArtifactDigest(*digest), *object_type, false}}; - if (not LocalApi().RetrieveToCas(object, remote_api)) { + if (not apis.local->RetrieveToCas(object, &*apis.remote)) { Logger::Log(LogLevel::Error, "Failed to upload artifact to remote endpoint"); return false; -- cgit v1.2.3