nighthawk icon indicating copy to clipboard operation
nighthawk copied to clipboard

Missing check for adaptive load proto rules

Open eric846 opened this issue 5 years ago • 2 comments

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) {

eric846 avatar Sep 25 '20 19:09 eric846

Hi, I'm interested in taking this. Please assign it to me.

colimitt avatar Oct 04 '21 18:10 colimitt

Thank you for your help @colimitt!

mum4k avatar Oct 04 '21 19:10 mum4k