rstudio / rsconnect

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

Different servers on the same host are treated as the same server, with confusing information presented in the IDE #339

Closed scottmmjackson closed 4 years ago

scottmmjackson commented 5 years ago

Reproduction steps:

  1. Have more than one Connect server running on localhost (or any other host), binding to separate ports. For example, localhost:3939 and localhost:5000

  2. Add an account at localhost:3939, and deploy content

  3. Add an account with the same username at localhost:5000

  4. Attempt to redeploy the first piece of content to the first server

The IDE will show this as, for example: admin@localhost:3939

Expected: Content should deploy to the first server

Actual: Content attempts to deploy to localhost:5000 and fails.

scottmmjackson commented 5 years ago

It looks like this is a consequence of how we store user data. My environment is OSX so I'll use OSX for illustration.

We keep information on servers in ~/Library/Application Support/R/rsconnect/servers. The .dcf files here are named for the server's hostname without port or path. This effectively makes the incorrect assumption that there will only ever be one connect server per hostname.

Instead, we should have a better way of identifying servers uniquely despite sharing hostnames and use that for the filename.

jmcphers commented 4 years ago

Tracked in https://github.com/rstudio/rsconnect/issues/211.