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

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

Open
bryce-carson opened this issue Jun 29, 2024 · 5 comments

Comments

@bryce-carson
Copy link

bryce-carson commented Jun 29, 2024

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"))
@bryce-carson bryce-carson changed the title appFiles seems to be ignored, or the format of the string arguments is not complained about deployApp appFiles argument seems to be ignored, or the format of the string arguments is not complained about Jun 29, 2024
@aronatkins
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants