-
Notifications
You must be signed in to change notification settings - Fork 0
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
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when this exception is thrown after 10 retries?
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.
It gets all the way up to the FileController:
log.error("Error converting file {} to PDF", userFileId, e); |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?