From d9620885fa317a196cc8556c46324ae80b23574c Mon Sep 17 00:00:00 2001 From: antoshkka Date: Fri, 8 Nov 2024 11:57:14 +0300 Subject: [PATCH] feat docs: update changelog and docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests: протестировано локально, на прод не влияет commit_hash:8b7506fa1a5496d36be9902e083de21ccd3e4f54 --- clickhouse/include/userver/storages/clickhouse.hpp | 2 +- core/src/logging/log_extra_test.cpp | 3 ++- samples/s3api/CMakeLists.txt | 2 ++ scripts/docs/doxygen.conf | 5 +++++ scripts/docs/en/index.md | 1 + scripts/docs/en/userver/development/stability.md | 2 +- scripts/docs/en/userver/libraries/grpc-reflection.md | 7 ++++--- scripts/docs/en/userver/publications.md | 4 +++- scripts/docs/en/userver/roadmap_and_changelog.md | 6 ++++-- scripts/docs/en/userver/tutorial/json_to_yaml.md | 2 +- .../docs/en/userver/tutorial/multipart_service.md | 2 +- scripts/docs/en/userver/tutorial/s3api.md | 12 ++++++++++-- 12 files changed, 35 insertions(+), 13 deletions(-) diff --git a/clickhouse/include/userver/storages/clickhouse.hpp b/clickhouse/include/userver/storages/clickhouse.hpp index 635af9a2e66c..d00bc2ca279d 100644 --- a/clickhouse/include/userver/storages/clickhouse.hpp +++ b/clickhouse/include/userver/storages/clickhouse.hpp @@ -33,7 +33,7 @@ /// /// @htmlonly
@endhtmlonly /// ⇦ @ref scripts/docs/en/userver/redis.md | -/// @ref scripts/docs/en/userver/development/stability.md ⇨ +/// @ref scripts/docs/en/userver/libraries/s3api.md ⇨ /// @htmlonly
@endhtmlonly USERVER_NAMESPACE_BEGIN diff --git a/core/src/logging/log_extra_test.cpp b/core/src/logging/log_extra_test.cpp index f91e1ebb6a4e..ebd44ba7e4cc 100644 --- a/core/src/logging/log_extra_test.cpp +++ b/core/src/logging/log_extra_test.cpp @@ -30,7 +30,8 @@ TEST(LogExtra, DocsData) { /// [Example using LogExtra] /// [Example using stacktrace in log] - LOG_ERROR() << "Deadlock in ABC identified" << logging::LogExtra::Stacktrace(); + // Outputs current stacktrace: + LOG_ERROR() << "Deadlock in ABC identified:" << logging::LogExtra::Stacktrace(); /// [Example using stacktrace in log] // Check that logging LogExtra::Stacktrace and LogFlush don't require a diff --git a/samples/s3api/CMakeLists.txt b/samples/s3api/CMakeLists.txt index af7135f0f477..a98d504ef873 100644 --- a/samples/s3api/CMakeLists.txt +++ b/samples/s3api/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.14) project(userver-samples-s3api CXX) # /// [s3api] +# cmake find_package(userver COMPONENTS core s3api REQUIRED) add_library(${PROJECT_NAME}_objs OBJECT @@ -15,6 +16,7 @@ add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_objs) # /// [gtest] +# cmake add_executable(${PROJECT_NAME}-unittest unittests/client_test.cpp) target_link_libraries(${PROJECT_NAME}-unittest ${PROJECT_NAME}_objs diff --git a/scripts/docs/doxygen.conf b/scripts/docs/doxygen.conf index 52e2a5cd6dd4..7f5284df5093 100644 --- a/scripts/docs/doxygen.conf +++ b/scripts/docs/doxygen.conf @@ -191,6 +191,8 @@ STRIP_FROM_PATH = universal/include \ rabbitmq/include \ mysql/include \ ydb/include \ + libraries/s3api/include \ + libraries/grpc-reflection/include \ scripts/docs # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the @@ -217,6 +219,8 @@ STRIP_FROM_INC_PATH = universal/include \ rabbitmq/include \ mysq/include \ ydb/include \ + libraries/s3api/include \ + libraries/grpc-reflection/include \ scripts/docs # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but @@ -991,6 +995,7 @@ INPUT = CONTRIBUTING.md \ otlp/include \ testsuite/pytest_plugins/ \ docker-compose.yml \ + libraries \ scripts/docker/ # This tag can be used to specify the character encoding of the source files diff --git a/scripts/docs/en/index.md b/scripts/docs/en/index.md index e53a6aa11ead..8a6f8e042914 100644 --- a/scripts/docs/en/index.md +++ b/scripts/docs/en/index.md @@ -61,6 +61,7 @@ are available at the * @ref scripts/docs/en/userver/tutorial/digest_auth_postgres.md * @ref scripts/docs/en/userver/tutorial/websocket_service.md * @ref scripts/docs/en/userver/tutorial/multipart_service.md +* @ref scripts/docs/en/userver/tutorial/s3api.md * @ref scripts/docs/en/userver/tutorial/json_to_yaml.md diff --git a/scripts/docs/en/userver/development/stability.md b/scripts/docs/en/userver/development/stability.md index 7d2c80d1d68c..721446d55d2b 100644 --- a/scripts/docs/en/userver/development/stability.md +++ b/scripts/docs/en/userver/development/stability.md @@ -71,5 +71,5 @@ There are tiers to differentiate technologies: ---------- @htmlonly
@endhtmlonly -⇦ @ref clickhouse_driver | @ref scripts/docs/en/userver/driver_guide.md ⇨ +⇦ @ref scripts/docs/en/userver/libraries/grpc-reflection.md | @ref scripts/docs/en/userver/driver_guide.md ⇨ @htmlonly
@endhtmlonly diff --git a/scripts/docs/en/userver/libraries/grpc-reflection.md b/scripts/docs/en/userver/libraries/grpc-reflection.md index c5af543d1abf..b253c00370ee 100644 --- a/scripts/docs/en/userver/libraries/grpc-reflection.md +++ b/scripts/docs/en/userver/libraries/grpc-reflection.md @@ -12,13 +12,13 @@ replace all standard primitives with userver ones. To be honest, usage is exceedingly simple: 1. Link with in your CMakeLists.txt -``` +```cmake find_package(userver COMPONENTS grpc grpc-reflection REQUIRED) target_link_libraries(${PROJECT_NAME} userver::grpc-reflection) ``` 2. Add component to your service -``` +```cpp #include @@ -28,11 +28,12 @@ int main(int argc, char* argv[]) { .Append() .... } -.... +``` 3. Add simple line to your config.yaml Don't forget that grpc-reflection requires grpc ``` +yaml components_manager: components: grpc-reflection-service: diff --git a/scripts/docs/en/userver/publications.md b/scripts/docs/en/userver/publications.md index 9b77890c418f..cb4d05c16f71 100644 --- a/scripts/docs/en/userver/publications.md +++ b/scripts/docs/en/userver/publications.md @@ -37,13 +37,15 @@ ## Technologies overview * 📖 Generic async engine implementation (ru): [Анатомия асинхронных фреймворков в С++ и других языках](https://habr.com/ru/company/yandex/blog/647853/) * 🎥 Generic async engine implementation (ru): [Анатомия асинхронных движков](https://youtu.be/MiE22pTvnPs) +* 🎥 Mutex implementation in userver (ru): [Реализация мьютекса в userver](https://www.youtube.com/watch?v=myaEpjYyx3I) * 🎥 Description of utils::FastPimpl, formats::parse::To and logging implementation (ru): [C++ трюки из Такси](https://youtu.be/_AkF8SpUV3k) * 🎥 Description of utils::LazyPrvalue, utils::FixedArray, utils::TrivialBiMap, ODR-detection in PostgreSQL [C++ трюки из userver](https://www.youtube.com/watch?v=FcQC19CX-AY) * 🎥 Description of cache::LruSet implementation and optimizations (ru): [Ещё чуть быстрее делаем свой контейнер](https://youtu.be/60XhYzkXu1M) -* 🎥 Monolyth vs. Microservices architecture and how userver works around their issues (ru): +* 🎥 Monolithic vs. Microservices architecture and how userver works around their issues (ru): [Монолит vs Микросервисы, и Как эффективно работать с последними в C++](https://youtu.be/5QtAFKgS938) * 📖 Retries, exponential backoff, jitter, rate limits, circuit breakers, deadline propagations and other important features for stability (ru): [Хороший ретрай, плохой ретрай, или История одного падения](https://habr.com/ru/companies/yandex/articles/762678/) +* 📖 Dirty C++ tricks from userver and Boost (ru): [Грязные трюки C++ из userver и Boost](https://habr.com/ru/companies/yandex/articles/852244/) * 📖 [Story of website design at Behance](https://www.behance.net/gallery/185906583/Userver-C) diff --git a/scripts/docs/en/userver/roadmap_and_changelog.md b/scripts/docs/en/userver/roadmap_and_changelog.md index 6a83839562c1..7c5877157aad 100644 --- a/scripts/docs/en/userver/roadmap_and_changelog.md +++ b/scripts/docs/en/userver/roadmap_and_changelog.md @@ -35,10 +35,12 @@ Changelog news also go to the ### Release v2.5 -* Added S3 API client s3api::Client. More docs to come soon. Many thanks to +* Added @ref scripts/docs/en/userver/libraries/s3api.md "S3 API client s3api::Client". Many thanks to [v-for-vandal](https://github.com/v-for-vandal) for the work! -* Added gRPC reflection library. More docs to come soon. Many thanks to +* Added @ref scripts/docs/en/userver/libraries/grpc-reflection.md "gRPC reflection library". Many thanks to [v-for-vandal](https://github.com/v-for-vandal) for the work! +* Added @ref kill_switches "Kill Switch" functionality. Many thanks to + [Aksenov Anton](https://github.com/Dangerio) for the work! * @ref scripts/docs/en/userver/congestion_control.md "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. diff --git a/scripts/docs/en/userver/tutorial/json_to_yaml.md b/scripts/docs/en/userver/tutorial/json_to_yaml.md index e007c6c10426..e04161b3e570 100644 --- a/scripts/docs/en/userver/tutorial/json_to_yaml.md +++ b/scripts/docs/en/userver/tutorial/json_to_yaml.md @@ -104,7 +104,7 @@ See the full example at: ---------- @htmlonly
@endhtmlonly -⇦ @ref scripts/docs/en/userver/tutorial/multipart_service.md | @ref scripts/docs/en/userver/component_system.md ⇨ +⇦ @ref scripts/docs/en/userver/tutorial/s3api.md | @ref scripts/docs/en/userver/component_system.md ⇨ @htmlonly
@endhtmlonly diff --git a/scripts/docs/en/userver/tutorial/multipart_service.md b/scripts/docs/en/userver/tutorial/multipart_service.md index a41cb21ea19e..d7ef4284017d 100644 --- a/scripts/docs/en/userver/tutorial/multipart_service.md +++ b/scripts/docs/en/userver/tutorial/multipart_service.md @@ -176,7 +176,7 @@ See the full example at: ---------- @htmlonly
@endhtmlonly -⇦ @ref scripts/docs/en/userver/tutorial/websocket_service.md | @ref scripts/docs/en/userver/tutorial/json_to_yaml.md ⇨ +⇦ @ref scripts/docs/en/userver/tutorial/websocket_service.md | @ref scripts/docs/en/userver/tutorial/s3api.md ⇨ @htmlonly
@endhtmlonly diff --git a/scripts/docs/en/userver/tutorial/s3api.md b/scripts/docs/en/userver/tutorial/s3api.md index ec5f7085cf8e..bccf60588f73 100644 --- a/scripts/docs/en/userver/tutorial/s3api.md +++ b/scripts/docs/en/userver/tutorial/s3api.md @@ -35,7 +35,9 @@ Here is usage example ## Testing We provide google mock for client, that you can access by including header -```#include ``` +```cpp +#include +``` With this mock, you have full power of Google Mock at your fingertips: @@ -48,7 +50,7 @@ To add tests to your project, add appropriate lines to CMakeLists.txt, like this ## Testsuite support -Testsuite module is provided as part of testsuite plugins and can be found here: +Testsuite module is provided as part of testsuite plugins and can be found at: @ref testsuite/pytest_plugins/pytest_userver/plugins/s3api.py @@ -66,8 +68,14 @@ See the full example at: ---------- +@htmlonly
@endhtmlonly +⇦ @ref scripts/docs/en/userver/tutorial/multipart_service.md | @ref scripts/docs/en/userver/tutorial/json_to_yaml.md ⇨ +@htmlonly
@endhtmlonly + @example samples/s3api/src/s3api_client.hpp @example samples/s3api/src/s3api_client.cpp @example samples/s3api/unittests/client_test.cpp @example samples/s3api/main.cpp @example samples/s3api/CMakeLists.txt + +@example testsuite/pytest_plugins/pytest_userver/plugins/s3api.py