Skip to content
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

RHOAIENG-17257: chore(tests): add testcontainers test to check Rmd to PDF rendering in RStudio #857

Merged

Conversation

jiridanek
Copy link
Member

@jiridanek jiridanek commented Jan 22, 2025

https://issues.redhat.com/browse/RHOAIENG-17257

Description

How Has This Been Tested?

This passes with

--image=ghcr.io/jiridanek/notebooks/workbench-images:rstudio-c9s-python-3.11-jd_ipv6_test_512e959935af50afde2c1fa49706207190fb5e8d

and fails with

--image=ghcr.io/jiridanek/notebooks/workbench-images:rstudio-c9s-python-3.11-main_fe3641a01ac9e1e8f694f1a8bce3b34cacf9ae57

with error that's beginning the same as what's in the screenshot that @shalberd reported in

DEBUG:root:Command execution finished >>> {"rc": 1, "result": "

processing file: document.Rmd
1/7           
2/7 [setup]   
3/7           
4/7 [cars]    
5/7           
6/7 [pressure]
7/7           
output file: document.knit.md

/usr/lib/rstudio-server/bin/quarto/bin/tools/x86_64/pandoc +RTS -K512m -RTS document.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output document.tex --lua-filter /opt/app-root/bin/Rpackages/4.4/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /opt/app-root/bin/Rpackages/4.4/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable 'geometry:margin=1in' 
! LaTeX Error: File `framed.sty' not found.

! Emergency stop.
<read *> 

! kpathsea: Running mktexfmt pdflatex.fmt
! mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
! mktexfmt:   /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf
! mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
! mktexfmt:   /opt/app-root/src/.texlive2020/texmf-config/web2c/fmtutil.cnf
! mktexfmt [INFO]: writing formats under /opt/app-root/src/.texlive2020/texmf-var/web2c
! mktexfmt [INFO]: --- remaking pdflatex with pdftex
! mktexfmt: running `pdftex -ini   -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini' ...
! This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (INITEX)
!  restricted \\write18 enabled.
!  (/usr/share/texlive/texmf-dist/web2c/cp227.tcx)
! entering extended mode
! (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/pdflatex.ini
! (/usr/share/texlive/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex)
! (/usr/share/texlive/texmf-dist/tex/latex/base/latex.ltx
! (/usr/share/texlive/texmf-dist/tex/latex/base/texsys.cfg)
! ./texsys.aux found

[...]

! 17292 multiletter control sequences

! \\font\
ullfont=nullfont

! \\font\\c__fp_exp_intarray=cmr10 at 0.00002pt

! \\font\\c__fp_trig_intarray=cmr10 at 0.00003pt

! \\font\\c_initex_cctab=cmr10 at 0.00005pt

! \\font\\c_other_cctab=cmr10 at 0.00006pt

! \\font\\c_str_cctab=cmr10 at 0.00008pt

! \\font\\g__regex_state_active_intarray=cmr10 at 0.00009pt

! \\font\\g__regex_thread_info_intarray=cmr10 at 0.0001pt

! \\font\\g__regex_submatch_prev_intarray=cmr10 at 0.00012pt

! \\font\\g__regex_submatch_begin_intarray=cmr10 at 0.00014pt

! \\font\\g__regex_submatch_end_intarray=cmr10 at 0.00015pt

! \\font\\g__regex_balance_intarray=cmr10 at 0.00017pt

! \\font\\OMX/cmex/m/n/10=cmex10

! \\font\\tenln=line10

! \\font\\tenlnw=linew10

! \\font\\tencirc=lcircle10

! \\font\\tencircw=lcirclew10

! \\font\\OT1/cmr/m/n/5=cmr5

! \\font\\OT1/cmr/m/n/7=cmr7

! \\font\\OT1/cmr/m/n/10=cmr10

! \\font\\OML/cmm/m/it/5=cmmi5

! \\font\\OML/cmm/m/it/7=cmmi7

! \\font\\OML/cmm/m/it/10=cmmi10

! \\font\\OMS/cmsy/m/n/5=cmsy5

! \\font\\OMS/cmsy/m/n/7=cmsy7

! \\font\\OMS/cmsy/m/n/10=cmsy10

! \\font\\c_code_cctab=cmr10 at 0.00018pt

! \\font\\c_document_cctab=cmr10 at 0.0002pt

! 403423 words of font info for 27 preloaded fonts

! 14 hyphenation exceptions

! Hyphenation trie of length 6081 has 183 ops out of 35111

!   2 for language 1

!   181 for language 0

! 0 words of pdfTeX memory

! 0 indirect objects

! No pages of output.

! Transcript written on pdflatex.log.

! mktexfmt [INFO]: log file copied to: /opt/app-root/src/.texlive2020/texmf-var/web2c/pdftex/pdflatex.log

! mktexfmt [INFO]: /opt/app-root/src/.texlive2020/texmf-var/web2c/pdftex/pdflatex.fmt installed.

! mktexfmt [INFO]: successfully rebuilt formats: 1

! mktexfmt [INFO]: not selected formats: 19

! mktexfmt [INFO]: total formats: 20

! mktexfmt [INFO]: exiting with status 0

Error: LaTeX failed to compile document.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See document.log for more info.
Execution halted

image

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@openshift-ci openshift-ci bot requested review from atheo89 and daniellutz January 22, 2025 12:07
@openshift-ci openshift-ci bot added size/l and removed size/l labels Jan 22, 2025
@jiridanek jiridanek changed the title wip: RHOAIENG-17257: chore(tests): add testcontainers test to check Rmd to PDF rendering in RStudio RHOAIENG-17257: chore(tests): add testcontainers test to check Rmd to PDF rendering in RStudio Jan 22, 2025
@jiridanek
Copy link
Member Author

/override ci/prow/images
n/a

Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/images

In response to this:

/override ci/prow/images
n/a

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

dst="/scripts")

# copy to a (writable) working directory
check_call(container, "bash -c 'cp /scripts/document.Rmd ./'")
Copy link
Member

Choose a reason for hiding this comment

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

Instead of copying this again, wouldn't it be better to copy these files to the final directory right away?

Copy link
Member Author

Choose a reason for hiding this comment

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

very good point, fixed it now
/override ci/prow/images

return rc


def check_output(container: WorkbenchContainer, cmd: str) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

this method and the check_call above seem both quite generic - maybe we should consider to put them on some common place... I don't insist to do this in this PR, but maybe eventually...

Copy link
Member Author

Choose a reason for hiding this comment

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

@openshift-ci openshift-ci bot added size/l and removed size/l labels Jan 22, 2025
@jiridanek jiridanek force-pushed the jd_rstudio_render_pdf branch from 243002d to 30f52fa Compare January 22, 2025 16:41
@openshift-ci openshift-ci bot added size/l and removed size/l labels Jan 22, 2025
Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/images

In response to this:

very good point, fixed it now
/override ci/prow/images

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jiridanek jiridanek added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jan 22, 2025
@openshift-ci openshift-ci bot added size/l and removed size/l labels Jan 22, 2025
@jiridanek
Copy link
Member Author

/override ci/prow/images

Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/images

In response to this:

/override ci/prow/images

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jiridanek
Copy link
Member Author

/approve

Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jstourac
Copy link
Member

/lgtm

thank you

@jiridanek
Copy link
Member Author

/override ci/prow/images
not relevant

Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/images

In response to this:

/override ci/prow/images
not relevant

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 1540ee2 into opendatahub-io:main Jan 23, 2025
14 checks passed
@jiridanek jiridanek deleted the jd_rstudio_render_pdf branch January 23, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/l tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants