-
Notifications
You must be signed in to change notification settings - Fork 59
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
skip erroring ooi's in ooi_repository.py #4069
base: main
Are you sure you want to change the base?
Conversation
Add code to not crash the entire result set when objects could not be shoehorned into our current ooi models.
As discussed, Ill add an OOI like object to carry the errors (and the why) from the backend into the frontend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the suggested OOI is not ideal since it isn't really an OOI. An alternative approach could be to allow this class but not treat it as an OOI type. However, this would require some type refactoring and frontend work to handle this record differently.
That said, this is a good step toward addressing the problem. We have mismatches between the database and models and it's important to be able to highlight these instances
Co-authored-by: ammar92 <[email protected]>
Co-authored-by: ammar92 <[email protected]>
I agree in principal. However, we do expect OOI like objects in all the consumers of these lists. We could (like I started doing) add the non OOI subclassed parse/validation error object to the expected list of types, and handle it everywhere, of we could 'pretend for the error to be OOI like' |
|
Add code to not crash the entire result set when objects could not be shoehorned into our current ooi models.
Changes
This Pr add's some code to optionally send an error instead of crash on database content that does not fit the current OOI models. These crashes have a ripple effect where services don't get any data (eg, rocky), or crash themselves.
Erroring ooi's will be skipped, and an error is logged in Octopoes_api.
Issue link
You have to create an issue to link to this PR. If this really is not possible, write a very detailed description here and add this PR to the project board directly.
Please add the link to the issue after "Closes".
Closes ...
Demo
QA notes
Please add some information for QA on how to test the newly created code.
Code Checklist
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.