summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-11 17:34:45 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-12 14:36:11 +0100
commit46eb737b2c664acb8b2732ed00cfccda8079462c (patch)
tree0bf7f49fc0bf81d28bc164d2a744f3d898c9c256
parent540a789e05b2834e5e4453101e7dcae8c513103b (diff)
downloadjustbuild-46eb737b2c664acb8b2732ed00cfccda8079462c.tar.gz
Fix formatting of blob used to shard target cache
The ToJson method of RemoteAddress was wrongly creating a list instead of a simple string, thus a wrongly formatted backend description was being used to shard the target cache. This however does not affect the correctness of the build. Changelog also updated accordingly.
-rw-r--r--CHANGELOG.md6
-rw-r--r--src/buildtool/common/remote/remote_common.hpp4
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66406237..107d34f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -58,6 +58,12 @@ A feature release on top of `1.2.0`, backwards compatible.
directories if they are part of the action's input.
- Fixed overwrite of existing symlinks in the output directory
when using subcommands `install` and `install-cas`.
+- The format for target-cache shards was changed to a canonical form.
+ The new and old formats do not overlap, therefore the correctness
+ of the builds is not affected. In particular, no special care has
+ to be taken on upgrading or downgrading. However, some target-level
+ cache entries will not be used leading potentially to rebuilding of
+ some targets.
## Release `1.2.0` (2023-08-25)
diff --git a/src/buildtool/common/remote/remote_common.hpp b/src/buildtool/common/remote/remote_common.hpp
index ddbd16fb..be440052 100644
--- a/src/buildtool/common/remote/remote_common.hpp
+++ b/src/buildtool/common/remote/remote_common.hpp
@@ -28,8 +28,8 @@ struct ServerAddress {
Port port{};
[[nodiscard]] auto ToJson() const noexcept -> nlohmann::json {
- return nlohmann::json{
- fmt::format("{}:{}", host, static_cast<std::uint16_t>(port))};
+ return nlohmann::json(
+ fmt::format("{}:{}", host, static_cast<std::uint16_t>(port)));
}
};