Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e22848a
Corrections for packages versions, added missing header
michael-lutsenko Apr 22, 2025
4561986
INFO->DEBUG, changed some utils logs severity
michael-lutsenko May 9, 2025
c1f0c92
Merge remote-tracking branch 'upstream/develop' into temp
michael-lutsenko May 10, 2025
2b374f1
Merge remote-tracking branch 'upstream/develop' into temp
michael-lutsenko May 29, 2025
25f5e67
Merge tag 'v2.10' into 2.10-rc
michael-lutsenko Jun 12, 2025
dc57a03
added grpc client certs
aklyuchev86 Jun 25, 2025
bf18b8e
added support for several gRPC servers in one instance
izetag Jun 26, 2025
5926620
Merge branch '2.10'
michael-lutsenko Jun 27, 2025
571a754
fix the requirement of clang-format
izetag Jun 27, 2025
2da0dab
fixed span default log level to kTrace
izetag Jul 8, 2025
6f7aed3
added option enable_prof for jemalloc
izetag Jul 8, 2025
875720b
Fix crash on closing of websocket connection
denisrazinkind-cy Aug 13, 2025
830aba6
hotfix1
denisrazinkind-cy Aug 13, 2025
518234a
Merge pull request #13 from exness/fix-crash-ws-handling
DenisRazinkin Aug 13, 2025
4651f0e
Hotfix IsWebSocketUpgradeRequest: isspace instead of space
denisrazinkind-cy Aug 13, 2025
385f4e9
tab or space
denisrazinkind-cy Aug 13, 2025
5325999
Merge pull request #14 from exness/fix-crash-ws-handling
DenisRazinkin Aug 13, 2025
b812b8f
hotfix2
denisrazinkind-cy Aug 13, 2025
e54cec2
Merge pull request #15 from exness/fix-crash-ws-handling
DenisRazinkin Aug 13, 2025
d24257f
Merge branch 'develop/origin'
Sep 3, 2025
f61c7f4
build fix
Sep 3, 2025
be426b3
client factory component schema fix
Sep 10, 2025
40b4f70
fix max os compile
aklyuchev86 Sep 19, 2025
cf40db2
Merge branch 2.13
denisrazinkind-cy Nov 6, 2025
6d2fa4d
version.txt
denisrazinkind-cy Nov 6, 2025
ad3b99d
buildfix
denisrazinkind-cy Nov 6, 2025
98ff935
fix sigwait usage for mac os
aklyuchev86 Oct 14, 2024
1e8f207
mongo-c-driver 1.29.0
denisrazinkind-cy Dec 22, 2025
897f8b1
boost 1.88.0
denisrazinkind-cy Dec 23, 2025
115fae9
boost 1.90.0
denisrazinkind-cy Dec 23, 2025
61fd55d
boost 1.90.0
denisrazinkind-cy Dec 23, 2025
16792c1
Merge pull request #18 from exness/update-mongo-driver
DenisRazinkin Dec 24, 2025
911ec7e
Merge branch 'update-to-2.14' into master-update-to-2.14
denisrazinkind-cy Dec 29, 2025
17ea62f
version
denisrazinkind-cy Dec 29, 2025
67eb4e6
wip
denisrazinkind-cy Dec 30, 2025
b4dfe5e
Merge pull request #20 from exness/master-update-to-2.14
DenisRazinkin Jan 2, 2026
34b4603
fix version
denisrazinkind-cy Jan 2, 2026
be99fdc
Alma10 support (#21)
izetag Jan 15, 2026
6d3acb7
Merge branch 'develop' into master-update-to-3.0
denisrazinkind-cy Apr 22, 2026
04b0c82
version
denisrazinkind-cy Apr 22, 2026
bcfa47c
Merge branch 'develop' into master-update-to-3.0
denisrazinkind-cy Apr 22, 2026
8be5b28
re2 version
denisrazinkind-cy Apr 22, 2026
36cf7a3
openssl 3.6.2
denisrazinkind-cy May 19, 2026
36aa895
libpq
denisrazinkind-cy May 19, 2026
3d719ca
try new benchmark
denisrazinkind-cy May 28, 2026
895b8d3
abseil
denisrazinkind-cy May 28, 2026
a28dc09
abseil
denisrazinkind-cy May 28, 2026
ecd7835
abseil
denisrazinkind-cy May 28, 2026
af578ef
protobuf/6.33.5
denisrazinkind-cy May 28, 2026
fec59e7
mongo-c-driver/1.30.3
denisrazinkind-cy May 29, 2026
e41768b
mongo-c-driver/1.30.3
denisrazinkind-cy May 29, 2026
2e01c6c
builfdix
denisrazinkind-cy May 29, 2026
1ff5f5e
builfdix
denisrazinkind-cy Jun 1, 2026
a1e9d75
builfdix
denisrazinkind-cy Jun 2, 2026
d6d6683
Revert "builfdix"
denisrazinkind-cy Jun 3, 2026
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
2 changes: 1 addition & 1 deletion cmake/ChaoticGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function(userver_target_generate_chaotic TARGET)
if(PARSE_PARSE_EXTRA_FORMATS)
list(APPEND CHAOTIC_ARGS "--parse-extra-formats")
endif()

if(PARSE_NO_SAX_PARSE)
list(APPEND CHAOTIC_ARGS "--no-sax-parse")
endif()
Expand Down
45 changes: 33 additions & 12 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pylint: disable=no-member
import os
import platform
import re

from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
Expand All @@ -12,6 +13,8 @@
from conan.tools.files import copy
from conan.tools.files import export_conandata_patches
from conan.tools.files import get
from conan.tools.files import load
from conan.tools.system import package_manager
from conan.tools.scm import Git

required_conan_version = '>=2.8.0' # pylint: disable=invalid-name
Expand Down Expand Up @@ -78,6 +81,17 @@ class UserverConan(ConanFile):
're2/*:with_icu': True,
}

def set_version(self):
content = load(
self,
os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'version.txt',
),
)
hotfix_version = '4'
self.version = content.strip() + f".{hotfix_version}" # pylint: disable=attribute-defined-outside-init

def source(self):
known_version = (self.conan_data or {}).get('sources', {}).get(self.version)
if known_version:
Expand All @@ -102,39 +116,46 @@ def export_sources(self):
def layout(self):
cmake_layout(self)

def configure(self):
# Control dependencies of our dependencies based on current options
if self.options.with_jemalloc:
self.options['jemalloc'].enable_prof = True

def requirements(self):
self.requires('boost/[>=1.83 <1.88]', transitive_headers=True)
self.requires('boost/1.90.0', transitive_headers=True, options={
"with_stacktrace_backtrace": True,
"without_stacktrace": False,
"without_cobalt": True
})
self.requires('c-ares/[^1.33]')
self.requires('cctz/[^2.4]', transitive_headers=True)

self.requires('concurrentqueue/[^1.0.5]', transitive_headers=True)

self.requires('cryptopp/[^8.9]')
self.requires('fmt/[>=8.1.1 <13]', transitive_headers=True)
self.requires('fmt/11.2.0', transitive_headers=True)
self.requires('libiconv/[^1.17]')
self.requires('libnghttp2/[^1.61]')
self.requires('libcurl/[>=7.86.0 <7.88 || >8.1.2]')
self.requires('libcurl/8.12.1')
self.requires('libev/[^4.33]')
self.requires('openssl/[>=1.1 <4]')
self.requires('openssl/[>=3.6.2 <4]')
self.requires('rapidjson/[>=cci.20230929 <cci.20230930]', transitive_headers=True)
self.requires('yaml-cpp/[>=0.8.0 <=0.9.0]')
self.requires('zlib/[^1.3]')
self.requires('zstd/[^1.5]')
self.requires('icu/[>=74.1 <77]', force=True)
self.requires('re2/[>=20230301]')
self.requires('re2/[>=20251105]')

