<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/yt/error, branch oidc-1.0.0</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=oidc-1.0.0</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=oidc-1.0.0'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2024-11-29T19:12:26Z</updated>
<entry>
<title>YT-21233: Introduce ToAttributeValue cpo which removes dependency of TErrorAttribute from yt/core</title>
<updated>2024-11-29T19:12:26Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-11-29T19:02:21Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=b21317884da9622ac16bbad26627ae014d72d6a7'/>
<id>urn:sha1:b21317884da9622ac16bbad26627ae014d72d6a7</id>
<content type='text'>
Plan:

 1) Remove `IAttributedDictionary` type from the public API. \+

 2) Remove `Set` method from public API in favor of `operator&lt;&lt;=`. \+

 3) Adopt `ConvertTo&lt;T&gt;` (or other name) CPO with proper extension into `NYT::NYson::ConvertTo` from `yt/core`.

 4) Use CPO from (3) to eliminate direct dependency on `yt/core` of `Get/Find` methods from attributes API.

 5) Adopt `ConvertToYsonString` (or other name) CPO with proper extension into `yt/core` customisations.

 6) Use CPO from (5) to eliminate direct dependency on `yt/core` of `TErrorAttribute` ctor.

 7) Swap attributes implementation to the one which doesn’t use `IAttributeDictionary`.

 8) At this point `stripped_error*` can be moved to library/cpp/yt and so can recursively dependant on THROW macro methods `Get/Find/…`.

 9) Adjust CPO’s to work with `std::string` instead of `TYsonString` assuming text format to be used (maybe `TString` for now).

10) Remove dep of `library/cpp/yt/error` on `yson` entirely.

This pr addresses 5-6 steps of plan. Below is a brief explanation of design decisions. We also expressed everything related to key-value code in terms of aliases of `TErrorAttribute` so that later we could make a relatively simple switch to `std::string`. We expect to do steps 7-8 in the next pull request as everything should be ready
commit_hash:de9feca2bd24d823b33d904ef0fa5f4856f9b020
</content>
</entry>
<entry>
<title>YT-21233: Rewrite ConvertTo CPO using TagInvoke</title>
<updated>2024-11-08T16:28:18Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-11-08T16:15:54Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=69ea2aad0490aa3b45a377306f29d0e94876ee68'/>
<id>urn:sha1:69ea2aad0490aa3b45a377306f29d0e94876ee68</id>
<content type='text'>
Plan:

 1) Remove `IAttributedDictionary` type from the public API. \+

 2) Remove `Set` method from public API in favor of `operator&lt;&lt;=`. \+

 3) Adopt `ConvertTo&lt;T&gt;` (or other name) CPO with proper extension into `NYT::NYson::ConvertTo` from `yt/core`.

 4) Use CPO from (3) to eliminate direct dependency on `yt/core` of `Get/Find` methods from attributes API.

 5) Adopt `ConvertToYsonString` (or other name) CPO with proper extension into `yt/core` customisations.

 6) Use CPO from (5) to eliminate direct dependency on `yt/core` of `TErrorAttribute` ctor.

 7) Swap attributes implementation to the one which doesn’t use `IAttributeDictionary`.

 8) At this point `stripped_error*` can be moved to library/cpp/yt and so can recursively dependant on THROW macro methods `Get/Find/…`.

 9) Adjust CPO’s to work with `std::string` instead of `TYsonString` assuming text format to be used (maybe `TString` for now).

10) Remove dep of `library/cpp/yt/error` on `yson` entirely.

This pr addresses 3-4 steps of plan. Below is a brief explanation of design decisions.

We want to have a concept which detects if there is a `ConvertTo` method and if true, try calling it. Templates can only perform unqualified name lookup and if we allow non-ADL overloads to be found, we would have dependency on inclusion order (if `ConvertTo` is included prior to our code, everything works fine, but if the order is reverse, templated dispatch would fail, but direct call would work just fine). That is why we adopt niebloids which first disable ADL lookup of the name `ConvertTo` by directing it to niebloid implemented via `TagInvoke` mechanism. TagInvoke design &lt;https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf&gt; . TL;DR: we want to have behavior which is consistent with inclusion order.

Key difference now is that `ConvertTo` works consistently in both manual calls and template function body calls and is no longer visible for ADL part of the unqualified name lookup
commit_hash:32af641bd0af559bfe670c2ceb36721fb4afc2dd
</content>
</entry>
<entry>
<title>YT-21233: Introduce TErrorAttributes as an opaque type for attributes to hide dependencies on IAttributeDictionary's API</title>
<updated>2024-10-22T16:13:37Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-10-22T15:15:25Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=477bb1cd2d7d44f218454a8a4137a849eb7e64fa'/>
<id>urn:sha1:477bb1cd2d7d44f218454a8a4137a849eb7e64fa</id>
<content type='text'>
Plan:

1) Remove `IAttributedDictionary` type from the public API. \+

2) Remove `Set` method from public API in favor of `operator&lt;&lt;=`. \+

3) Adopt `ConvertTo&lt;T&gt;` (or other name) CPO with proper extension into `NYT::NYson::ConvertTo` from `yt/core`.

4) Use CPO from (3) to eliminate direct dependency on `yt/core` of `Get/Find` methods from attributes API.

5) Adopt `ConvertToYsonString` (or other name) CPO with proper extension into `yt/core` customisations.

6) Use CPO from (5) to eliminate direct dependency on `yt/core` of `TErrorAttribute` ctor.

7) Swap attributes implementation to the one which doesn’t use `IAttributeDictionary`.

8) At this point `stripped_error*` can be moved to library/cpp/yt and so can recursively dependant on THROW macro methods `Get/Find/…`.

9) Adjust CPO’s to work with `std::string` instead of `TYsonString` assuming text format to be used (maybe `TString` for now).

10) Remove dep of `library/cpp/yt/error` on `yson` entirely.

This pull request covers steps 1 and 2 laying foundation to 3-4 being implemented in the next one
commit_hash:e899bccdef4ebed321ea2eb93215282694c261ac
</content>
</entry>
<entry>
<title>init pid field</title>
<updated>2024-09-18T09:14:33Z</updated>
<author>
<name>uzhas</name>
<email>uzhas@yandex-team.com</email>
</author>
<published>2024-09-18T09:05:02Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=1717aa802f5771efb3c5cbbdbfc64160bd57ba53'/>
<id>urn:sha1:1717aa802f5771efb3c5cbbdbfc64160bd57ba53</id>
<content type='text'>
commit_hash:018112cc71f6f4d8bb32bb04a09e8741ba4f8d3d
</content>
</entry>
<entry>
<title>YT-21233: Split error into error and stripped_error to rid the latter of deps on global variables</title>
<updated>2024-08-15T15:44:19Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-08-15T15:32:55Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=28ff4da78aa89f0226af33522332b7f06521412e'/>
<id>urn:sha1:28ff4da78aa89f0226af33522332b7f06521412e</id>
<content type='text'>
What happened:
1. error contents has been split into stripped_error and error. stripped_error contains the error itself (with attributes for now) and macros; error contains stripped_error and some extensions, namely, functions to get fiberId, hostname and traceid/spanid and all functions used to (de-)serialize error. This means that you cannot print error if you only include stripped_error, therefore you are likely to still require the entire error.h at the moment.
2. Mechanic for gathering origin attributes has been moved to newly created library/cpp/yt/error thus having no dependency on fibers, net or tracing. stripped_error uses these attributes as extendable semi-erased (meaning, you still would have to add a field and recompile the entire thing, but you don't have to introduce an extra dependency) storage for a bunch of attributes
3. Parsing of said attributes is done in error file (and not stripped_error).

P.S. So far the plan is to eventually move stripped_error (once dependency on core/ytree/attributes is eliminated) without any actual change to dependency graph of anything outside of core (e.g. you would still have to include misc/error.h to use it). Next step would be re-teaching the error how to print, which would move some more methods from core to the standalone module. After that one could finally depend on the error itself and not the entire core.

Annotations: [nodiff:caesar]
66615172181355821241d2e5f8e4a0f15e0ea791
</content>
</entry>
</feed>
