Uploaded image for project: 'ProtoStream'
  1. ProtoStream
  2. IPROTO-82

Useless warnings regarding undefined proto schema annotations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.2.3.Final, 4.3.0.Alpha1
    • None
    • None

    Description

      Protostream emits the warning "Encountered and ignored and unknown annotation..." whenever it parses the documentation text of a definition which contains (pseudo)annotations that were not defined. These warnings do not always make sense for all use cases of a certain schema. For example a user might have some indexing related annotations that are used by the server, but those same anontations will also be seen by the client when parsing the schema and the client does not need to know or care about them. This means the client does not define them in the Protostream configuration to be parsed, so the parser will complain about them later saying they are unknown.

      This issue is benign, as the log message in question is just a WARNing and no exception is thrown, so there is no functional impact on the user app, but it is very noisy and it clogs the log.

      The proposed fix is to not emit any such warnings if there are no custom defined annotations in config. If there is at least one custom annotation, then the old behaviour will continue to exist.

      An new config flag (AnnotationsConfig.logUndefinedAnnotations - default true) is introduced to be able to turn this warning off completely if needed.

      Attachments

        Issue Links

          Activity

            People

              anistor Adrian Nistor (Inactive)
              anistor Adrian Nistor (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: