Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if required fields are checked if they actually required #170

Closed
khoroshevskyi opened this issue Mar 6, 2024 · 3 comments
Closed
Milestone

Comments

@khoroshevskyi
Copy link
Member

khoroshevskyi commented Mar 6, 2024

Write a test and check if required pipeline fields are actually required

@nsheff
Copy link
Contributor

nsheff commented Mar 12, 2024

Can you clarify this issue? I can't understand it based on the comment fragment.

@khoroshevskyi
Copy link
Member Author

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.

@donaldcampbelljr donaldcampbelljr added this to the v0.10.0 milestone Apr 19, 2024
@donaldcampbelljr
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants