fix: router_check_tool load runtime flags before running tests#45997
fix: router_check_tool load runtime flags before running tests#45997rgctlln wants to merge 1 commit into
Conversation
|
Hi @rgctlln, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
Signed-off-by: Kirill Alferov <k.g.alferov@tbank.ru> Signed-off-by: Kirill Alferov <kirillalfa94@gmail.com>
0ec63c9 to
08ca2b1
Compare
adisuissa
left a comment
There was a problem hiding this comment.
Thanks!
Left a few questions.
/wait-any
| RouterCheckTool RouterCheckTool::create(const std::string& router_config_file, | ||
| const std::string& validation_config_file, | ||
| const bool disable_deprecation_check) { | ||
| // TODO(hennna): Allow users to load a full config and extract the route configuration from it. |
There was a problem hiding this comment.
Why was this removed?
Is it because of this PR or a previous one?
| Envoy::RouterCheckTool checktool = | ||
| Envoy::RouterCheckTool::create(options.configPath(), options.disableDeprecationCheck()); | ||
| Envoy::RouterCheckTool checktool = Envoy::RouterCheckTool::create( | ||
| options.configPath(), options.testPath(), options.disableDeprecationCheck()); |
There was a problem hiding this comment.
why is testPath() converted to validation_config_file?
| repeated ValidationItem tests = 1 [(validate.rules).repeated .min_items = 1]; | ||
|
|
||
| // The runtime flags to be loaded before running the tests. | ||
| google.protobuf.Struct runtime = 2; |
There was a problem hiding this comment.
Could this be something other than Struct (specifically defined as a normal runtime layer)?
One option is to use the message type defined in api/envoy/service/runtime/v3/rtds.proto. What are the tradeoffs, and why did you choose use Struct?
Commit Message: router_check_tool: Load runtime flags before running the tests.
Additional Description: This adds a new field to the Validation configuration to load runtime flags. More context in #35662 (comment)
Risk Level: Low
Testing: Extended existing tests. Without re2.max_program_size.error_level flag set the test fails.
bazel-bin/test/tools/router_check/router_check_tool -c test/tools/router_check/test/config/DefaultRuntime.yaml -t test/tools/router_check/test/config/DefaultRuntime.golden.proto.json
Fixes: #36660