diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2025-02-12 14:24:11 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2025-02-12 14:54:43 +0300 |
commit | d632de730cc82b28392bd8e3c10173fc07d450f2 (patch) | |
tree | 8ad9599b76437949b7c1b42bcec15db5cbd24b95 | |
parent | edeef2584c0fc734d50dd674293597f3d4314875 (diff) | |
download | ydb-d632de730cc82b28392bd8e3c10173fc07d450f2.tar.gz |
Add Annotations and Description options to TOperationSpecBase
commit_hash:43a44fd322be5b98ea4f4c90ee0c5eebef9241e0
-rw-r--r-- | yt/cpp/mapreduce/client/operation.cpp | 6 | ||||
-rw-r--r-- | yt/cpp/mapreduce/interface/operation.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp index c8cbe5b644..76a55b436f 100644 --- a/yt/cpp/mapreduce/client/operation.cpp +++ b/yt/cpp/mapreduce/client/operation.cpp @@ -879,6 +879,12 @@ void BuildCommonOperationPart( if (baseSpec.MaxFailedJobCount_.Defined()) { (*specNode)["max_failed_job_count"] = *baseSpec.MaxFailedJobCount_; } + if (baseSpec.Description_.Defined()) { + (*specNode)["description"] = *baseSpec.Description_; + } + if (baseSpec.Annotations_.Defined()) { + (*specNode)["annotations"] = *baseSpec.Annotations_; + } } template <typename TSpec> diff --git a/yt/cpp/mapreduce/interface/operation.h b/yt/cpp/mapreduce/interface/operation.h index 218ead0572..c1beb5375d 100644 --- a/yt/cpp/mapreduce/interface/operation.h +++ b/yt/cpp/mapreduce/interface/operation.h @@ -542,6 +542,12 @@ struct TOperationSpecBase /// How many jobs can fail before operation is failed. FLUENT_FIELD_OPTION(ui64, MaxFailedJobCount); + + // Arbitrary structured information related to the operation. + FLUENT_FIELD_OPTION(TNode, Annotations); + + // Similar to Annotations, shown on the operation page. Recommends concise, human-readable entries to prevent clutter. + FLUENT_FIELD_OPTION(TNode, Description); }; /// |