Skip to content

fix: skip monthly batch when a member post failed to compile#30

Merged
Gavin-WangSC merged 1 commit intoComputerization:mainfrom
Gavin-WangSC:fix/skip-batches-with-missing-tex
Apr 29, 2026
Merged

fix: skip monthly batch when a member post failed to compile#30
Gavin-WangSC merged 1 commit intoComputerization:mainfrom
Gavin-WangSC:fix/skip-batches-with-missing-tex

Conversation

@Gavin-WangSC
Copy link
Copy Markdown
Contributor

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 reads public/blog/<post>/index.tex for every post in a 5-post window:

    FileNotFoundError: [Errno 2] No such file or directory: './public/blog/2026-02-13/index.tex'
    

    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

  • Re-run Generate New Article (or wait for the next scheduled trigger).
  • Confirm batch 57 logs Skipping batch: 57 ... (missing tex for 2026-02-13) and the job reaches Commit and Push Changes.
  • Confirm batches 58+ (if any) are processed.

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.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for c13n-newsletter ready!

Name Link
🔨 Latest commit 92bba99
🔍 Latest deploy log https://app.netlify.com/projects/c13n-newsletter/deploys/69f1af7da66648000978b2b9
😎 Deploy Preview https://deploy-preview-30--c13n-newsletter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Gavin-WangSC Gavin-WangSC merged commit 5809a6a into Computerization:main Apr 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant