Log warning when tap outputs invalid SCHEMA or RECORD message

For example:

  • a SCHEMA message with properties without a type/anyOf: #2485 (closed)
  • a SCHEMA message with multiple mutually incompatible types for one property: tap-facebook#7 (closed)
  • a RECORD message not matching the SCHEMA for the same stream

Some targets may handle be able to handle these misformed messages correctly by working around their lack of compliance with the Singer spec (https://github.com/singer-io/getting-started/blob/master/docs/SPEC.md#schema-message), but Meltano can log to aid in debugging when targets do fail.

Once we have #2469 (closed), users will be able to work around these issues by manually providing a correct schema using https://meltano.com/docs/plugins.html#schema-extra. Of course, fixing the tap is still preferable, but bandaids have their use.

Message validation should be handled asynchronously and should not slow down throughput of messages from tap to target. We'll probably want a setting to opt-in/out.

Edited by Douwe Maan