rstudio / rsconnect

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

Regression: re-deploys to shinyapps.io from stateless environments fail #932

Closed mbaynton closed 1 year ago

mbaynton commented 1 year ago

As of 1.0.0 (probably specifically https://github.com/rstudio/rsconnect/commit/25b93da28be464a58aaf3f3ac36d6ca50ece67c9), users who deploy updates to applications on shinyapps.io through automated processes such as CI environments that don't preserve the rsconnect state files are experiencing the following failure:

> rsconnect::deployApp('source-directory')
── Preparing for deployment ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ Deploying "soshiny" to "server: shinyapps.io / username: e5c2wc-mike-baynton"
ℹ Creating application on server...
Error in `POST()`:
! <https://api.shinyapps.io/v1/applications/> failed with HTTP status 409
Application exists with name: soshiny
Run `rlang::last_trace()` to see where the error occurred.
aronatkins commented 1 year ago

Should #808 have been addressed only for posit.cloud and not shinyapps.io?

The #831 work used isCloudServer(), which excludes both posit.cloud and shinyapps.io.

https://github.com/rstudio/rsconnect/blob/02cada1d6def246346a5c8edc45acf7df213e426/R/deploymentTarget.R#L29

@mbaynton are you able to try switching this logic to use isPositCloudServer()?

https://github.com/rstudio/rsconnect/blob/02cada1d6def246346a5c8edc45acf7df213e426/R/servers.R#L63-L73

mbaynton commented 1 year ago

Should https://github.com/rstudio/rsconnect/issues/808 have been addressed only for posit.cloud and not shinyapps.io?

Yes, @mslynch's fix is what I expected to be the right fix. (Sorry I wasn't able to be more interactive here, @mslynch's team is focusing on rsconnect this quarter.)