fix: skip monthly batch when a member post failed to compile#30
Merged
Gavin-WangSC merged 1 commit intoComputerization:mainfrom Apr 29, 2026
Merged
Conversation
batch() concatenates each post's index.tex into one file. If any post in the 5-post window was skipped by pdfgenr (no index.tex on disk), the read crashes the whole job — same blocking pattern as the original publish bug, just one step downstream. Skip such batches with a log line, and also bail gracefully if lualatex itself produces no PDF for a batch.
✅ Deploy Preview for c13n-newsletter ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to fix: keep publish job alive when one post's LaTeX fails #28 / fix: create public/blog/<post>/ before copying tex+pdf #29. The publish step now correctly skips posts whose LaTeX failed (
2026-02-13), so per-post compile no longer crashes the job.The
batch()step still does, because it readspublic/blog/<post>/index.texfor every post in a 5-post window:This drops batch 57 (which contains 2026-02-13) and everything after it.
Fix: before processing a batch, check that every member post has an
index.tex; if not, log and skip the batch. Also bail gracefully if lualatex itself produces no PDF for a batch (same pattern as the per-post fix).When 2026-02-13 eventually compiles successfully (markdown change → batch hash change), the batch will be regenerated on the next run.
Test plan
Generate New Article(or wait for the next scheduled trigger).Skipping batch: 57 ... (missing tex for 2026-02-13)and the job reaches Commit and Push Changes.