Skip to content

Commit ed44f43

Browse files
author
pananton
committed
feat userver: add support for formats::json:Value to proto structs
Relates: <https://nda.ya.ru/t/Dx1JoAAr7M6sew> commit_hash:5e50bb8b15058e2e94c723c3ae59395150e473eb
1 parent 6c55b2b commit ed44f43

File tree

78 files changed

+1061
-525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1061
-525
lines changed

.mapping.json

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,6 +2910,12 @@
29102910
"libraries/proto-structs/include/userver/proto-structs/io/supported_types_conv.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/supported_types_conv.hpp",
29112911
"libraries/proto-structs/include/userver/proto-structs/io/userver/decimal64/decimal.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/decimal64/decimal.hpp",
29122912
"libraries/proto-structs/include/userver/proto-structs/io/userver/decimal64/decimal_conv.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/decimal64/decimal_conv.hpp",
2913+
"libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/array.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/array.hpp",
2914+
"libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/array_conv.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/array_conv.hpp",
2915+
"libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/object.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/object.hpp",
2916+
"libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/object_conv.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/object_conv.hpp",
2917+
"libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/value.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/value.hpp",
2918+
"libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/value_conv.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/formats/json/value_conv.hpp",
29132919
"libraries/proto-structs/include/userver/proto-structs/io/userver/proto_structs/any.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/proto_structs/any.hpp",
29142920
"libraries/proto-structs/include/userver/proto-structs/io/userver/proto_structs/any_conv.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/proto_structs/any_conv.hpp",
29152921
"libraries/proto-structs/include/userver/proto-structs/io/userver/proto_structs/date.hpp":"taxi/uservices/userver/libraries/proto-structs/include/userver/proto-structs/io/userver/proto_structs/date.hpp",
@@ -2943,13 +2949,16 @@
29432949
"libraries/proto-structs/src/proto-structs/exceptions.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/exceptions.cpp",
29442950
"libraries/proto-structs/src/proto-structs/io/context_base.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/context_base.cpp",
29452951
"libraries/proto-structs/src/proto-structs/io/impl/field_accessor.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/impl/field_accessor.cpp",
2946-
"libraries/proto-structs/src/proto-structs/io/std/chrono/time_point.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/std/chrono/time_point.cpp",
2947-
"libraries/proto-structs/src/proto-structs/io/std/chrono/year_month_day.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/std/chrono/year_month_day.cpp",
2948-
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/any.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/any.cpp",
2949-
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/date.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/date.cpp",
2950-
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/duration.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/duration.cpp",
2951-
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/time_of_day.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/time_of_day.cpp",
2952-
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/timestamp.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/timestamp.cpp",
2952+
"libraries/proto-structs/src/proto-structs/io/std/chrono/time_point_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/std/chrono/time_point_conv.cpp",
2953+
"libraries/proto-structs/src/proto-structs/io/std/chrono/year_month_day_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/std/chrono/year_month_day_conv.cpp",
2954+
"libraries/proto-structs/src/proto-structs/io/userver/formats/json/array_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/formats/json/array_conv.cpp",
2955+
"libraries/proto-structs/src/proto-structs/io/userver/formats/json/object_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/formats/json/object_conv.cpp",
2956+
"libraries/proto-structs/src/proto-structs/io/userver/formats/json/value_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/formats/json/value_conv.cpp",
2957+
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/any_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/any_conv.cpp",
2958+
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/date_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/date_conv.cpp",
2959+
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/duration_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/duration_conv.cpp",
2960+
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/time_of_day_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/time_of_day_conv.cpp",
2961+
"libraries/proto-structs/src/proto-structs/io/userver/proto_structs/timestamp_conv.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/io/userver/proto_structs/timestamp_conv.cpp",
29532962
"libraries/proto-structs/src/proto-structs/time_of_day.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/time_of_day.cpp",
29542963
"libraries/proto-structs/src/proto-structs/timestamp.cpp":"taxi/uservices/userver/libraries/proto-structs/src/proto-structs/timestamp.cpp",
29552964
"libraries/proto-structs/tests/any_test.cpp":"taxi/uservices/userver/libraries/proto-structs/tests/any_test.cpp",
@@ -3036,13 +3045,7 @@
30363045
"libraries/protobuf/tests/json/value_to_json_test.cpp":"taxi/uservices/userver/libraries/protobuf/tests/json/value_to_json_test.cpp",
30373046
"libraries/protobuf/tests/json/wrapper_from_json_test.cpp":"taxi/uservices/userver/libraries/protobuf/tests/json/wrapper_from_json_test.cpp",
30383047
"libraries/protobuf/tests/json/wrapper_to_json_test.cpp":"taxi/uservices/userver/libraries/protobuf/tests/json/wrapper_to_json_test.cpp",
3039-
"libraries/protobuf/tests/json/ya.make":"taxi/uservices/userver/libraries/protobuf/tests/json/ya.make",
30403048
"libraries/protobuf/tests/proto/proto_json/messages.proto":"taxi/uservices/userver/libraries/protobuf/tests/proto/proto_json/messages.proto",
3041-
"libraries/protobuf/tests/proto/proto_json/ya.make":"taxi/uservices/userver/libraries/protobuf/tests/proto/proto_json/ya.make",
3042-
"libraries/protobuf/tests/proto/ya.make":"taxi/uservices/userver/libraries/protobuf/tests/proto/ya.make",
3043-
"libraries/protobuf/tests/ya.make":"taxi/uservices/userver/libraries/protobuf/tests/ya.make",
3044-
"libraries/protobuf/ya.make":"taxi/uservices/userver/libraries/protobuf/ya.make",
3045-
"libraries/protobuf/ya.make.ext":"taxi/uservices/userver/libraries/protobuf/ya.make.ext",
30463049
"libraries/s3api/CMakeLists.txt":"taxi/uservices/userver/libraries/s3api/CMakeLists.txt",
30473050
"libraries/s3api/include/userver/s3api/authenticators/access_key.hpp":"taxi/uservices/userver/libraries/s3api/include/userver/s3api/authenticators/access_key.hpp",
30483051
"libraries/s3api/include/userver/s3api/authenticators/interface.hpp":"taxi/uservices/userver/libraries/s3api/include/userver/s3api/authenticators/interface.hpp",

grpc/functional_tests/basic_chaos/static_config.yaml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ components_manager:
2020
service-defaults:
2121
task-processor: main-task-processor
2222

23-
# /// [grpc server access log]
23+
# /// [grpc server access log]
2424
grpc-server-access-log:
2525
access-tskv-logger: grpc-access-tskv
26-
# /// [grpc server access log]
26+
# /// [grpc server access log]
2727

28-
# /// [Sample grpc server logging middleware component config]
28+
# /// [Sample grpc server logging middleware component config]
2929
grpc-server-logging:
3030
msg-log-level: info
3131
msg-size-log-limit: 512
32-
# /// [Sample grpc server logging middleware component config]
32+
# /// [Sample grpc server logging middleware component config]
3333

34-
# /// [Sample grpc server deadline propagation middleware component config]
34+
# /// [Sample grpc server deadline propagation middleware component config]
3535
grpc-server-deadline-propagation:
36-
# Nothing
37-
# /// [Sample grpc server deadline propagation middleware component config]
36+
# Nothing
37+
# /// [Sample grpc server deadline propagation middleware component config]
3838

39-
# /// [Sample grpc server baggage middleware component config]
39+
# /// [Sample grpc server baggage middleware component config]
4040
grpc-server-baggage:
41-
# Nothing
42-
# /// [Sample grpc server baggage middleware component config]
41+
# Nothing
42+
# /// [Sample grpc server baggage middleware component config]
4343

44-
# /// [Sample grpc server congestion control middleware component config]
44+
# /// [Sample grpc server congestion control middleware component config]
4545
grpc-server-congestion-control:
46-
# Nothing
47-
# /// [Sample grpc server congestion control middleware component config]
46+
# Nothing
47+
# /// [Sample grpc server congestion control middleware component config]
4848

