diff options
-rw-r--r-- | CHANGELOG.md | 14 | ||||
-rwxr-xr-x | doc/invocations-http-server/server.py | 2 | ||||
-rw-r--r-- | src/buildtool/main/version.cpp | 4 | ||||
-rw-r--r-- | src/buildtool/serve_api/serve_service/target.cpp | 9 | ||||
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 6 |
5 files changed, 30 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5de90d60..47771d0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## Release `1.6.1` (UNRELEASED) + +Bug fixes on top of `1.6.0`. + +### Fixes + +- Fixed missing mandatory locking point of the Git cache in a + `just serve` service. +- `just-mr` now correctly maintains also the Git cache lock when + calling `just` if repository configuration was involved, + preventing any unwanted intermediary repository garbage collection. +- The invocation server now correctly reports the total number of + uncached actions. + ## Release `1.6.0` (2025-06-27) A feature release on top of `1.5.0`, backwards compatible. diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py index f9f57aff..e5175fc1 100755 --- a/doc/invocations-http-server/server.py +++ b/doc/invocations-http-server/server.py @@ -548,6 +548,7 @@ class InvocationServer: candidates.sort(reverse=True) non_cached = [] params["more_noncached"] = None + params["non_cached_count"] = len(candidates) if len(candidates) > 30: params["more_non_cached"] = len(candidates) - 30 candidates = candidates[:30] @@ -556,7 +557,6 @@ class InvocationServer: action["name_prefix"] = "%5.1fs" % (t,) non_cached.append(action) params["non_cached"] = non_cached - params["non_cached_count"] = len(non_cached) start_time = profile.get("start time") build_start_time = profile.get("build start time") build_stop_time = profile.get("build stop time") 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; } |