if self.options.with_jemalloc:
self.requires('jemalloc/[^5.3]')
if self.options.with_grpc or self.options.with_clickhouse:
self.requires('abseil/20240722.1', force=True)
self.requires('abseil/20260107.1', transitive_headers=True, transitive_libs=True, force=True)
if self.options.with_grpc:
self.requires(
'grpc/[^1.69.0]',
transitive_headers=True,
transitive_libs=True,
)
self.requires(
'protobuf/[^5.27]',
'protobuf/6.33.5',
transitive_headers=True,
transitive_libs=True,
force=True,
Expand All @@ -145,12 +166,12 @@ def requirements(self):
# without system package. We use system package.
#
# `<16` is due to link errors `undefined reference to `gss_release_buffer'`
self.requires('libpq/[>=14.9 <16]')
self.requires('libpq/[>=15.17 <16]')
if self.options.with_mongodb or self.options.with_kafka:
self.requires('cyrus-sasl/[^2.1]')
if self.options.with_mongodb:
self.requires(
'mongo-c-driver/[^1.30]',
'mongo-c-driver/1.30.3',
transitive_headers=True,
transitive_libs=True,
)
Expand All @@ -170,7 +191,7 @@ def requirements(self):
transitive_libs=True,
)
self.requires(
'benchmark/[>=1.9 <3]',
'benchmark/[>=1.9.5 <3]',
transitive_headers=True,
transitive_libs=True,
)
Expand Down
29 changes: 29 additions & 0 deletions core/include/userver/utils/statistics/system_statistics.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include <cstdint>
#include <optional>
#include <string_view>

#include <userver/utils/statistics/fwd.hpp>

USERVER_NAMESPACE_BEGIN

namespace utils::statistics::impl {

struct SystemStats {
std::optional<double> cpu_time_sec;
std::optional<std::int64_t> rss_kb;
std::optional<std::int64_t> open_files;
std::optional<std::int64_t> major_pagefaults;
std::optional<std::int64_t> io_read_bytes;
std::optional<std::int64_t> io_write_bytes;
};

void DumpMetric(Writer& writer, const SystemStats& stats);

SystemStats GetSelfSystemStatistics();
SystemStats GetSystemStatisticsByExeName(std::string_view name);

} // namespace utils::statistics::impl

USERVER_NAMESPACE_END
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <userver/concurrent/variable.hpp>
#include <userver/engine/task/task_processor_fwd.hpp>
#include <userver/utils/periodic_task.hpp>
#include <utils/statistics/system_statistics.hpp>
#include <userver/utils/statistics/system_statistics.hpp>

USERVER_NAMESPACE_BEGIN

Expand Down
8 changes: 7 additions & 1 deletion core/src/components/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ void CatchSignalsLoop(impl::Manager& manager, RunMode run_mode, utils::SignalCat
} else if (signum == SIGUSR1 || signum == SIGUSR2) {
LOG_INFO() << "Signal caught: " << utils::strsignal(signum);
manager.OnSignal(signum);
} else {
}
#ifdef __APPLE__
else if(signum == -1){
LOG_WARNING() << "sigwait false positive, ingnoring... ";
}
#endif
else {
LOG_WARNING() << "Got unexpected signal: " << signum << " (" << utils::strsignal(signum) << ')';
UASSERT_MSG(false, "unexpected signal");
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/server/http/http_request_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bool IsWebSocketUpgradeRequest(std::string_view req) {
if (it == req.end()) {
return false;
}
while (*it == ' ' && it != req.end()) {
while (it != req.end() && (*it == ' ' || *it == '\t')) {
++it;
}
const auto end = it + kWebsocketUpgradeHeaderValue.size();
Expand Down
2 changes: 1 addition & 1 deletion core/src/tracing/span.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Span::Impl::Impl(
)
: name_(std::move(name)),
is_no_log_span_(IsNoLogSpan(name_)),
log_level_(is_no_log_span_ ? logging::Level::kNone : logging::Level::kInfo),
log_level_(is_no_log_span_ ? logging::Level::kNone : logging::Level::kTrace),
reference_type_(reference_type),
source_location_(source_location),
trace_id_(parent ? utils::SmallString<kTypicalTraceIdSize>(parent->GetTraceId()) : GenerateTraceId()),
Expand Down
4 changes: 2 additions & 2 deletions core/src/utils/periodic_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ void PeriodicTask::Stop() noexcept {
const auto name = impl_->GetName();
try {
if (IsRunning()) {
LOG_INFO() << "Stopping PeriodicTask with name=" << name;
LOG_DEBUG() << "Stopping PeriodicTask with name=" << name;
impl_->task.SyncCancel();
impl_->changed_event.Reset();
impl_->should_force_step = false;
impl_->task = engine::TaskWithResult<void>();
LOG_INFO() << "Stopped PeriodicTask with name=" << name;
LOG_DEBUG() << "Stopped PeriodicTask with name=" << name;
}
} catch (std::exception& e) {
LOG_ERROR() << "Exception while stopping PeriodicTask with name=" << name << ": " << e;
Expand Down
5 changes: 5 additions & 0 deletions core/src/utils/signal_catcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ SignalCatcher::~SignalCatcher() noexcept(false) {
int SignalCatcher::Catch() {
int signum = -1;
utils::CheckSyscall(sigwait(&sigset_, &signum), "waiting for signal");
//https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/sigwait.2.html
//on mac os sigwait sometime returns 0 value(success) and signum -1
//looks like a bug
#ifndef __APPLE__
UASSERT(signum != -1);
#endif
return signum;
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/utils/statistics/impl/histogram_view_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ inline void AddNonAtomic(std::atomic<double>& to, std::uint64_t x) {
}

inline void AddAtomic(std::atomic<double>& to, double x) {
#if __cplusplus >= 202002L && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 180000)
#if !defined(__APPLE__) && __cplusplus >= 202002L && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 180000)
to += x;
#else
double expected = to.load();
Expand Down
2 changes: 1 addition & 1 deletion core/src/utils/statistics/system_statistics.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <utils/statistics/system_statistics.hpp>
#include <userver/utils/statistics/system_statistics.hpp>

#ifdef __APPLE__
#include <mach/mach.h>
Expand Down
5 changes: 5 additions & 0 deletions grpc/src/ugrpc/client/client_factory_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ ClientFactoryComponent::ClientFactoryComponent(
ClientFactory& ClientFactoryComponent::GetFactory() { return *factory_; }

yaml_config::Schema ClientFactoryComponent::GetStaticConfigSchema() {
/*
* auth-token:
type: string
description: auth token name from secdist
*/
return yaml_config::MergeSchemasFromResource<
impl::MiddlewareRunnerComponentBase>("src/ugrpc/client/client_factory_component.yaml");
}
Expand Down
2 changes: 2 additions & 0 deletions grpc/src/ugrpc/client/impl/client_factory_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <userver/utils/trivial_map.hpp>

#include <userver/ugrpc/impl/to_string.hpp>
#include <userver/fs/blocking/read.hpp>
#include <userver/logging/log.hpp>

USERVER_NAMESPACE_BEGIN

Expand Down
17 changes: 15 additions & 2 deletions grpc/src/ugrpc/server/service_component_base.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <string>
#include <string_view>
#include <userver/ugrpc/server/service_component_base.hpp>

#include <google/protobuf/descriptor.h>
Expand All @@ -22,14 +24,25 @@

USERVER_NAMESPACE_BEGIN

namespace ugrpc::server {
namespace {

std::string GetServerName(const components::ComponentConfig& config) {
static constexpr std::string_view kServerNameKey = "server-name";
if (config.HasMember(kServerNameKey)) {
return config[kServerNameKey].As<std::string>();
}
return "grpc-server";
}

} // namespace

namespace ugrpc::server {
ServiceComponentBase::ServiceComponentBase(
const components::ComponentConfig& config,
const components::ComponentContext& context
)
: impl::MiddlewareRunnerComponentBase(config, context, MiddlewarePipelineComponent::kName),
server_(context.FindComponent<ServerComponent>()),
server_(context.FindComponent<ServerComponent>(GetServerName(config))),
config_(server_.ParseServiceConfig(config, context)),
component_name_(context.GetComponentName())
{}
Expand Down
4 changes: 4 additions & 0 deletions grpc/src/ugrpc/server/service_component_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ properties:
type: string
description: the task processor to use for responses
default: uses grpc-server.service-defaults.task-processor
server-name:
type: string
description: the name of the server to use
defaultDescription: grpc-server
status-codes-log-level:
type: object
properties: {}
Expand Down
3 changes: 3 additions & 0 deletions universal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ userver_target_cxx_compile_options_if_supported(
"-Wlogical-op"
"-Wformat=2"
"-Wno-error=deprecated-declarations"
# protobuf 6 generated code uses absl_nullable/absl_nonnull (-> _Nullable/_Nonnull),
# which are clang extensions and trip -Wpedantic -Werror in Debug builds.
"-Wno-nullability-extension"
# This warning is unavoidable in generic code with templates
"-Wno-useless-cast"
# gcc complains: the ABI of passing union with ‘long double’ has changed in GCC 4.4
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1-rc
3.0