[CCAP-670] Enhance file conversion service to retry up to 10 times if LibreOffice fails#658
[CCAP-670] Enhance file conversion service to retry up to 10 times if LibreOffice fails#658
Conversation
… LibreOffice fails
| // converted file. We can retry in this situation. | ||
| log.warn("Unable to find PDF file {}, will retry.", pdfFile.getAbsolutePath()); | ||
| return convertOfficeDocumentToPDF(file); | ||
| throw new RuntimeException("PDF conversion failed. Unable to find PDF file " + pdfFile.getAbsolutePath() + " after " + numberOfRetries + " retries. Final exit code: " + exitCode); |
There was a problem hiding this comment.
What happens when this exception is thrown after 10 retries?
There was a problem hiding this comment.
It gets all the way up to the FileController:
And then nothing happens except logging that nothing was converted: https://github.com/codeforamerica/form-flow/blob/bd983f2a93ceacbb5fc1df91c05c3f7d11afe4a5/src/main/java/formflow/library/FileController.java#L280C19-L280C42
There was a problem hiding this comment.
I think it bubbling up to the FileController makes sense, but maybe we should make a slack alert in Datadog if this happens so we can be alerted, as my understanding is if this happens, then it's possible we don't end up sending a supporting document with an application?
There was a problem hiding this comment.
Yep, there's already a datadog alert for all the warns/errors/interesting-infos and they are going to #snlab-il-doc-conversion-alerts
I'll pare those down into more interesting/useful alerts and send them to the normal alerts channel once we're done testing and we don't care about every single logging statement!
There was a problem hiding this comment.
Ok sweet! Thanks for being thorough!
Issue tracking number 🔗
Description of change ✍️
Priority 🥇
Effect on other applications using FFB 🌊
Testing
✅ Checklist before requesting a review
style?