insightsengineering / teal.modules.general

General Purpose Teal Modules
https://insightsengineering.github.io/teal.modules.general/
Other
9 stars 13 forks source link

GRAN fail build #729

Closed donyunardi closed 6 months ago

donyunardi commented 7 months ago

What happened?

It was reported to us that it tmg has been suspended in GRAN because it's causing their nightly builds to time out.

Log file from GRAN ```r * using R Under development (unstable) (2023-12-04 r85659) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0 GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 * running under: Ubuntu 18.04.6 LTS * using session charset: UTF-8 * checking for file ‘teal.modules.general/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘teal.modules.general’ version ‘0.3.0.9007’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘teal.modules.general’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking whether startup messages can be suppressed ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking files in ‘vignettes’ ... WARNING Files in the 'vignettes' directory but no files in 'inst/doc': ‘images/app-teal-modules-general.png’ ‘images/app-using-association-plot.png’ ‘images/app-using-bivariate-plot.png’ ‘images/app-using-cross-table.png’ ‘images/app-using-data-table.png’ ‘images/app-using-outliers-module.png’ ‘images/app-using-regression-plots.png’ ‘images/app-using-response-plot.png’ ‘images/app-using-scatterplot-matrix.png’ ‘images/app-using-scatterplot.png’ ‘teal-modules-general.Rmd’ ‘using-association-plot.Rmd’ ‘using-bivariate-plot.Rmd’ ‘using-cross-table.Rmd’ ‘using-data-table.Rmd’ ‘using-outliers-module.Rmd’ ‘using-regression-plots.Rmd’ ‘using-response-plot.Rmd’ ‘using-scatterplot-matrix.Rmd’ ‘using-scatterplot.Rmd’ * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... OK Running ‘testthat.R’ * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... WARNING Directory 'inst/doc' does not exist. Package vignettes without corresponding single PDF/HTML: ‘teal-modules-general.Rmd’ ‘using-association-plot.Rmd’ ‘using-bivariate-plot.Rmd’ ‘using-cross-table.Rmd’ ‘using-data-table.Rmd’ ‘using-outliers-module.Rmd’ ‘using-regression-plots.Rmd’ ‘using-response-plot.Rmd’ ‘using-scatterplot-matrix.Rmd’ ‘using-scatterplot.Rmd’ * checking running R code from vignettes ... ```

I am very suspicious with the latest release of knitr which also causing problem with tmc as mentioned here: https://github.com/insightsengineering/teal.modules.clinical/issues/1116#issuecomment-2052661151

Just like tmc, tmg also has vignettes with error = TRUE chunk options.

If I use the latest knitr 1.46, tmg will take forever to complete. In fact, it never completed so I have to exit the process. GRAN said their nightly build was timed-out, which makes sense based on what I observed. I can also confirm that their R/dev module is using knitr 1.46.

But, if I downgrade to knitr 1.45, tmg passes locally. Our daily CI is using 1.46 but we don't see the error because we're using --ignore-vignettes options.

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

Contribution Guidelines

Security Policy

donyunardi commented 7 months ago

Just want to add note that knitr 1.46 was release on 7 APR (very recent).

@insightsengineering/nest-core-dev Can I get a volunteer to double check what I observed? Please run rcmdcheck::rcmdcheck() in tmg using knitr 1.46 and compare it with knitr 1.45.

donyunardi commented 7 months ago

Just like tmc, tmg also has vignettes with error = TRUE chunk options.

I was wrong about this, there is no error chunk in tmg. I must have mistakenly see an older version of the repo and confuse myself with Rmd in tmc.

But the problem is still in Rmd and specifically, this line: https://github.com/insightsengineering/teal.modules.general/blob/78b95ac65d9ba0e324419469ccedc4b1a2262156/vignettes/using-association-plot.Rmd#L300-L304

We can either wrap the shinyApp call with if (interactive()) or set eval = FALSE. This is the same with the rest of the Rmds. rcmdcheck() passed locally when I do either of this.

I'm also curious on why we're treating these vignettes as interactive document (runtime: shiny). We're hiding the result, not showing any widgets, and displaying static image in the end. https://github.com/insightsengineering/teal.modules.general/blob/78b95ac65d9ba0e324419469ccedc4b1a2262156/vignettes/using-association-plot.Rmd#L4-L5

I think we should remove the runtime:shiny.

pawelru commented 7 months ago

This also fails r-universe builds. We are working on to get notifications about this.

image