I am supporting some devs working with containerized RStudio and TinyTeX. In our image build, we generate a simple set of prototypical documents to flesh out the LaTeX package dependencies via automatic installation with TinyTeX to support what we'll need in a production container. We also use Jenkins CI/CD for building, testing, and pushing our images.
Anyway, in practice, we've been finding that these automatic package installs fail quite frequently without raising a significant error, which kicks the can of pipeline failure down the road to our testing. What I'm hoping to be pointed to are some TinyTeX settings related to downloading packages, e.g. the maximum number of download attempts and the timeout for each attempt, ideally. On that note, are there any mirrors that we can add for better reliability with package downloading, and if so, how might I do that?
Although the TinyTeX docs say that "Everything is automatic for R Markdown users, and you don’t need to manually search for or install missing LaTeX packages," we're using it correctly by starting with
tinytex:::install_prebuilt() in our R and still having to deal with packages that fail to install automatically in the lines that directly follow, ostensibly due to sporadically timing out. We're on AWS with a good connection by design, and what fails to download is also not consistent by package or any similar metric I can see. Last of all, our builds do pass when all of the packages happen to install properly.
I'd sincerely appreciate any input from the community here, and I hope that the granularity I'm looking for is just not particularly documented rather than non-existent. That said, the TinyTeX dev requires a post on this forum or StackOverflow plus 24 hours to raise an issue on their GitHub repo, so I will either be asking them the same thing this time tomorrow or that any key findings provided here be documented.