Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies for 10.x #157

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pipeline {
steps {
script {
sh(script: "sed -Ei 's, version = .*\"([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+).*, version = \"\\1-${env.BUILD_NUMBER}\",' conanfile.py")
sh(script: "sed -Ei 's,#LIBCURLFIXTOKEN.*,self.requires(\"libcurl/7.86.0\"\\, override=True),' conanfile.py")
BUILD_MISSING = "--build missing"
}
}
Expand Down
3 changes: 1 addition & 2 deletions 3rd_party/folly/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ def validate(self):
if self.options.get_safe("use_sse4_2") and str(self.settings.arch) not in ['x86', 'x86_64']:
raise ConanInvalidConfiguration(f"{self.ref} can use the option use_sse4_2 only on x86 and x86_64 archs.")

# FIXME: Freeze max. CMake version at 3.16.2 to fix the Linux build
def build_requirements(self):
self.build_requires("cmake/3.16.9")
self.build_requires("cmake/3.27.0")

def source(self):
files.get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True)
Expand Down
24 changes: 12 additions & 12 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ class SISLConan(ConanFile):
)

def build_requirements(self):
self.build_requires("benchmark/1.7.1")
self.build_requires("gtest/1.13.0")
self.build_requires("benchmark/1.8.2")
self.build_requires("cmake/3.27.0")
self.build_requires("gtest/1.14.0")

def requirements(self):
# Custom packages
Expand All @@ -67,22 +68,21 @@ def requirements(self):
self.requires("userspace-rcu/0.11.4")

# Generic packages (conan-center)
self.requires("boost/1.79.0")
self.requires("boost/1.82.0")
if self.settings.os in ["Linux"]:
self.requires("breakpad/cci.20230127")
self.requires("cxxopts/2.2.1")
self.requires("cxxopts/3.1.1")
self.requires("flatbuffers/1.12.0")
self.requires("grpc/1.48.0")
self.requires("grpc/1.50.1")
self.requires("nlohmann_json/3.11.2")
self.requires("prometheus-cpp/1.1.0")
self.requires("spdlog/1.11.0")
self.requires("spdlog/1.12.0")
self.requires("zmarok-semver/1.1.0")
self.requires("fmt/8.1.1", override=True)
#LIBCURLFIXTOKEN
self.requires("libevent/2.1.12", override=True)
self.requires("openssl/1.1.1q", override=True)
self.requires("xz_utils/5.2.5", override=True)
self.requires("zlib/1.2.12", override=True)
self.requires("fmt/10.0.0", override=True)
self.requires("libcurl/8.0.1", override=True)
self.requires("openssl/3.1.1", override=True)
self.requires("xz_utils/5.2.5", override=True)
self.requires("zlib/1.2.13", override=True)

def validate(self):
if self.info.settings.compiler.cppstd:
Expand Down
8 changes: 7 additions & 1 deletion include/sisl/grpc/rpc_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
#include <sisl/utility/enum.hpp>
#include <sisl/auth_manager/token_client.hpp>

#include <fmt/format.h>

namespace grpc {
inline auto format_as(StatusCode s) { return fmt::underlying(s); }
} // namespace grpc

namespace sisl {

/**
Expand Down Expand Up @@ -385,4 +391,4 @@ class GrpcAsyncClient : public GrpcBaseClient {
std::unique_ptr< GenericAsyncStub > make_generic_stub(const std::string& worker);
};

} // namespace sisl::grpc
} // namespace sisl
3 changes: 3 additions & 0 deletions include/sisl/utility/enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <type_traits>
#include <unordered_map>

#include <fmt/format.h>

template < typename EnumType >
class EnumSupportBase {
public:
Expand Down Expand Up @@ -117,6 +119,7 @@ class EnumSupportBase {

#define BASE_ENUM(FQEnumName, EnumName, Underlying, ...) \
enum class FQEnumName : Underlying { __VA_ARGS__ }; \
inline auto format_as(FQEnumName e) { return fmt::underlying(e); } \
\
struct FQEnumName##Support : EnumSupportBase< EnumName > { \
typedef EnumName enum_type; \
Expand Down
4 changes: 2 additions & 2 deletions src/grpc/tests/function/echo_async_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class TestServer {
server->register_generic_rpc(GENERIC_METHOD, [this](boost::intrusive_ptr< GenericRpcData >& rpc_data) {
rpc_data->set_comp_cb([this](boost::intrusive_ptr< GenericRpcData >&) { num_completions++; });
if ((++num_calls % 2) == 0) {
LOGDEBUGMOD(grpc_server, "respond async generic request, call_num {}", num_calls);
LOGDEBUGMOD(grpc_server, "respond async generic request, call_num {}", num_calls.load());
std::thread([this, rpc = rpc_data] {
set_response(rpc->request(), rpc->response());
rpc->send_response();
Expand All @@ -321,7 +321,7 @@ class TestServer {

bool compare_counters() {
if (num_calls != num_completions) {
LOGERROR("num calls: {}, num_completions = {}", num_calls, num_completions);
LOGERROR("num calls: {}, num_completions = {}", num_calls.load(), num_completions.load());
return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/grpc/tests/unit/auth_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class EchoServiceImpl final {
if (it == client_headers.end()) {
rpc_data->set_status(::grpc::Status(::grpc::StatusCode::INVALID_ARGUMENT, ::grpc::string()));
} else if (it->second != val) {
LOGERROR("wrong value, expected = {}, actual = {}", val, it->second)
LOGERROR("wrong value, expected = {}, actual = {}", val, it->second.data())
rpc_data->set_status(::grpc::Status(::grpc::StatusCode::INVALID_ARGUMENT, ::grpc::string()));
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/logging/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ static std::filesystem::path get_base_dir() {
if (fs::is_symlink(sym_path)) { fs::remove(sym_path); }
fs::create_directory_symlink(cur_log_dir, sym_path);
} catch (std::exception& e) {
LOGINFO("Unable to create latest symlink={} to log dir={}, ignoring symlink creation\n", sym_path, log_dir);
LOGINFO("Unable to create latest symlink={} to log dir={}, ignoring symlink creation\n", sym_path.string(),
log_dir.string());
}
return cur_log_dir;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/metrics_group_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ nlohmann::json MetricsGroupImpl::get_result_in_json(bool need_latest) {
HistogramDynamicInfo& h = hist_dynamic_info(idx);
if (h.is_histogram_reporter()) {
hist_entries[hist_static_info(idx).desc()] =
fmt::format("{:#} / {:#} / {:#} / {:#}", h.average(result),
fmt::format("{:.1f} / {:.1f} / {:.1f} / {:.1f}", h.average(result),
h.percentile(result, hist_static_info(idx).get_boundaries(), 50),
h.percentile(result, hist_static_info(idx).get_boundaries(), 95),
h.percentile(result, hist_static_info(idx).get_boundaries(), 99));
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/tests/wrapper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ nlohmann::json expected = {
{"Total memory utilization", 980}
}},
{"Histograms percentiles (usecs) avg/50/95/99", {
{"Distribution of request per transactions", "18.25 / 15.0 / 31.0 / 31.0"}
{"Distribution of request per transactions", "18.2 / 15.0 / 31.0 / 31.0"}
}}
}}
}}
Expand Down