-
Notifications
You must be signed in to change notification settings - Fork 479
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
Add retries to Resource PDF Generation #42600
Conversation
For background, we've had an intermittent issue with the Curriculum PDF generation process in which when it comes time to collate all our individual PDFs together in the rollup, GhostScript complains that it can't find all the files that we're telling it to roll up, and the PDF generation fails. I've been able to track down the failure to specifically the title pages that we generate in the Resource rollup to differentiate the lessons within a script. Unfortunately, I have been unable to get any kind of reliable repro, much less to figure out *why* this is happening in the first place. Because I know where the problem is but not why it is, and because it happens so rarely as to make further investigation difficult, I'm resorting to a blind retry. It's not a good solution, but it's the best I got at this point.
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.
seems quite reasonable!
… thorough filesystem checking in it
# Adding some logging here to help diagnose. | ||
unless $?.success? | ||
ChatClient.log( | ||
"PDF generation exited with status code #{$?.exitstatus.inspect}", |
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.
Did you get any helpful error information here? If so, can you summarize what it was before removing it?
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 did and I didn't. This clause never triggered at any point, so in once sense I got no information, and in another sense I learned that even when we end up failing to generate a file (as indicated by the other clause triggering), the process still reports a success. So I'm removing the clause, but it is worth keeping in mind that whatever's going on here, it's subtle.
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.
That's what I figured, but wanted to double check. Thanks!
For background, we've had an intermittent issue with the Curriculum PDF generation process in which when it comes time to collate all our individual PDFs together in the rollup, GhostScript complains that it can't find all the files that we're telling it to roll up, and the PDF generation fails.
I've been able to track down the failure to specifically the title pages that we generate in the Resource rollup to differentiate the lessons within a script. Unfortunately, I have been unable to get any kind of reliable repro, much less to figure out why this is happening in the first place.
Because I know where the problem is but not why it is, and because it happens so rarely as to make further investigation difficult, I'm resorting to a retry. It's not a good solution, but it's the best I got at this point.
Links
Testing story
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Checklist: