Releases: userver-framework/userver
2.6
Changes since v2.5:
-
storages::secdist::Secdist is now automatically reloaded for Mongo, Redis and PostgreSQL databases if the secdist file was changed. Now changing the connection parameters in file does not require service restart.
-
Public parts of the Redis driver were moved out from impl/ directory and placed into storages::redis:: namespace. If you were relying on the old paths, see
./scripts/migrate_from_legacy_redis_ns.sh
script to ease migration. -
Shortened testsuite logs were made more functional by providing HTTP URL info.
-
Removed old gRPC interface for server handlers as was promised in previous release notes.
-
gRPC client interfaces were changed to be more user friendly. For example, for
HelloWorld
method in protobuf we generate the oldHelloWorld
function along with the newAsyncHelloWorld
andSyncHelloWorld
functions.AsyncHelloWorld
returns a ugrpc::client::ResponseFuture that can be used to retrieve the request result later in code.SyncHelloWorld
retrieves the response from the future and returns the response itself. Consider replacing:HelloWorld(x).Finish()
withSyncHelloWorld(x)
auto res = HelloWorld(x); /* a lot of code */; res.Finish();
withauto res = AsyncHelloWorld(x); /* a lot of code*/; res.Get();
In next release we will remove the oldHelloWorld
and will renameSyncHelloWorld
intoHelloWorld
.
-
Added Easy - library for single file prototyping. Now the service can be created in a few code lines:
int main(int argc, char* argv[]) {
easy::HttpWith<>(argc, argv)
.DefaultContentType(http::content_type::kTextPlain)
.Route("/hello", [](const server::http::HttpRequest& /*req*/) {
return "Hello world"; // Just return the string as a response body
});
}
-
Added
userver_embed_file
CMake function to embed files into the binary. See Writing your first HTTP server for an example. -
Queries now can be moved to a separate files.
-
Added graceful shutdown functionality. See
graceful_shutdown_interval
in components::ManagerControllerComponent. -
server::http::HttpRequestBuilder now can be used to create server::http::HttpRequest in unit tests.
-
Kafka driver now has kafka::ConsumerScope::GetPartitionIds() and kafka::ConsumerScope::GetOffsetRange() functions. Many thanks to Kirill for the PR!
-
OpenTelemetry now sends
span_kind
information. -
Added user, password, and secure_connection_cert parameters support for the YDB secdist. Thanks to Попов Алексей for the PR!
-
POSTGRES_TOPOLOGY_SETTINGS now has disabled_replicas option to disable some of the replicas.
-
Fixed Kafka logs being written into
STDERR
in edge cases. Thanks to Dudnik Pavel for the PR! -
Added unbounded queue variants concurrent::UnboundedNonFifoMpscQueue, concurrent::UnboundedSpmcQueue, and concurrent::UnboundedSpscQueue. Those queues are usually x2 faster than the bounded variants.
-
GT
andLT
flags support in RedisZADD
. Thanks to Nikolay Pervushin for the PR!
Reduced condition in OTLP, thanks to Dudnik Pavel. -
Build:
- Simplified Profile Guided Optimization (PGO) gathering and usage due to new
USERVER_PGO_GENERATE
andUSERVER_PGO_USE
CMake options. See Configure, Build and Install for more info. - MacOS now can build the userver as a Conan package.
- Build flags were reorganized to use a new
USERVER_BUILD_ALL_LIBRARIES
CMake option. See Build options for more info. - Source directory now can contain spaces.
- Correctly set grpc-reflection found flag. Thanks to Nikita for the PR!
- Fixed
USERVER_CHAOTIC_FORMAT
option for CMake build. Thanks to Konstantin Goncharik for the PR. - Optimized reconfiguration in CMake giving up to 60% time save (6-20 seconds).
- Simplified Profile Guided Optimization (PGO) gathering and usage due to new
-
Documentation and diagnostics:
- More information on Mongo heartbeat in logs.
- Added docs about tag name of tracing::ScopeTime.
- Improved PostgreSQL diagnostic messages for server response parsing errors due to C++ and DB types mismatch.
- Better samples and docs for utils::statistics::Writer.
- Added direct database access to testsuite samples.
- Updated the Concurrent Queues docs.
- Log formats message was amended. Thanks to tkhanipov for the PR!
2.5
Changes since v2.4:
-
Added S3 API client s3api::Client. Many thanks to v-for-vandal for the work!
-
Added gRPC reflection library. Many thanks to v-for-vandal for the work!
-
Added Kill Switch functionality. Many thanks to Aksenov Anton for the work!
-
Congestion Control turned on by default.
-
Initial work towards embedding GDB pretty-printers to userver binaries.
-
Mongo now has the full functionality for diagnostics out-of-the box, without mongo-c library patches.
-
Simplified contributing by removing the annoying bot that checks for explicit agreement to CLA. Creating an issue or sending a PR already means agreement with CLA. Added notes to PR and Issue creation to highlight that.
-
Basic support for HTTP/2 body streaming.
-
Kafka support in testsuite implemented. See Functional tests section at Kafka service tutorial.
-
gRPC:
- Safe new interface for gRPC server handlers. Old interface will be removed in next release.
- Added support for TLS in gRPC.
- Added ugrpc::server::middlewares::field_mask::Component for masking and trimming messages. Many thanks to TTPO100AJIEX for the work!
- gRPC clients now allow configuring channels count for particular methods via
dedicated-channel-counts
static config option.
-
Optimizations:
- concurrent::MpscQueue was optimized, leading to x2-x3 better performance.
- rcu::Variable deleter now can be chosen at compile time, leading to smaller size of rcu::Variable if no asynchronous deletion required.
- Multiple optimizations for gRPC logging and message visitations via ugrpc::VisitFieldsRecursive(). Many thanks to TTPO100AJIEX for the work!
-
Build:
- Added
userver_module()
CMake function to simplify configuration of new drivers that are being added to userver. - Added missing
fmt/ranges.h
includes. Thanks to Vasilii Kuziakin and to SidorovichPavel for the PRs! - Proper use of
PROTOBUF_PROTOC
in CMake. Thanks to Nikita for the PR! - Added support for builds in paths that contain whitespaces and other special symbols.
- Added CI build tests for Ubuntu 24.04 and MacOS.
- Switched to Conan v2. Many thanks to Anton for the PR! Also use modern versions of third party libraries in Conan.
- Added
-
Documentation and diagnostics:
- A whole new build dedicated section was added to the docs instead of the old "Configure, Build and Install" page.
- Improved schemes validation messages, including config validation messages because no schema is written.
- Disambiguated diagnostic messages for component system.
- Better log messages for the dist locks.
- Better docs for gRPC middlewares and gRPC logs at gRPC.
- Added topology and heartbeats logs and metrics for Mongo.
- Clarified docs on PostgreSQL data types with timezones. See uPg: Supported data types.
- Added Kafka service tutorial.
- Logging at runtime, Congestion Control documentation rewrite.
2.4
Changes since v2.3:
- Added USERVER_LOG_REQUEST_HEADERS_WHITELIST to control the HTTP headers to log.
- OpenTelemetry protocol (OTLP) now can optionally do only logging or only tracing. Thanks to TertiumOrganum1 for the PR!
- The framework now accepts OTLP headers for tracing by default and puts those headers for new requests.
- PostgreSQL span names are now a little bit more informative. Thanks to TertiumOrganum1 for the PR!
- Kafka now has a
client.id
static option. Many thanks to Nikolay Pervushin for the PR. - PostgreSQL type errors become more informative. Thanks to farmovit for the report!
- Optimizations:
- HTTP/2 server implementation now does not copy data to send, saving CPU and RAM.
- HTTP/2 now relies on open-addressing unordered map from nghttp2, leading to faster stream lookup.
- Kafka consumer now does not block a task processor thread, allowing multiple consumers to share the same OS thread. Consume cycle now can be treated as an asynchronous non-blocking event loop.
- Kafka producer delivery acknowledgments processing is now done in parallel, leading to better scalability. Also it does not block the OS thread when waiting for new delivery acknowledgments.
- Internals of all the Sockets became smaller in size, saving some RAM.
- gRPC:
- gRPC in testsuite now automatically calls pytest_userver.client.Client.update_server_state. The behavior now matches HTTP.
- gRPC server now supports unix-sockets via
unix-socket-path
static config option. - gRPC clients now log requests/responses via the ugrpc::client::middlewares::log::Component middleware. Improved gRPC client and server.
- New component ugrpc::client::CommonComponent with common options for all the gRPC clients.
- Build, Install and CI:
- OTLP build is now supported in Conan. Thanks to Amina Ramazanova for the PR!
- Chaotic now exposes less headers, leading to faster build times.
- Fixed compilation on modern Boost.UUID. Thanks to Alexander Botev for the PR!
- Added
dependabot
to CI and updated the dependencies. Thanks to Dzmitry Ivaniuk for the PR! - Added missing
#include
. Thanks to Nikita for the PR! - Removed outdated defines in the core. Thanks to Sergey Kazmin for the PR!
- Install now does not put third party headers into the top level include directory. Multiple unused files are now not installed.
- Started the work to enable builds in directories with whitespace in names.
- Documentation:
- More docs for gRPC middlewares at gRPC and gRPC middleware.
- More docs for otlp::LoggerComponent. Thanks to TertiumOrganum1 for the PR!
- Set proper
Content-Type
in samples.
2.3
Changes since v2.2:
- Initial HTTP2 server support is now implemented. Use handler-defaults.http_version static config option of components::Server to enable.
- Logger for OpenTelemetry protocol was implemented. Could be enabled via
USERVER_FEATURE_OTLP
CMake option. See the docs for more info. - Client address in handler now could be retrieved via server::http::HttpRequest::GetRemoteAddress(). Many thanks to Daniil Shvalov for the PR.
- The scheduler implementation now could be adjusted for each task_processor via task-processor-queue static option. A more efficient work-stealing-task-queue was introduced. Many thanks to Egor Bocharov for the PR!
- Added storages::postgres::TimePointWithoutTz for more explicit declaration of intent. Direct work with std::chrono::system_clock is now deprecated in PostgreSQL driver.
- Validation of static config schemas now understands minItems and maxItems for arrays. Many thanks to eparoshin for the PR.
- Websockets now have case insensitive check of headers. Thanks to Alexander Enaldiev for the PR!
- Added engine::io::Socket::ReadNoblock() function to check if there's a pending data and read it if any. server::websocket::WebSocketConnection now has a TryRecv() function to receive a message if its first bytes already came. Thanks to Alexander Enaldiev for the PR!
#env
,#file
and#fallback
now could be used in config_vars file. See yaml_config::YamlConfig for more info. Thanks to Artyom Samuylik for the PR. - gRPC
* Sensitive data now could be hidden in logs via applying a[(userver.field).secret = true]
option to a protobuf field in schema.
* Generic server now could be implemented via ugrpc::server::GenericServiceBase. Generic client ugrpc::client::GenericClient was also implemented. The functionality of generic client/server is useful for writing gRPC proxies.
* gRPC server now shows aggregatedgrpc.server.total
metrics
* More samples and docs. - Optimizations:
* IO events are now uniformly distributed between ev threads. This leads to better performance on high loads in default configurations. Even number of ev threads now works as good as odd number of threads.
* IO watchers now always start asynchronously, leading to x2 less CPU consumption for each start+stop operation. As a result ev threads of HTTP client and Redis driver now use less CPU.
* Timer events with reachable deadlines now are deferred if that does not affect latencies. This gives ~5% RPS improvement forservice_template
. - Build
*Find*.cmake
files are not generated any more, leading to simpler code base and faster configure times.
* Fixed incorrect handling of dots in chaotic paths. Thanks to Alexander Chernov for the PR!
* MacOS build options are now part of the CMake files, leading to less boilerplate while compiling for that platform. Many thanks to Daniil Shvalov for the PR.
* Kafka driver is now enabled in Conan. Many thanks to Aleksandr Gusev for the PR.
* Conan related build fixes. Thanks to Alex for the PR.
2.2
Changes since v2.1:
- Added codegen parsers and serializers by JSON schema
- Improved the ability to unit test of gRPC clients and servers, Redis and Mongo databases, logs. Samples and docs were improved.
- Implemented feedback forms and likes/dislikes for each documentation page.
Feedback would be appreciated!
Many thanks to Fedor Alekseev for the PR and to MariaGrinchenko for the buttons design! - Added docs on YDB.
- Mobile header view and docs layout was improved. Many thanks to Fedor Alekseev for the PRs.
- engine::subprocess::ProcessStarter::Exec now can lookup binaries via
PATH
variable. - Fixed gRPC generation for nested namespaces with repetitions. Many thanks to nfrmtk for the PR!
- Handle both websocket and plain HTTP requests for the same path. Many thanks to Hovard Smith for the PR!
- Support setting client + CA certs in RabbitMQ. Many thanks to Alexey Dyumin for the PR!
- yaml_config::YamlConfig now can read files via
#file
. Now the static config of the service could refer to other files. - Added support of bit operations to Redis.
- PostgreSQL driver now works with AWS Aurora.
- Added quick start for beginners to Configure, Build and Install. Many thanks to Fedor Alekseev for the PR.
- Improved path to sources trimming for Conan builds. Many thanks to Kirill for the PR!
- Multiple minor improvements to build, packaging, docs and testing.
2.1
Changes since v2.0:
- Coroutines stack usage is now shown in the
engine.coro-pool.stack-usage.max-usage-percent
metric. Improved stack-overflow diagnostics. - HTTP server and HTTP client now support ZSTD decompression. Thanks to Илья Оплачкин and VScdr for the PR!
- Added redis::MakeBulkHedgedRedisRequestAsync() and redis::MakeBulkHedgedRedisRequest().
- OpenTelemetry parent span-id is now passed through AMQP headers along with trace-id. Thanks to TertiumOrganum1 for the PR!
- ugrpc::server::MiddlewareBase now has CallRequestHook and CallResponseHook for intercepting requests and responses.
- components::LoggableComponentBase was renamed to components::ComponentBase. components::RawComponentBase was published.
- Multiple improvements for logging in testsuite.
- gRPC metrics are now not written for methods that were not used at runtime.
- Mongo pools now can be adjusted at runtime via dynamic config MONGO_CONNECTION_POOL_SETTINGS. Congestion Control for individual Mongo databases now could be controlled via MONGO_CONGESTION_CONTROL_DATABASES_SETTINGS. Congestion Control is now enabled by default.
- Reduced contention in coro::Pool and added some tests and benchmarks. Many thanks to Egor Bocharov for the PRs!
- Added urabbitmq::ConsumerComponentBase::Process() accepting the whole urabbitmq::ConsumedMessage. Thanks to TertiumOrganum1 for the PR!
human_logs.py
now supports more options and has more examples and docs embedded. Thanks to TertiumOrganum1 for the PR!- server::http::HttpStatus and client::http::Status are now aliases to http::StatusCode. Many thanks to SidorovichPavel for the PR!
- Docs and build:
find_package(userver)
now implicitly callsuserver_setup_environment()
, includes all the helper CMake userver scripts, making the configuration simpler. Added diagnostics and fix-it hints for some of the CMake missuses.- In docs
Ctrl+k
hotkey now focuses onSearch
input. Many thanks to Fedor Alekseev for the PR! - ODR-violations are now avoided if the userver is built with different standard version than the service.
- Each sample is now usable as a root project.
- Each driver now has a @ref QUALITY_TIERS "Quality Tier".
- Fixed minimal version requirements for Pythons gRPC modules. Thanks to
Nikita for the PR! - Reduced build times by avoiding inclusion of heavy headers.
- Multiple improvements for docs, build and CI scripts.
2.0
Big new features since the v1.0.0:
- Simplified dynamic configs and embedded defaults into the code.
- Added PostgreSQL connection pools auto-configuration.
- Added YDB driver and basic Kafka driver.
- LISTEN/NOTIFY support for PostgreSQL
- New landing page for the website
- Significantly reduced network data transmission for PostgreSQL
- Supported install in CMake and CPack packaging.
- Implemented middlewares for HTTP server, most of the HTTP server functionality
was moved to middlewares. - Improved documentation, added more samples and descriptions.
- Numerous optimizations and build improvements.
Ready to use Ubuntu 22.04 x64 package in attachment.
1.0.0
Big new features since the Beta announcement:
- Implemented WebSockets server
- Added MySQL driver
- RabbitMQ drived was added
- Implemented TLS server
- Enabled PostgreSQL pipelining
- Implemented and enabled Deadline Propagation
- Improved experience with metrics. Added Prometheus and Graphite metric
formats. Provided a modern simple interface to write and test metrics. - Added chaos tests for drivers
- Implemented streaming API for the HTTP
- Improved documentation, added more samples and descriptions, improved search.
- Numerous optimizations.
- Numerous build improvements, including Conan and Docker support.
Optimized and improved features that were available at the Beta announcement:
- gRPC client and server
- Mongo driver
- Redis driver
- PostgreSQL
- HTTP server and client
- Logging and Tracing
- ... and many other features.