Skip to content

fix: the pdf generation issue in agent - #18673

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
6ba3i:fix/pdf_generation
Aug 24, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
6ba3i:fix/pdf_generation

Conversation

@6ba3i

@6ba3i 6ba3i commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

added the missing dependency to the dockerfile

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 24, 2026
@coderabbitai

coderabbitai Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 62879d60-fc49-4301-a1f7-da1e8d32ec85

📥 Commits

Reviewing files that changed from the base of the PR and between 23a0711 and 4eb5c18.

📒 Files selected for processing (2)
  • Dockerfile
  • Dockerfile_base

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Docker base image definitions now install the lmodern LaTeX font package with the existing document-generation packages.

Changes

LaTeX font package installation

Layer / File(s) Summary
Add lmodern to Docker packages
Dockerfile, Dockerfile_base
Both apt installation commands now include the lmodern package.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 4eb5c

This localized Dockerfile update adds the dependency needed for PDF generation, and no actionable merge-blocking risk remains based on the supplied evidence.

Suggested reviewers: myf-bee, lynn-inf, yuzhichang

Poem

A rabbit hops through Docker’s list,
Finds lmodern tucked in with the rest.
LaTeX fonts now bloom bright,
In every build, crisp and light.
“Package installed!” says the bun.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the PDF generation fix addressed by adding the missing Docker dependency.
Description check ✅ Passed The description states that a missing Dockerfile dependency was added, but it provides limited background context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@6ba3i 6ba3i added the ci Continue Integration label Aug 24, 2026
@wangq8
wangq8 requested review from myf-bee and wangq8 August 24, 2026 05:16
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (2db8eb6) to head (4eb5c18).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18673      +/-   ##
==========================================
- Coverage   94.56%   90.65%   -3.91%     
==========================================
  Files          10       10              
  Lines         717      717              
  Branches      118      118              
==========================================
- Hits          678      650      -28     
- Misses         25       39      +14     
- Partials       14       28      +14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wangq8
wangq8 requested a review from xugangqiang August 24, 2026 05:35

@myf-bee myf-bee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look Good To Me

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! This is a small, well-targeted change. I checked it against agent/component/docs_generator.py, which generates PDFs via pandoc --pdf-engine=xelatex with mainfont/CJKmainfont set to Noto Sans CJK SC.

What's good

  • lmodern (Latin Modern fonts) is the correct missing dependency. With xelatex/fontspec, \ttfamily/verbatim (code blocks) and math fall back to Latin Modern fonts, which aren't installed by the base texlive set — especially since apt --no-install-recommends is used and lmodern is only a "Recommends" of the texlive collections. Its absence causes the classic File 'lmodern.sty' not found / "font cannot be found" failures during PDF generation.
  • Applied consistently to both Dockerfile and Dockerfile_base, which are the only two files that install the texlive stack. No other Dockerfile needs it.
  • No code changes, so no regression risk to the agent logic. Only a negligible image-size increase.

Suggestions (non-blocking)

  1. The PR body is minimal. It would help reviewers and future maintainers to include the actual error message/log (e.g. File 'lmodern.sty' not found, or The font "Latin Modern Mono" cannot be found). This confirms lmodern (vs cm-super) is the right package and makes the root cause greppable later.
  2. Note that existing deployments need an image rebuild to pick this up — worth confirming the rebuild/release path is covered.

No objections to merging. 👍

@wangq8

wangq8 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

LGTM.

@wangq8
wangq8 merged commit ba31ec4 into infiniflow:main Aug 24, 2026
8 checks passed
@6ba3i
6ba3i deleted the fix/pdf_generation branch September 22, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants