Closed aronatkins closed 1 year ago
Update: caused due to dogfood migration issue. Not related to rsconnect changes.
Edge case: My deployment is stuck without any error message: Steps:
rsconnect::deployApp(appName = "test-app-mode", server = "rsc.radixu.com", account = "ChaitaTest")
> rsconnect::deployApp(appName = "test-app-mode", server = "rsc.radixu.com", account = "ChaitaTest")
── Preparing for deployment ──────────────────────────────────────────────────
✔ Deploying "test-app-mode" to "server: rsc.radixu.com / username: ChaitaTest"
ℹ Creating application on server...
✔ Created application with id 23056
ℹ Bundling 2 files: app.R and quarto.qmd
ℹ Capturing R dependencies with renv
✔ Found 30 dependencies
✔ Created 16,845b bundle
ℹ Uploading bundle...
Incomplete app available here: https://rsc.radixu.com/connect/#/apps/b0ce2571-aef9-4181-81b1-0ebe178cf2e7/access
Test ran on ubuntu20-password
Deploy app when multiple files in directory without specifying appMode
rsconnect::deployApp(appName = "test", server = "192.168.56.2", account = "chaitatest")
rsconnect::deployApp(appName = "test", server = "192.168.56.2", account = "chaitatest")
── Preparing for deployment ──────────────────────────────────────────────────────────────────────────────────────────────
✔ Deploying "test" to "server: 192.168.56.2 / username: chaitatest"
ℹ Creating application on server...
✔ Created application with id 3
ℹ Bundling 2 files: app.R and quarto.qmd
ℹ Capturing R dependencies with renv
✔ Found 30 dependencies
✔ Created 16,847b bundle
ℹ Uploading bundle...
✔ Uploaded bundle with id 4
── Deploying to server ───────────────────────────────────────────────────────────────────────────────────────────────────
Building Shiny application...
Update appMode of existing shinyapp to be deployed as API
rsconnect::deployApp(appMode = "api", appName = "test", server = "192.168.56.2", account = "chaitatest")
── Deploying to server ───────────────────────────────────────────────────────────────────────────────────────────────────
Error in `POST()`:
! <http://192.168.56.2:3939/__api__/applications/3/deploy> failed with HTTP status 403
you cannot change the type of content once deployed. This content is 'shiny', but the bundle is identified as 'api'. Try
deploying this bundle as a new content item rather than updating an existing one.
Run `rlang::last_trace()` to see where the error occurred.
Deploy as New app
> rsconnect::deployApp(appMode = "api", appName = "test123", server = "192.168.56.2", account = "chaitatest")
── Preparing for deployment ──────────────────────────────────────────────────────────────────────────────────────────────
✔ Deploying "test123" to "server: 192.168.56.2 / username: chaitatest"
ℹ Creating application on server...
✔ Created application with id 4
ℹ Bundling 2 files: app.R and quarto.qmd
ℹ Capturing R dependencies with renv
✔ Found 36 dependencies
✔ Created 19,494b bundle
ℹ Uploading bundle...
✔ Uploaded bundle with id 6
── Deploying to server ───────────────────────────────────────────────────────────────────────────────────────────────────
Building Plumber API...
Note: Deployment succeeds but app will not work since this is a shiny bundle deployed as API
Verified rsconnect
RemoteUsername: rstudio
RemoteRef: HEAD
RemoteSha: 3cd2243e602547ddfbfea1a261217081e502de9a
GithubRepo: rsconnect
GithubUsername: rstudio
GithubRef: HEAD
GithubSHA1: 3cd2243e602547ddfbfea1a261217081e502de9a
NeedsCompilation: no
Packaged: 2023-08-16 12:17:22 UTC; chaitamacpro
IDE work to build upon this change: https://github.com/rstudio/rstudio/pull/13510
Testing instructions need update: https://github.com/rstudio/rsconnect/issues/958
Allow override of the inferred
appMode
for situations where complicated deployments can lead to incorrectly inferred content type. For example, the presence of anapp.R
forces the content to be deployed as a Shiny application with theappMode = "shiny"
even if that file was an auxiliary resource for some other type of content that happens to have lower precedence.The appMode argument is accepted by:
deployApp
writeManifest
listDeploymentFiles
appDependencies
The
appDependencies
function supports obtaining a set of deployment files throughappFileManifest
.The
appMetadata
function no longer callslistDeploymentFiles
. It assumes that the caller has already fully enumerated the required files and provided them inappFiles
.Fixes #948