summaryrefslogtreecommitdiffstats
path: root/library/cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Collect subcommand parts in getoptilikepugs2025-11-266-3/+122
| | | | | | | | | | | | | | | | #### Проблема Из TOptsParseResult сейчас невозможно понять, какую команду вызвали. Существует метод [GetProgrammName](https://nda.ya.ru/t/SdJXhPQC7NczPm, который частично решает эту задачу, однако: 1. Его поведение зависит от флага [PrintShortCommandInUsage](https://nda.ya.ru/t/3sh6_wPV7NczPt Выставление флага меняет вывод `help` 2. Даже с флагом метод отдает одну строку вместе с запускаемым бинарем. Если хочется отделить только submod'ы, то эту строку приходится сплитить. #### Решение Добавил всюду где нужно InvocationParts, которые заполняются по ходу парсинга входных аргументов. В конечном итоге эти parts передаются в TOptsParseResult, откуда могут быть получены вызывающей стороной. commit_hash:4cf72141552793b19a725b3d394b81215508b85f
* Update env contract to deal with nullnicktitov2025-11-261-1/+6
| | | | | | | В продолжение <https://nda.ya.ru/t/Zv2eRt4A7Ncwc7> Поддерживаем контракт в env.cpp (используется в BinaryPath), т.к. он тоже строит из `env.json.txt` окружение и при обнаружении Null падает commit_hash:6d01c031662f29c665a54fe4f4036a3bf7dea99a
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-261-1/+1
| | | | commit_hash:85eaf10c25d47cdfa012339dfc2c7d054754d12a
* Switch generic tls to thread_local-based implkulikov2025-11-261-1/+1
| | | | | After this, it becomes possible to zerodiff replace thread\_local variables with generic local values. Replace default TThreadLocal with generic will lead to it's destruction on thread exit, but it seems to be more correct behavior (e.g., avoid leaks on thread pool restart). commit_hash:6e5a0908ca239c1bac3ce6ba47de9e53290d6211
* json_writer: remove unused predicate and move out result stringswarmer2025-11-261-12/+2
| | | | commit_hash:11905e9c07bac938a838c340f99a05579e2f5b5c
* Add AVX2 version of TriWayDotProduct #29384eivanov892025-11-2511-118/+654
| | | | commit_hash:44faaa78b7fe05dab4c716202becad3c8beed79a
* YT-25364: Support TNonEmpty serialization and fix issuesapollo13212025-11-254-0/+394
| | | | commit_hash:87bdc41e776a8f4e0bfdf3b47804055a1e62c9ee
* Create new plugin agent_logs_inputhobbit2025-11-252-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Summary** Реализован новый входной плагин `agent_logs` для отправки логов самого агента в пайплайн unified\_agent. Это решает проблему доступа к логам агента в production окружении, где требовались права System developer для доступа к файлам на дисках. ## **What's Changed** {#whats-changed} ### **New Plugin: `agent_logs_input`** {#new-plugin-agent_logs_input} Добавлен новый входной плагин, который: * Перехватывает логи агента через кастомный `TLogBackend` * Отправляет логи в пайплайн стриммингово (не пулингом) * Поддерживает фильтрацию по уровню логов (настройка **level**, по умолчанию `NOTICE`) ### **Implementation Details** {#implementation-details} **Основные компоненты:** 1. **TAgentLogsBackend** - кастомный log backend: * Наследуется от `TLogBackend` * Перехватывает все логи агента через метод `WriteData()` * Фильтрует логи по приоритету * Отправляет отфильтрованные логи в `IMessageConsumer` * Поддерживает graceful stop 2. **TPlugin** - основной класс плагина: * Управляет lifecycle плагина * Создает сессию с ID `agent_logs` * Передает конфигурацию в session handler 3. **TSessionHandler** - обработчик сессии: * Создает и регистрирует `TAgentLogsBackend` * Добавляет backend в глобальный logger через `AddLog()` * Управляет остановкой backend'а **Пример конфигурации:** ``` routes: - input: plugin: agent_logs config: level: INFO channel: pipe: - filter: plugin: format_otel_logs output: # https://nda.ya.ru/t/YexxO8Qf7NZMzy plugin: otel_logs config: url: "collector.logs.yandex-team.ru:443" project: hobbit_test_project service: logs # https://nda.ya.ru/t/o4MQT5rI7NZMzz oauth: secret: env: TEST_LOGS_OAUTH agent_log: priority: INFO rate_limit_bytes: 100000 ``` commit_hash:c6f115ab98c30a47845ce9f9f8a58ef89973d422
* TThreadLocalValue over standard thread_localskulikov2025-11-251-0/+122
| | | | | | | | | | | | | | Current TThreadLocal implementation doesn't destroy objects on thread exit (so we can't replace thread\_local tls value with it, and with TGenericLocalValue too), standard thread\_local values can't be class members. So try to reimplement TThreadLocalValue: - instead of adressing by thread id, address objects by uniq object id in thread\_local deque of all objects of current type; - use hashmap of all existing perthread deques to destroy objects with their TThreadLocal; - try to make object ids flat; - no complex lookup inside and no contention between tls.Get calls; - ShortLivedThreads ut now works; - some fixes in Trace ut, make threads outlive tls value; - benchmark results <https://nda.ya.ru/t/agWa9PW67NYAAK>, looks better than all others; - probably should switch to this implementation by default and remove old. commit_hash:262ce4d363751f577373a452a0c2c84d1fe5b79c
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-231-1/+1
| | | | commit_hash:d1d3470945b75209c60933934938e65e6d2e5c6f
* Fix gRPC retry parser initialization race conditionandybg2025-11-231-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Проблема: Сегментация через ~42 секунды после запуска UA в ServiceConfigParser::GetParserIndex("retry"). Причина: Static Initialization Order Fiasco + Lazy Initialization в gRPC CoreConfiguration. RetryFilter пытается получить парсер до того, как CoreConfiguration зарегистрировала его. Решение: 1. Устанавливаем лимиты потоков ДО grpc_init() (статические параметры) 2. Явно вызываем grpc_init() для гарантии выполнения всех статических инициализаторов 3. Принудительно инициализируем CoreConfiguration через CoreConfiguration::Get() Это гарантирует порядок: - Настройка лимитов потоков - Инициализация библиотеки gRPC - Построение CoreConfiguration с регистрацией всех парсеров - Только после этого фильтры могут безопасно использовать retry парсер Изменения: - library/cpp/unified_agent_client/grpc_io.cpp: Исправлена EnsureGrpcConfigured() - tests/ut/grpc_init_ut.cpp: Добавлены unit тесты - tests/grpc_init_check/: Standalone тестовая программа - tests/ut/ya.make: Интеграция тестов в систему сборки Все тесты прошли: 640/640 OK commit_hash:ed4601dfe21f6dfac653dec6e9c3e535e5a0a09c
* forward decalaration for the TJsonValueswarmer2025-11-203-6/+8
| | | | commit_hash:856a8b4b61af064aec80aa907e2784f9d4ffce61
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-201-1/+1
| | | | commit_hash:841cd252299527798d4943b3e845ac997c059ac8
* Generic thread (yt fiber, etc) local storagekulikov2025-11-183-1/+109
| | | | commit_hash:cc357d273b7ce5c911d194dd51fae5668877693c
* Make TMurmurHash2A ctor explicitakhropov2025-11-181-1/+1
| | | | commit_hash:75d52d415f51a89383bdbe69eb4bacf9285ebd8f
* Intermediate changesrobot-piglet2025-11-171-4/+0
| | | | commit_hash:35721aabcf5384a781bf026ad6dc365e2aa64426
* Allow implicit cast from TIntrusivePtr<T> to TIntrusivePtr<const T>kvk19202025-11-172-12/+30
| | | | commit_hash:83dda252d4be350031caade9e138ba8e91930836
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-171-1/+1
| | | | commit_hash:7178f5732d2f485b1dc0b510f71e3db6c038dd23
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-141-1/+1
| | | | commit_hash:0321f6681dac1a0ba38394a66471582be1909c29
* Add Y_LIFETIME_BOUND to TYsonStringBufapachee2025-11-131-3/+3
| | | | commit_hash:9c12a10680e9747d55895676d6a299dd0ddfd8a8
* typoilyaershov2025-11-131-1/+1
| | | | commit_hash:5146c201b1a586d9cee2ed1495545fe4708a9fd1
* Annotate BYREF attribute accessors with Y_LIFETIME_BOUNDbabenko2025-11-121-11/+12
| | | | commit_hash:3436f18ce66beb90bf8f89a674e715ac4b9a1098
* [library/cpp/scheme] Add const GetNoAdd methods, move return value in Delete ↵denisostashov2025-11-123-2/+66
| | | | | | | method [library/cpp/scheme] Add const GetNoAdd methods, move return value in Delete method commit_hash:94e4b516948789e0092e2d88f2e3d1079da2b99a
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-111-1/+1
| | | | commit_hash:f5f4e6f04728a8e4dd9d6e5e5ae7a0f12e5f45d0
* Add an option to remove comparison operators for strong typedefh0pless2025-11-103-49/+68
| | | | commit_hash:b9ffae1ce4077a1f26ccbd0abf0596cae292d225
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-081-1/+1
| | | | commit_hash:7abb65476f64901a307ac3770777764808d7265d
* Better commentthegeorg2025-11-071-1/+5
| | | | commit_hash:27b70d710c76793e58a4ed81dcd053907e389d85
* Try to prevent slicing in `co_return ex;`thegeorg2025-11-062-1/+11
| | | | commit_hash:348f2fb14a4a93cfa3c8504419d021c1f41e4b8f
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-051-1/+1
| | | | commit_hash:ac2fc180178c71b225b0ae90af727b3fe2459110
* YT-18571: Refactor environ helpersbabenko2025-11-026-1/+138
| | | | commit_hash:72977e13820ded4a38d19076b1d336c9bb910dbf
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-021-1/+1
| | | | commit_hash:7184cfb50e2b9c88c16d93db41dd051068b21695
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-11-011-1/+1
| | | | commit_hash:f0c46523593c7b73b313968e01da242b16bd0298
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-291-1/+1
| | | | commit_hash:8d2c18bc697b0b931821332d770b34ce51313ce6
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-261-1/+1
| | | | commit_hash:bc614722ddb5b656411aa602c935afad57c7acdd
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-231-2/+1
| | | | commit_hash:fd060b334bdeb27f6f363b19840397ac4b145f68
* fix data race in lwtraceyegorskii2025-10-223-3/+302
| | | | commit_hash:a3736570695184ad17b24a2a6da642132020197c
* YT-18571: Fixed range construction from spankoloshmet2025-10-211-1/+1
| | | | | Fixed range construction from span commit_hash:a7b4b66073a1d5ea79abc304966494b1e9543919
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-201-1/+1
| | | | commit_hash:007eb2da67fd2040e9eb9d53e860fca34d075712
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-171-1/+1
| | | | commit_hash:c920cb528ec19c550350408b68ed5e2ac781f375
* Fix a bunch of post-commit issuesifsmirnov2025-10-161-4/+4
| | | | commit_hash:877204cca8999f10cdc5edfa1a2297e2a0292d71
* TWriteGuard on GetOrNull for ThreadSaveCache with promotiondskor2025-10-162-5/+63
| | | | | Find может делать Promote, который мутирует List ( LRUList например: <https://nda.ya.ru/t/fFSNn0ML7LRudF> ) commit_hash:dca1db67d45c7faca51cc1251cbe155c7857e362
* Mute or fix some checks improved in clang-tidy20 in librarymikhnenko2025-10-152-0/+4
| | | | commit_hash:e93b9ad8b27da3da2372b00bf59ae87a98d0b862
* fix buffer overrunxenoxeno2025-10-142-9/+7
| | | | commit_hash:013178051e5e4c0a99ded31893069fb928ba18f9
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-141-1/+1
| | | | commit_hash:9d9f0cc89424b60fbdf176953e5e0782e3a9cd3d
* ysize -> size.akhropov2025-10-111-1/+1
| | | | commit_hash:5be5816fa0d06087b51636b3acfaf53350e750da
* Fix a potential memory leakakhropov2025-10-111-2/+2
| | | | commit_hash:17b4088b80f1a7446525ed8eebf0566b3e3a7888
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-111-1/+1
| | | | commit_hash:953fbbbb13b2ce6538a41da042f04cbb8610619c
* Add a comment noting that assignment operators could change the typeakhropov2025-10-081-0/+3
| | | | commit_hash:d7aa6614e2ad37c30d381ce47580aabb7a15a595
* New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2025-10-081-1/+1
| | | | commit_hash:28e7005fc310c73dc481414ec957dcf4d836fb49
* Intermediate changesrobot-piglet2025-10-071-4/+4
| | | | commit_hash:750c9e900f9b56e84ebbac73a0dd8b987d76cb47