rstudio / rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
http://rstudio.github.io/rsconnect/
128 stars 79 forks source link

deployApp appFiles argument seems to be ignored, or the format of the string arguments is not complained about #1090

Open bryce-carson opened 4 days ago

bryce-carson commented 4 days ago

Using the following appFiles argument, I would expect that deployApp would not complain about the number of files in the application being over ten thousand, which is the reason I constructed the appFiles argument vector.

deployApp should produce a warning which states which elements of the vector were not matched against files in the application directory so that the vector can be corrected; it certainly shouldn't include files other than those in the vector; it should include nothing, per the function documentation, if nothing in the vector is matched or if only some in the vector aren't matched, given .rscignore doesn't support globbing either.

deployApp(appFiles = c("LICENSE",
"www",
"www/images",
"www/images/SEIR.svg",
"www/images/SEIRD.svg",
"www/images/SEIRS.svg",
"www/images/SIR.svg",
"www/images/SIRD.svg",
"www/images/SIRS.svg",
"www/markdown",
"www/markdown/freezeAndThaw.md",
"www/modelSelect.css",
"www/modelSelect.js",
"www/sidebar.js",
"www/reactcharteditor",
"www/reactcharteditor/plotly_editor",
"www/reactcharteditor/plotly_editor/plotly_editor.js.LICENSE.txt",
"www/reactcharteditor/plotly_editor/plotly_editor.js",
"www/reactcharteditor/plotly_editor/plotly_editor.js.map",
".Rhistory",
"episim.Rproj",
"data",
"data/defaultInputValues.xls",
"R",
"R/stochastic_binom.R",
"R/stochastic_binomial_vitalDynamic.R",
"R/stochastic_uniform.R",
"R/LaTeX_mâché.R",
"R/plotter.R",
"R/epi.R",
"R/reactcharteditor",
"R/reactcharteditor/.DS_Store",
"R/reactcharteditor/DESCRIPTION",
"R/reactcharteditor/LICENSE.md",
"R/reactcharteditor/NAMESPACE",
"R/reactcharteditor/R",
"R/reactcharteditor/R/plotly_editor.R",
"R/reactcharteditor/README.md",
"R/reactcharteditor/inst",
"R/reactcharteditor/inst/www",
"R/reactcharteditor/inst/www/reactcharteditor",
"R/reactcharteditor/inst/www/reactcharteditor/plotly_editor",
"R/reactcharteditor/inst/www/reactcharteditor/plotly_editor/plotly_editor.js.LICENSE.txt",
"R/reactcharteditor/inst/www/reactcharteditor/plotly_editor/plotly_editor.js",
"R/reactcharteditor/inst/www/reactcharteditor/plotly_editor/plotly_editor.js.map",
"R/reactcharteditor/man",
"R/reactcharteditor/man/plotly_editor.Rd",
"R/reactcharteditor/man/update_plotly_editor.Rd",
"R/reactcharteditor/package.json",
"R/reactcharteditor/srcjs",
"R/reactcharteditor/srcjs/plotly_editor.jsx",
"R/reactcharteditor/webpack.config.js",
"R/reactcharteditor/yarn.lock",
"R/reactcharteditor/.Rhistory",
"README.md",
"global.R",
"server.R",
"ui.R",
".rscignore"))
aronatkins commented 2 days ago

The rsconnect.max.bundle.files option limits the number of files permitted in a bundle. https://rstudio.github.io/rsconnect/reference/listDeploymentFiles.html

The appFiles argument is not seen as a way to bypass rsconnect.max.bundle.files because appFiles may include directories, which are fully enumerated during deployment. Those directories may prove larger (in number of files or size) than individuals expect.

aronatkins commented 2 days ago

Regarding the warning, I just ran your example command in a directory without the named files and received:

Warning message:
All files listed in `appFiles` must exist.
Problems: LICENSE, www, www/images, www/images/SEIR.svg, www/images/SEIRD.svg, www/images/SEIRS.svg, www/images/SIR.svg,
www/images/SIRD.svg, www/images/SIRS.svg, www/markdown, www/markdown/freezeAndThaw.md, www/modelSelect.css,
www/modelSelect.js, www/sidebar.js, www/reactcharteditor, www/reactcharteditor/plotly_editor,
www/reactcharteditor/plotly_editor/plotly_editor.js.LICENSE.txt, www/reactcharteditor/plotly_editor/plotly_editor.js, …,
ui.R, and .rscignore 
bryce-carson commented 1 day ago

The rsconnect.max.bundle.files option limits the number of files permitted in a bundle. https://rstudio.github.io/rsconnect/reference/listDeploymentFiles.html

The appFiles argument is not seen as a way to bypass rsconnect.max.bundle.files because appFiles may include directories, which are fully enumerated during deployment. Those directories may prove larger (in number of files or size) than individuals expect.

I see.

When I read,

If neither are supplied, will bundle all files in appDir, apart from standard exclusions and files listed in a .rscignore file.

In the appDir argument description, it implies (in my reading) that if supplied then the function will not bundle all files, but only the specified files.

I suppose a documentation improvement is in order, then?

bryce-carson commented 1 day ago

Regarding the warning, I just ran your example command in a directory without the named files and received:

Warning message:
All files listed in `appFiles` must exist.
Problems: LICENSE, www, www/images, www/images/SEIR.svg, www/images/SEIRD.svg, www/images/SEIRS.svg, www/images/SIR.svg,
www/images/SIRD.svg, www/images/SIRS.svg, www/markdown, www/markdown/freezeAndThaw.md, www/modelSelect.css,
www/modelSelect.js, www/sidebar.js, www/reactcharteditor, www/reactcharteditor/plotly_editor,
www/reactcharteditor/plotly_editor/plotly_editor.js.LICENSE.txt, www/reactcharteditor/plotly_editor/plotly_editor.js, …,
ui.R, and .rscignore 

I don't know why'd you'd bother when all the paths are relative to the current working directory, assumed to be the appDir, just as appDir is assumed to be the current working directory when not supplied.

aronatkins commented 1 day ago

I'm not following what you're trying to recommend, unfortunately.

The appFiles argument indicates what files are supposed to be deployed. That list may include files or directories beneath the appDir. The appFiles must enumerate things that exist and is also subject to rsconnect.max.bundle.files and rsconnect.max.bundle.size.

Could you share a specific directory layout and deployApp() command that is not behaving as you expect?