Closed khoroshevskyi closed 3 months ago
Can you clarify this issue? I can't understand it based on the comment fragment.
I don't remember exactly what was that. But I think that pipestat doesn't show error or doesn't show what keys and values are missing.
e.g. result id is a file. File is a dict with 2 fields: {name: ..., path: ...} . Two of this fields are required!
But user provided only name
. Pipestat won't fail, or won't show where is the issue.
The backends raise SchemaValidationErrorDuringReport
:
E pipestat.exceptions.SchemaValidationErrorDuringReport: 'path' is a required property
E
E Failed validating 'required' in schema:
E {'description': 'This a path to the output image',
E 'object_type': 'image',
E 'properties': {'path': {'type': 'string'},
E 'thumbnail_path': {'type': 'string'},
E 'title': {'type': 'string'}},
E 'required': ['path', 'thumbnail_path', 'title'],
E 'type': 'object'}
E
E On instance:
E {'thumbnail_path': 'thumbnail_path_string', 'title': 'title_string'}
E Record identifier constant_record_id
E Result_identifier {'description': 'This a path to the output image', 'type': 'object', 'object_type': 'image', 'properties': {'path': {'type': 'string'}, 'thumbnail_path': {'type': 'string'}, 'title': {'type': 'string'}}, 'required': ['path', 'thumbnail_path', 'title']}
E Reported result: {'thumbnail_path': 'thumbnail_path_string', 'title': 'title_string'}
And it reports the problematic field, and the associated record_identifier, and result_identifier. So, I don't think this is actually still an issue.
Write a test and check if required pipeline fields are actually required