In the status quo ante, evaluating a type check may return None or yield an instance of TypeCheck (=passed) or else raise Failure (=failed). This seems like a bad interface for a couple of reasons.
- First, it's quite natural for users to return True/False to indicate success/failure in the ordinary case, especially as they ramp up (and let the Dagster machinery generate events as needed).
- Second, the interaction of the typecheck_metadata_fn and type_check is obscure. Why not simply allow a TypeCheck to be returned from the type_check when a user wants to include additional metadata?
- Third, when a type check fails, why shouldn't we be able to return metadata about the failure? i.e., by returning a TypeCheck(success=False)
Stacked on D1389