Skip to content

Commit 149b0a7

Browse files
committed
feat docs: changelog for userver 2.14
Tests: на прод не влияет commit_hash:a8540da3239365e004536447fe1d5bda23f3589d
1 parent 3827f4d commit 149b0a7

File tree

1 file changed

+175
-0
lines changed

1 file changed

+175
-0
lines changed

scripts/docs/en/userver/roadmap_and_changelog.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,181 @@ Changelog news also go to the
3535

3636
## Changelog
3737

38+
### Release v2.14
39+
40+
* Added a @ref ugrpc::RichStatus builder for creating rich gRPC error statuses with
41+
structured details following Google's error model
42+
* Implemented a Multi Index LRU container, thanks to [hzhdlrp](https://github.com/hzhdlrp).
43+
* Statement name is now logged when using @ref storages::postgres::Portal.
44+
* @ref storages::postgres::DistLockComponentBase now can be configured at runtime via @ref POSTGRES_DISTLOCK_SETTINGS.
45+
* Added @ref utils::TaskBuilder
46+
*@ref scripts/docs/en/userver/libraries/s3api.md now has @ref QUALITY_TIERS "Platinum Tier".
47+
* Kafka is now more accurate in computing message time spent in @ref kafka::ConsumerComponent queue.
48+
* @ref utils::statistics::RecentPeriod is does not lose precision under heavy contention.
49+
* Added functionality to @ref ‎scripts/docs/en/userver/dump_coroutines.md
50+
* Added DeadlockDetector that can be enabled via `coro_pool.deadlock_detector` option
51+
in @ref components::ManagerControllerComponent.
52+
* Added @ref storages::mongo::Transaction
53+
* Added @ref server::middlewares::Cors
54+
* @ref components::ComponentContext::RegisterScope() now can be used to register some resource that will be
55+
called after the component is successfully created (including all
56+
class descendants) and destroyed right before calling the destructor of the most derived component. This is a low
57+
level feature, more high level functions for caches, distlocks and subscriptions will appear soon.
58+
59+
* Build
60+
* The oldest supported Python is now Python 3.10.
61+
* Build fixes for PostgreSQL >= 17 on Ubuntu. Many thanks to [Pavel Sidorovich](https://github.com/RayeS2070)
62+
for the initial PR!
63+
* Chaotic golden tests now use clang-format on both sides of the diff to avoid failures dues to clang-format version
64+
changes. Many thanks to [Konstantin Goncharik](https://github.com/botanegg) for the PR!
65+
* The correct stable version of devcontainer is now presumed by `userver-create-service` script, resulting in stable
66+
work of the service on older containers.
67+
* Added `rdkafka_mock.h` header to workaround uncommon header location in some of the build environments.
68+
Many thanks to [Vitalii](https://github.com/beryll1um) for the PR!
69+
* Removed USERVER_HTTP_PROXY dynamic config
70+
* Multiple updates to CI packet versions, build processes and docker container creation.
71+
72+
* Documentation and diagnostics
73+
* Tables with static configuration options are now build from component schemas. As a result the options description
74+
became more accurate.
75+
* Added @ref pytest_userver.plugins.service.service_start_timeout "service_start_timeout" fixture into testsuite.
76+
Many thanks to [DmitriyH](https://github.com/DmitriyH) for the PR!
77+
* Added multipart methods support for testsuite @ref pytest_userver.plugins.s3api "s3api plugin".
78+
* @ref utils::FromString() now reports if input sequence of chars to convert contains '\0' character.
79+
* Improved diagnostics for PostgreSQL composite types related errors, including nested composite types.
80+
* A lot of updates for different sections of documentation, including @ref utils::FixedArray,
81+
@ref ‎scripts/docs/en/userver/deadline_propagation.md, @ref clients::http::Request,
82+
@ref ‎scripts/docs/en/userver/gdb_debugging.md.
83+
84+
85+
Plugins are renamed to middlewares and @ref components::HttpClient was split into @ref components::HttpClient
86+
and @ref components::HttpClientCore.
87+
88+
**Migration guide**:
89+
90+
1. Instead of `.Append<components::HttpClient>()` use `.AppendComponentList(clients::http::ComponentList())` in
91+
your component list (see @ref clients::http::ComponentList "docs").
92+
2. For classes inherited from @ref tracing::TracingManagerBase:
93+
1. Change @ref clients::http::PluginRequest in @ref tracing::TracingManagerBase::FillRequestWithTracingContext() parameters to @ref clients::http::MiddlewareRequest
94+
3. For classes inherited from @ref clients::http::Plugin:
95+
1. Replace `#include <userver/clients/http/plugin.hpp>` with `#include <userver/clients/http/middlewares/base.hpp>`
96+
2. Change base class to @ref clients::http::MiddlewareBase
97+
3. Change @ref clients::http::PluginRequest in methods parameters to @ref clients::http::MiddlewareRequest
98+
4. Stop passing middleware name to base class constructor
99+
5. Empty methods implementations (or `return true;` for @ref clients::http::MiddlewareBase::HookOnRetry()) may be omitted
100+
101+
For example:
102+
103+
```
104+
# diff
105+
-#include <userver/clients/http/plugin.hpp>
106+
+#include <userver/clients/http/middlewares/base.hpp>
107+
...
108+
109+
-class MyPlugin : public clients::http::Plugin {
110+
+class MyMiddleware : public clients::http::MiddlewareBase {
111+
public:
112+
...
113+
- MyPlugin() : clients::http::Plugin("my-plugin") {}
114+
+ MyMiddleware() : clients::http::MiddlewareBase() {}
115+
116+
- void HookPerformRequest(clients::http::PluginRequest& request) override { do_something(request); }
117+
+ void HookPerformRequest(clients::http::MiddlewareRequest& request) override { do_something(request); };
118+
119+
- void HookCreateSpan(clients::http::PluginRequest&, tracing::Span&) override {}
120+
- void HookOnCompleted(clients::http::PluginRequest&, clients::http::Response&) override {}
121+
- void HookOnError(clients::http::PluginRequest&, std::error_code) override {}
122+
- bool HookOnRetry(clients::http::PluginRequest&) override { return true; }
123+
...
124+
};
125+
```
126+
4. For plugin components inherited from @ref clients::http::plugin::ComponentBase:
127+
1. Replace `#include <userver/clients/http/plugin_component.hpp>` with `#include <userver/clients/http/middlewares/component.hpp>`
128+
2. Change base class to @ref clients::http::middlewares::ComponentBase
129+
3. Component name is not required to have prefix `http-client-plugin-` anymore, `http-client-` prefix is suggested instead
130+
4. Rename `GetPlugin` method to `GetMiddleware`, change its return type to `clients::http::MiddlewareBase`
131+
5. Use @ref dynamic\_config::Source::UpdateAndListen() to subscribe on dynamic config updates
132+
6. Pass middleware index to base class constructor, instead of setting it in config file
133+
134+
For example:
135+
136+
```
137+
# diff
138+
-#include <userver/clients/http/plugin_component.hpp>
139+
+#include <userver/clients/http/middlewares/component.hpp>
140+
...
141+
142+
-class SomeComponentName : public clients::http::plugin::ComponentBase {
143+
+class SomeComponentName : public clients::http::middlewares::ComponentBase {
144+
public:
145+
- static constexpr std::string_view kName = "http-client-plugin-my-plugin-name";
146+
+ static constexpr std::string_view kName = "http-client-my-middleware-name";
147+
148+
- SomeComponentName(const components::ComponentConfig& config, const components::ComponentContext& context)
149+
- : ComponentBase(config, context),
150+
- plugin_(std::make_unique<Plugin>()),
151+
+ SomeComponentName(const components::ComponentConfig& config, const components::ComponentContext& context)
152+
+ : ComponentBase(config, context, clients::http::middlewares::MiddlewareIndex{1234}),
153+
+ middleware_(std::make_unique<Middleware>()),
154+
{
155+
auto& config_component = context.FindComponent<components::DynamicConfig>();
156+
subscriber_scope_ =
157+
- components::DynamicConfig::NoblockSubscriber{config_component}
158+
- .GetEventSource()
159+
- .AddListener(this, kName, &Component::OnConfigUpdate);
160+
+ config_component
161+
+ .GetSource()
162+
+ .UpdateAndListen(this, kName, &Component::OnConfigUpdate);
163+
}
164+
...
165+
- clients::http::Plugin& GetPlugin() override { return *plugin_; }
166+
+ clients::http::MiddlewareBase& GetMiddleware() override { return *middleware_; }
167+
168+
private:
169+
- std::unique_ptr<clients::http::Plugin> plugin_;
170+
+ std::unique_ptr<clients::http::MiddlewareBase> middleware_;
171+
};
172+
```
173+
5. Rename `http-client:` to `http-client-core:` in static config.
174+
6. If you are using or customized plugins/middlewares:
175+
1. In every @ref components::HttpClient config, rename `plugins` to `middlewares`
176+
2. Update middleware component names to current `Component::kName`
177+
3. Use full middleware components names as keys and `{enabled: true}` as values in `middlewares` for every @ref components::HttpClient config
178+
4. Move middlewares that you want to use for all @ref components::HttpClient instances from `http-client.middlewares` to `http-client-middleware-pipeline.middlewares`
179+
5. Set `dynamic-config-http-client.middlewares.<middleware name>.enabled` to `false` for all middlewares that are subscribed to dynamic configs updates
180+
181+
For example:
182+
183+
```
184+
# diff
185+
components_manager:
186+
components:
187+
- http-client-plugin-common-plugin-name:
188+
+ http-client-common-middleware-name:
189+
...
190+
- http-client-plugin-plugin-with-dynamic-config:
191+
+ http-client-middleware-with-dynamic-config:
192+
...
193+
194+
- http-client:
195+
+ http-client-core:
196+
fs-task-processor: fs-task-processor
197+
- plugins:
198+
- common-plugin-name: 1
199+
- with-dynamic-config: 2
200+
+ http-client-middleware-pipeline:
201+
+ middlewares:
202+
+ http-client-common-middleware-name:
203+
+ enabled: true
204+
+ http-client-middleware-with-dynamic-config:
205+
+ enabled: true
206+
+ dynamic-config-http-client:
207+
+ middlewares:
208+
+ http-client-middleware-with-dynamic-config:
209+
+ enabled: false
210+
```
211+
212+
38213
### Release v2.13
39214

40215
* Recursive subscriptions on dynamic configs now work without deadlocks.

0 commit comments

Comments
 (0)