nighthawk
nighthawk copied to clipboard
Missing check for adaptive load proto rules
Many adaptive load protos specify constraints on field values ([(validate.rules)...]), but we never actually call Envoy::MessageUtil::validate() to process them. This should be done within AdaptiveLoadSessionSpecProtoHelperImpl::CheckSessionSpec().
Note:
/**
* Validate protoc-gen-validate constraints on a given protobuf.
* Note the corresponding `.pb.validate.h` for the message has to be included in the source file
* of caller.
* @param message message to validate.
* @throw ProtoValidationException if the message does not satisfy its type constraints.
*/
template <class MessageType>
static void validate(const MessageType& message,
ProtobufMessage::ValidationVisitor& validation_visitor) {
Hi, I'm interested in taking this. Please assign it to me.
Thank you for your help @colimitt!