rstudio / rsconnect

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

rsconnect profile options ignored #542

Closed JsizzleR closed 1 year ago

JsizzleR commented 3 years ago

When using rsconnect version 0.8.24, the settings in these files aren't taking effect:

$R_HOME/etc/rsconnect.site
~/.rsconnect_profile
$PROJECT/.rsconnect_profile

The two settings used were:

options(rsconnect.check.certificate = FALSE)
options(rsconnect.max.bundle.size = 5000000000)

Downgrading to the previous version used, 0.8.16, resolved the issue.

aronatkins commented 3 years ago

Using the 0.8.24 CRAN release of this package and .rsconnect_profile files in my home directory and project directory:

# saved as $HOME/.rsconnect_profile
cat("ATTENTION: This is the HOME/.rsconnect_profile\n")
# saved as PROJECT/.rsconnect_profile
cat("ATTENTION: This is the PROJECT/.rsconnect_profile\n")
options(rsconnect.max.bundle.size = 10)

A call to the rsconnect::deployApp function shows that the max bundle size is in effect:

rsconnect::deployApp(server = "SERVER-NAME", account = "ACCOUNT-NAME")
#> ATTENTION: This is the HOME/.rsconnect_profile
#> ATTENTION: This is the PROJECT/.rsconnect_profile
#> Error in bundleFiles(appDir): The directory /Users/aron/dev/rstudio/standalone/shiny-rsconnect-site cannot be deployed because it is too large (the maximum size is 10 bytes). Remove some files or adjust the rsconnect.max.bundle.size option.

The bundle size is not enforced, however, when specifying an enumerated set of files; this is the path often used by the RStudio IDE when deploying content.

rsconnect::deployApp(server = "rsc.radixu.com", account = "aron", appFiles=c("app.R"))
#> ATTENTION: This is the HOME/.rsconnect_profile
#> ATTENTION: This is the PROJECT/.rsconnect_profile
#> ... deployment succeeds ...

The same behavior is seen with rsconnect-0.8.16.

aronatkins commented 3 years ago

Paths that use bundleFiles enforce the bundle size limits. Paths that use explodeFiles do not respect bundle limits.

aronatkins commented 3 years ago

The rsconnect.check.certificate is not respected when `getOption("rsconnect.http") is "internal"; the other HTTP transports (libcurl, rcurl, curl) all interpret that option.

aronatkins commented 3 years ago

@JsizzleR - Could you give more details about your session? How were you deploying? Did you set other rsconnect options?

hadley commented 1 year ago

@aronatkins in runStartupScripts() what do you think about logging the script being run when logLevel %in% c("normal", "verbose")? I think this is important enough to message about by default.

aronatkins commented 1 year ago

@hadley - more logging feels right, yes. Should the source parse into a named environment rather than global?

hadley commented 1 year ago

@aronatkins yeah, it should. And I don't think changing it to the correct default should affect existing code, since this all needs to be "side-effect"y code anyway.