-
Notifications
You must be signed in to change notification settings - Fork 1
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
Dsegog 271 handling failed ingestion #148
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #148 +/- ##
==========================================
- Coverage 95.67% 95.62% -0.05%
==========================================
Files 73 74 +1
Lines 3766 3838 +72
Branches 659 692 +33
==========================================
+ Hits 3603 3670 +67
- Misses 113 116 +3
- Partials 50 52 +2 ☔ View full report in Codecov by Sentry. |
…hannel fails to upload to echo
…e channels from the record if any of them fail.
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.
EDIT: I almost forgot to mention, I've only looked at the changes from 6a190a3 onwards - I had a look at the git graph, and the ones before that also appear in the branch for #147 . So I figured they would be covered and reviewed by that PR. If you want I can review them as part of this one as well, just let me know.
Looks good on the whole, especially the in-depth testing with the extensive use of side effects on the patched functions.
I had a few queries in the in line comments, but most are minor - the only one I feel (somewhat) strongly about is that we should be calling log.error
in mongo_error_handling.py
like we do elsewhere.
In terms of coverage I mentioned one of the places, the other two seem like either defensive programming (the remove_channel
else
block) or otherwise would be difficult to reach (having multiple failure reasons for a single channel - setting up the mocks to get one failure seems like enough of an ask), so I think it's OK to leave these uncovered if you're happy to.
Putting this here for historical purposes: Having come back to the issue the next day and running another |
This PR addresses the cases where “network blips” may occur, impacting the ingestion process. It mainly focuses on the following issues:
Each one of these can have 3 different failure states, where either/or the database and echo can’t be contacted:
• The DB and ECHO are not accessible
• The DB is but ECHO is not accessible
• The DB is not but ECHO is accessible
To help with the manual debugging of this task, an application was created to generate and send newly created hdf files. Here: https://github.com/ral-facilities/operationsgateway-hdf5-generator
From this, the state table below can be constructed.