mwdb-core
mwdb-core copied to clipboard
Karton connection errors are not correctly managed by mwdb
Environment information
- MWDB version: 2.10.2
- Installation method:
- [ ] mwdb.cert.pl service
- [ ] From PyPi (
pip install mwdb-core) - [x] From docker-compose
- [ ] Other (please explain)
- Plugins installed:
Behaviour the bug (what happened?)
When mwdb starts before karton an error is raised during the submission of samples to karton.
The karton connector is initialized too early in the startup process.
Moreover this error is not correctly managed by the UI.
The upload of samples seems to not work but they are inserted in mwdb.
Expected behaviour Mwdb should support the karton connection errors in the following cases:
- Karton is started after mwdb
- Karton is down
- Karton is restarted
Maybe a configuration option should be added to indicate if:
- The upload process shall be stopped if karton is down
- The upload process shall ignore karton connection errors
Reproduction Steps Start mwdb before karton and try to upload a new sample to mwdb.
Hi!
There are actually two issues mentioned:
-
Early Karton initialization
This will be fixed by #919, MWDB should not give up when Karton is enabled but Redis connection can't be established when MWDB is loaded.
-
Wrong error handling
File is still uploaded correctly because we treat errors during Karton analysis submission as non-critical errors, because analysis can be easily restarted (by clicking Reanalyze). That's why Karton submit is done after the commit. In the same time, we're sending ISE 500 because there is server fault.
Maybe we should introduce different response for successful upload with warnings to correctly indicate it in UI?