summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/main/version.cpp4
-rw-r--r--src/buildtool/serve_api/serve_service/target.cpp9
-rw-r--r--src/other_tools/just_mr/launch.cpp6
3 files changed, 15 insertions, 4 deletions
diff --git a/src/buildtool/main/version.cpp b/src/buildtool/main/version.cpp
index 1b5ece6a..68b73551 100644
--- a/src/buildtool/main/version.cpp
+++ b/src/buildtool/main/version.cpp
@@ -24,8 +24,8 @@
auto version() -> std::string {
static const std::size_t kMajor = 1;
static const std::size_t kMinor = 6;
- static const std::size_t kRevision = 0;
- std::string suffix = std::string{};
+ static const std::size_t kRevision = 1;
+ std::string suffix = "~beta";
#ifdef VERSION_EXTRA_SUFFIX
suffix += VERSION_EXTRA_SUFFIX;
#endif
diff --git a/src/buildtool/serve_api/serve_service/target.cpp b/src/buildtool/serve_api/serve_service/target.cpp
index 6df2382e..53f0ca87 100644
--- a/src/buildtool/serve_api/serve_service/target.cpp
+++ b/src/buildtool/serve_api/serve_service/target.cpp
@@ -679,6 +679,15 @@ auto TargetService::ServeTargetVariables(
// retrieve content of target file
std::optional<std::string> target_file_content{std::nullopt};
bool tree_found{false};
+ // Get repository lock before inspecting the root git cache
+ auto repo_lock =
+ RepositoryGarbageCollector::SharedLock(*local_context_.storage_config);
+ if (not repo_lock) {
+ auto msg = std::string("Could not acquire repo gc SharedLock");
+ logger_->Emit(LogLevel::Error, msg);
+ return ::grpc::Status{::grpc::StatusCode::INTERNAL, msg};
+ }
+
// try in local build root Git cache
if (auto res = GetBlobContent(local_context_.storage_config->GitRoot(),
root_tree,
diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp
index c085f5be..b1b918b2 100644
--- a/src/other_tools/just_mr/launch.cpp
+++ b/src/other_tools/just_mr/launch.cpp
@@ -91,13 +91,15 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file,
std::optional<std::pair<std::filesystem::path, std::string>> mr_config_pair{
std::nullopt};
+ // If gc locks are needed, ensure to keep them alive also for the exec call
std::optional<LockFile> lock{};
+ std::optional<LockFile> repo_lock{};
+
if (subcommand and kKnownJustSubcommands.contains(*subcommand)) {
auto const& flags = kKnownJustSubcommands.at(*subcommand);
// Read the config file if needed
if (flags.config) {
- auto repo_lock =
- RepositoryGarbageCollector::SharedLock(storage_config);
+ repo_lock = RepositoryGarbageCollector::SharedLock(storage_config);
if (not repo_lock) {
return kExitGenericFailure;
}