4949
grpc-client-origin:
5050
user-agent: basic-chaos-service
@@ -107,30 +107,29 @@ components_manager:
107107
testpoint-timeout: 10s
108108
throttling_enabled: false
109109

110-
# /// [Sample grpc client logging middleware component config]
110+
# /// [Sample grpc client logging middleware component config]
111111
grpc-client-logging:
112112
msg-log-level: info
113113
msg-size-log-limit: 512
114-
# /// [Sample grpc client logging middleware component config]
114+
# /// [Sample grpc client logging middleware component config]
115115

116-
# /// [Sample grpc client deadline propagation middleware component config]
116+
# /// [Sample grpc client deadline propagation middleware component config]
117117
grpc-client-deadline-propagation:
118-
# Nothing
119-
# /// [Sample grpc client deadline propagation middleware component config]
118+
# Nothing
119+
# /// [Sample grpc client deadline propagation middleware component config]
120120

121-
# /// [Sample grpc client baggage middleware component config]
121+
# /// [Sample grpc client baggage middleware component config]
122122
grpc-client-baggage:
123-
# Nothing
124-
# /// [Sample grpc client baggage middleware component config]
125-
123+
# Nothing
124+
# /// [Sample grpc client baggage middleware component config]
126125

127126
default_task_processor: main-task-processor
128127

129128
task_processors:
130129
grpc-blocking-task-processor: # For blocking gRPC channel creation
131130
thread_name: grpc-worker
132131
worker_threads: 2
133-
main-task-processor: # For non-blocking operations
132+
main-task-processor: # For non-blocking operations
134133
worker_threads: 4
135-
fs-task-processor: # For blocking filesystem operations
134+
fs-task-processor: # For blocking filesystem operations
136135
worker_threads: 2

grpc/functional_tests/basic_server/static_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ components_manager:
7474
grpc-blocking-task-processor: # For blocking gRPC channel creation
7575
worker_threads: 2
7676
thread_name: grpc-worker
77-
main-task-processor: # For non-blocking operations
77+
main-task-processor: # For non-blocking operations
7878
worker_threads: 8
79-
fs-task-processor: # For blocking filesystem operations
79+
fs-task-processor: # For blocking filesystem operations
8080
worker_threads: 2

grpc/functional_tests/error_status/static_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ components_manager:
4545
grpc-blocking-task-processor: # For blocking gRPC channel creation
4646
thread_name: grpc-worker
4747
worker_threads: 2
48-
main-task-processor: # For non-blocking operations
48+
main-task-processor: # For non-blocking operations
4949
worker_threads: 4
50-
fs-task-processor: # For blocking filesystem operations
50+
fs-task-processor: # For blocking filesystem operations
5151
worker_threads: 2

grpc/functional_tests/lowlevel/static_config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ components_manager:
7070
testpoint-timeout: 10s
7171
throttling_enabled: false
7272
http-client:
73-
http-client-core: # for testsuite
73+
http-client-core: # for testsuite
7474
fs-task-processor: main-task-processor
75-
dns-client: # for http-client-core
75+
dns-client: # for http-client-core
7676
fs-task-processor: fs-task-processor
7777

7878
# User-defined component
@@ -86,7 +86,7 @@ components_manager:
8686
grpc-blocking-task-processor: # For blocking gRPC channel creation
8787
worker_threads: 2
8888
thread_name: grpc-worker
89-
main-task-processor: # For non-blocking operations
89+
main-task-processor: # For non-blocking operations
9090
worker_threads: 8
91-
fs-task-processor: # For blocking filesystem operations
91+
fs-task-processor: # For blocking filesystem operations
9292
worker_threads: 2

grpc/functional_tests/metrics/static_config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ components_manager:
1515
method: GET
1616
task_processor: main-task-processor
1717

18-
1918
# gRPC server and service
2019
grpc-server:
2120
port: 8091
@@ -68,7 +67,7 @@ components_manager:
6867
grpc-blocking-task-processor: # For blocking gRPC channel creation
6968
thread_name: grpc-worker
7069
worker_threads: 2
71-
main-task-processor: # For non-blocking operations
70+
main-task-processor: # For non-blocking operations
7271
worker_threads: 4
73-
fs-task-processor: # For blocking filesystem operations
72+
fs-task-processor: # For blocking filesystem operations
7473
worker_threads: 2

grpc/functional_tests/middleware_client/static_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ components_manager:
7575
grpc-blocking-task-processor: # For blocking gRPC channel creation
7676
thread_name: grpc-worker
7777
worker_threads: 2
78-
main-task-processor: # For non-blocking operations
78+
main-task-processor: # For non-blocking operations
7979
worker_threads: 4
80-
fs-task-processor: # For blocking filesystem operations
80+
fs-task-processor: # For blocking filesystem operations
8181
worker_threads: 2

grpc/functional_tests/middleware_server/static_config.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,26 @@ components_manager:
1515
method: GET
1616
task_processor: main-task-processor
1717

18-
1918
# gRPC server and service
2019
grpc-server:
2120
port: 8091
2221

23-
2422
congestion-control:
2523

26-
27-
# /// [middleware pipeline component config]
24+
# /// [middleware pipeline component config]
2825
grpc-server-logging:
2926
msg-size-log-limit: 15
3027

3128
my-second-middleware-server:
32-
# /// [my-middleware-server config]
29+
# /// [my-middleware-server config]
3330
my-middleware-server:
3431

3532
grpc-server-middlewares-pipeline:
3633
middlewares:
3734
# We must register middlewares in the pipeline:
3835
my-middleware-server:
3936
enabled: true
40-
# /// [my-middleware-server config]
37+
# /// [my-middleware-server config]
4138
my-second-middleware-server:
4239
enabled: true
4340

@@ -46,8 +43,7 @@ components_manager:
4643
middlewares:
4744
grpc-server-logging:
4845
msg-size-log-limit: 10 # you can override a config per service
49-
# /// [middleware pipeline component config]
50-
46+
# /// [middleware pipeline component config]
5147

5248
# http server
5349
server:
@@ -70,7 +66,7 @@ components_manager:
7066
grpc-blocking-task-processor: # For blocking gRPC channel creation
7167
thread_name: grpc-worker
7268
worker_threads: 2
73-
main-task-processor: # For non-blocking operations
69+
main-task-processor: # For non-blocking operations
7470
worker_threads: 4
75-
fs-task-processor: # For blocking filesystem operations
71+
fs-task-processor: # For blocking filesystem operations
7672
worker_threads: 2

grpc/handlers/functional_tests/health/static_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ components_manager:
3232
grpc-blocking-task-processor: # For blocking gRPC channel creation
3333
thread_name: grpc-worker
3434
worker_threads: 2
35-
main-task-processor: # For non-blocking operations
35+
main-task-processor: # For non-blocking operations
3636
worker_threads: 4
37-
fs-task-processor: # For blocking filesystem operations
37+
fs-task-processor: # For blocking filesystem operations
3838
worker_threads: 2

grpc/src/ugrpc/client/client_factory_component.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,15 @@ properties:
1717
properties:
1818
pem-root-certs:
1919
type: string
20-
description: The path to file containing the PEM encoding of the server
21-
root certificates
20+
description: The path to file containing the PEM encoding of the server root certificates
2221
default: absent
2322
pem-private-key:
2423
type: string
25-
description: The path to file containing the PEM encoding of the client's
26-
private key
24+
description: The path to file containing the PEM encoding of the client's private key
2725
default: absent
2826
pem-cert-chain:
2927
type: string
30-
description: The path to file containing the PEM encoding of the client's
31-
certificate chain
28+
description: The path to file containing the PEM encoding of the client's certificate chain
3229
default: absent
3330
retry-config:
3431
type: object
@@ -38,8 +35,7 @@ properties:
3835
properties:
3936
attempts:
4037
type: integer
41-
description: The maximum number of RPC attempts, including the original
42-
attempt
38+
description: The maximum number of RPC attempts, including the original attempt
4339
default: 1
4440
minimum: 1
4541
channel-args:

0 commit comments

Comments
 (0)